Spaces:
Runtime error
Runtime error
Commit
•
6f329ae
1
Parent(s):
9bbaa16
Update app.py
Browse files
app.py
CHANGED
@@ -118,6 +118,9 @@ def merge_incompatible_lora(full_path_lora, lora_scale):
|
|
118 |
lora_model.merge_to(
|
119 |
pipe.text_encoder, pipe.unet, weights_sd, torch.float16, "cuda"
|
120 |
)
|
|
|
|
|
|
|
121 |
|
122 |
def run_lora(prompt, negative, lora_scale, selected_state):
|
123 |
global last_lora, last_merged, pipe
|
|
|
118 |
lora_model.merge_to(
|
119 |
pipe.text_encoder, pipe.unet, weights_sd, torch.float16, "cuda"
|
120 |
)
|
121 |
+
del weights_sd
|
122 |
+
del lora_model
|
123 |
+
gc.collect()
|
124 |
|
125 |
def run_lora(prompt, negative, lora_scale, selected_state):
|
126 |
global last_lora, last_merged, pipe
|