Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,11 +151,11 @@ def run_lora(prompt, negative_prompt, cfg_scale, steps, selected_index, seed, wi
|
|
| 151 |
# Load LoRA weights
|
| 152 |
with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
|
| 153 |
if "weights" in selected_lora:
|
| 154 |
-
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_weights=[1.0], lora_scale=[1.0])
|
| 155 |
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], lora_scale=[1.0])
|
| 156 |
pipe.set_adapters(["fast", selected_lora["repo"]], adapter_weights=[1.0, 1.0])
|
| 157 |
else:
|
| 158 |
-
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_weights=[1.0], lora_scale=[1.0])
|
| 159 |
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], lora_scale=[1.0])
|
| 160 |
pipe.set_adapters(["fast", selected_lora["repo"]], adapter_weights=[1.0, 1.0])
|
| 161 |
|
|
|
|
| 151 |
# Load LoRA weights
|
| 152 |
with calculateDuration(f"Loading LoRA weights for {selected_lora['title']}"):
|
| 153 |
if "weights" in selected_lora:
|
| 154 |
+
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast", adapter_weights=[1.0], lora_scale=[1.0])
|
| 155 |
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], lora_scale=[1.0])
|
| 156 |
pipe.set_adapters(["fast", selected_lora["repo"]], adapter_weights=[1.0, 1.0])
|
| 157 |
else:
|
| 158 |
+
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast", adapter_weights=[1.0], lora_scale=[1.0])
|
| 159 |
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], lora_scale=[1.0])
|
| 160 |
pipe.set_adapters(["fast", selected_lora["repo"]], adapter_weights=[1.0, 1.0])
|
| 161 |
|