Spaces:
Running
on
Zero
Running
on
Zero
Just in case to prevent resource leakage.
Browse filesDepending on the version and configuration of `PEFT`, it could be impossible to unload the pipe if you lose track of the `pipe instance`. Or rather, I learned about it because it was.
app.py
CHANGED
@@ -352,6 +352,8 @@ def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_ind
|
|
352 |
low_cpu_mem_usage=False,
|
353 |
adapter_name=lora_name
|
354 |
)
|
|
|
|
|
355 |
print("Loaded LoRAs:", lora_names)
|
356 |
print("Adapter weights:", lora_weights)
|
357 |
if image_input is not None:
|
|
|
352 |
low_cpu_mem_usage=False,
|
353 |
adapter_name=lora_name
|
354 |
)
|
355 |
+
if image_input is not None: pipe_i2i = pipe_to_use
|
356 |
+
else: pipe = pipe_to_use
|
357 |
print("Loaded LoRAs:", lora_names)
|
358 |
print("Adapter weights:", lora_weights)
|
359 |
if image_input is not None:
|