Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -200,7 +200,7 @@ def main():
|
|
200 |
fps=20
|
201 |
time=16
|
202 |
device = "cuda"
|
203 |
-
dtype = torch.
|
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 |
|