Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -74,7 +74,7 @@ def generate_random_string(length):
|
|
74 |
characters = string.ascii_letters + string.digits
|
75 |
return ''.join(random.choice(characters) for _ in range(length))
|
76 |
|
77 |
-
@spaces.GPU(duration=
|
78 |
def Piper(name,positive_prompt,motion):
|
79 |
global step
|
80 |
global fps
|
@@ -87,7 +87,7 @@ def Piper(name,positive_prompt,motion):
|
|
87 |
pipe.unet.load_state_dict(torch.load(hf_hub_download(base, "unet/diffusion_pytorch_model.bin"), map_location=device), strict=False)
|
88 |
progress((0, step))
|
89 |
|
90 |
-
if
|
91 |
pipe.unload_lora_weights()
|
92 |
if motion != "":
|
93 |
pipe.load_lora_weights(motion, adapter_name="motion")
|
|
|
74 |
characters = string.ascii_letters + string.digits
|
75 |
return ''.join(random.choice(characters) for _ in range(length))
|
76 |
|
77 |
+
@spaces.GPU(duration=75)
|
78 |
def Piper(name,positive_prompt,motion):
|
79 |
global step
|
80 |
global fps
|
|
|
87 |
pipe.unet.load_state_dict(torch.load(hf_hub_download(base, "unet/diffusion_pytorch_model.bin"), map_location=device), strict=False)
|
88 |
progress((0, step))
|
89 |
|
90 |
+
if last_motion != motion:
|
91 |
pipe.unload_lora_weights()
|
92 |
if motion != "":
|
93 |
pipe.load_lora_weights(motion, adapter_name="motion")
|