multimodalart HF staff John6666 commited on
Commit
7857ac2
1 Parent(s): 1ac7e60

Just in case to prevent resource leakage. (#5)

Browse files

- Just in case to prevent resource leakage. (2f8eea64376276362f9fdc83748a4194ef07a660)


Co-authored-by: John Smith <John6666@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -351,6 +351,8 @@ def run_lora(prompt, image_input, image_strength, cfg_scale, steps, selected_ind
351
  low_cpu_mem_usage=True,
352
  adapter_name=lora_name
353
  )
 
 
354
  print("Loaded LoRAs:", lora_names)
355
  print("Adapter weights:", lora_weights)
356
  if image_input is not None:
 
351
  low_cpu_mem_usage=True,
352
  adapter_name=lora_name
353
  )
354
+ if image_input is not None: pipe_i2i = pipe_to_use
355
+ else: pipe = pipe_to_use
356
  print("Loaded LoRAs:", lora_names)
357
  print("Adapter weights:", lora_weights)
358
  if image_input is not None: