Yaron Koresh commited on
Commit
b354e28
·
verified ·
1 Parent(s): ff6e633

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -200,7 +200,7 @@ def main():
200
  fps=20
201
  time=16
202
  device = "cuda"
203
- dtype = torch.float16
204
  result=[]
205
  step = 2
206
 
@@ -218,7 +218,7 @@ def main():
218
  repo = "ByteDance/AnimateDiff-Lightning"
219
  ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
220
 
221
- pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype).to(device)
222
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
223
  pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
224
 
 
200
  fps=20
201
  time=16
202
  device = "cuda"
203
+ dtype = torch.bfloat16
204
  result=[]
205
  step = 2
206
 
 
218
  repo = "ByteDance/AnimateDiff-Lightning"
219
  ckpt = f"animatediff_lightning_{step}step_diffusers.safetensors"
220
 
221
+ pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype, token=os.getenv("hf_token")).to(device)
222
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
223
  pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
224