Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -81,10 +81,9 @@ def Piper(name,positive_prompt,motion):
|
|
81 |
global time
|
82 |
global last_motion
|
83 |
global progress
|
84 |
-
|
|
|
85 |
progress((0, step))
|
86 |
-
|
87 |
-
print("starting piper")
|
88 |
|
89 |
if motion_loaded != motion:
|
90 |
pipe.unload_lora_weights()
|
@@ -217,8 +216,7 @@ def main():
|
|
217 |
pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype).to(device)
|
218 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
219 |
pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
220 |
-
|
221 |
-
|
222 |
mp.set_start_method("spawn", force=True)
|
223 |
|
224 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|
|
|
81 |
global time
|
82 |
global last_motion
|
83 |
global progress
|
84 |
+
|
85 |
+
pipe.unet.load_state_dict(torch.load(hf_hub_download(base, "unet/diffusion_pytorch_model.bin"), map_location=device), strict=False)
|
86 |
progress((0, step))
|
|
|
|
|
87 |
|
88 |
if motion_loaded != motion:
|
89 |
pipe.unload_lora_weights()
|
|
|
216 |
pipe = AnimateDiffPipeline.from_pretrained(base, torch_dtype=dtype).to(device)
|
217 |
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
|
218 |
pipe.unet.load_state_dict(load_file(hf_hub_download(repo, ckpt), device=device), strict=False)
|
219 |
+
|
|
|
220 |
mp.set_start_method("spawn", force=True)
|
221 |
|
222 |
with gr.Blocks(theme=gr.themes.Soft(),css=css,js=js) as demo:
|