Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -193,7 +193,7 @@ def main():
|
|
193 |
fps=40
|
194 |
time=5
|
195 |
device = "cuda"
|
196 |
-
dtype = torch.
|
197 |
result=[]
|
198 |
step = 2
|
199 |
|
@@ -213,8 +213,7 @@ def main():
|
|
213 |
ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
214 |
|
215 |
adapter = MotionAdapter().to(device, dtype)
|
216 |
-
adapter.load_state_dict(load_file(hf_hub_download(repo ,ckpt), device=device)
|
217 |
-
|
218 |
pipe = AnimateDiffPipeline.from_pretrained(base, motion_adapter=adapter, torch_dtype=dtype).to(device)
|
219 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
220 |
|
|
|
193 |
fps=40
|
194 |
time=5
|
195 |
device = "cuda"
|
196 |
+
dtype = torch.float16
|
197 |
result=[]
|
198 |
step = 2
|
199 |
|
|
|
213 |
ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
|
214 |
|
215 |
adapter = MotionAdapter().to(device, dtype)
|
216 |
+
adapter.load_state_dict(load_file(hf_hub_download(repo ,ckpt), device=device))
|
|
|
217 |
pipe = AnimateDiffPipeline.from_pretrained(base, motion_adapter=adapter, torch_dtype=dtype).to(device)
|
218 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
219 |
|