Yaron Koresh commited on
Commit
1ba8f76
·
verified ·
1 Parent(s): 08bb667

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -193,7 +193,7 @@ def main():
193
  fps=40
194
  time=5
195
  device = "cuda"
196
- dtype = torch.bfloat16
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), strict=False)
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