Update app.py
Browse files
app.py
CHANGED
@@ -368,12 +368,12 @@ def run_lora(prompt, cfg_scale, steps, selected_indices, lora_scale_1, lora_scal
|
|
368 |
weight_name = lora.get("weights")
|
369 |
print(f"Lora Path: {lora_path}")
|
370 |
# pipe_to_use = pipe_i2i if image_input is not None else pipe
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
# if image_input is not None: pipe_i2i = pipe_to_use
|
378 |
# else: pipe = pipe_to_use
|
379 |
print("Loaded LoRAs:", lora_names)
|
|
|
368 |
weight_name = lora.get("weights")
|
369 |
print(f"Lora Path: {lora_path}")
|
370 |
# pipe_to_use = pipe_i2i if image_input is not None else pipe
|
371 |
+
pipe_to_use.load_lora_weights(
|
372 |
+
lora_path,
|
373 |
+
weight_name=weight_name if weight_name else None,
|
374 |
+
low_cpu_mem_usage=True,
|
375 |
+
adapter_name=lora_name
|
376 |
+
)
|
377 |
# if image_input is not None: pipe_i2i = pipe_to_use
|
378 |
# else: pipe = pipe_to_use
|
379 |
print("Loaded LoRAs:", lora_names)
|