Just in case to prevent resource leakage.

#5
Files changed (1) hide show
  1. app.py +2 -0
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: