Update app.py
Browse files
app.py
CHANGED
@@ -517,12 +517,12 @@ def run_lora(prompt, cfg_scale, steps, selected_indices, lora_scale_1, lora_scal
|
|
517 |
weight_name = lora.get("weights")
|
518 |
print(f"Lora Path: {lora_path}")
|
519 |
## pipe_to_use = pipe_i2i if image_input is not None else pipe
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
print("Loaded LoRAs:", lora_names)
|
527 |
print("Adapter weights:", lora_weights)
|
528 |
## if image_input is not None:
|
|
|
517 |
weight_name = lora.get("weights")
|
518 |
print(f"Lora Path: {lora_path}")
|
519 |
## pipe_to_use = pipe_i2i if image_input is not None else pipe
|
520 |
+
pipe_to_use.load_lora_weights(
|
521 |
+
lora_path,
|
522 |
+
weight_name=weight_name if weight_name else None,
|
523 |
+
low_cpu_mem_usage=True,
|
524 |
+
adapter_name=lora_name
|
525 |
+
)
|
526 |
print("Loaded LoRAs:", lora_names)
|
527 |
print("Adapter weights:", lora_weights)
|
528 |
## if image_input is not None:
|