Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ from lxml.html import fromstring
|
|
24 |
from diffusers.utils import export_to_gif, load_image
|
25 |
from huggingface_hub import hf_hub_download
|
26 |
from safetensors.torch import load_file, save_file
|
27 |
-
from diffusers import AnimateDiffPipeline, MotionAdapter,
|
28 |
from PIL import Image, ImageDraw, ImageFont
|
29 |
|
30 |
# logging
|
@@ -110,9 +110,13 @@ function custom(){
|
|
110 |
|
111 |
image_pipe = StableDiffusionPipeline.from_pretrained(base, torch_dtype=dtype, safety_checker=None).to(device)
|
112 |
pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype, motion_adapter=adapter).to(device)
|
113 |
-
pipe.scheduler =
|
114 |
-
|
|
|
|
|
115 |
beta_schedule="linear",
|
|
|
|
|
116 |
)
|
117 |
pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter-plus_sd15.bin")
|
118 |
pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
|
|
|
24 |
from diffusers.utils import export_to_gif, load_image
|
25 |
from huggingface_hub import hf_hub_download
|
26 |
from safetensors.torch import load_file, save_file
|
27 |
+
from diffusers import AnimateDiffPipeline, MotionAdapter, DDIMScheduler, StableDiffusionPipeline
|
28 |
from PIL import Image, ImageDraw, ImageFont
|
29 |
|
30 |
# logging
|
|
|
110 |
|
111 |
image_pipe = StableDiffusionPipeline.from_pretrained(base, torch_dtype=dtype, safety_checker=None).to(device)
|
112 |
pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype, motion_adapter=adapter).to(device)
|
113 |
+
pipe.scheduler = DDIMScheduler(
|
114 |
+
clip_sample=False,
|
115 |
+
beta_start=0.00085,
|
116 |
+
beta_end=0.012,
|
117 |
beta_schedule="linear",
|
118 |
+
timestep_spacing="trailing",
|
119 |
+
steps_offset=1
|
120 |
)
|
121 |
pipe.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-adapter-plus_sd15.bin")
|
122 |
pipe.enable_free_init(method="butterworth", use_fast_sampling=fast)
|