Spaces:
Running
on
A10G
Running
on
A10G
Update app.py
Browse files
app.py
CHANGED
@@ -162,9 +162,10 @@ class AnimateController:
|
|
162 |
if self.lora_model_state_dict != {}:
|
163 |
print(f"Lora alpha: {lora_alpha_slider}")
|
164 |
pipeline = convert_lora(copy.deepcopy(pipeline), self.lora_model_state_dict, alpha=lora_alpha_slider)
|
165 |
-
|
166 |
pipeline.to("cuda")
|
167 |
|
|
|
|
|
168 |
seed_textbox = int(seed_textbox)
|
169 |
if seed_textbox != -1 and seed_textbox != "": torch.manual_seed(seed_textbox)
|
170 |
else: torch.seed()
|
|
|
162 |
if self.lora_model_state_dict != {}:
|
163 |
print(f"Lora alpha: {lora_alpha_slider}")
|
164 |
pipeline = convert_lora(copy.deepcopy(pipeline), self.lora_model_state_dict, alpha=lora_alpha_slider)
|
|
|
165 |
pipeline.to("cuda")
|
166 |
|
167 |
+
torch.cuda.empty_cache()
|
168 |
+
|
169 |
seed_textbox = int(seed_textbox)
|
170 |
if seed_textbox != -1 and seed_textbox != "": torch.manual_seed(seed_textbox)
|
171 |
else: torch.seed()
|