Yaron Koresh commited on
Commit
7c7685a
·
verified ·
1 Parent(s): fcc5d4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=45)
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 motion_loaded != motion:
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")