Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -140,12 +140,10 @@ def run_lora(prompt, cfg_scale, steps, selected_index, randomize_seed, seed, wid
|
|
| 140 |
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast")
|
| 141 |
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
| 142 |
pipe.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
| 143 |
-
pipe.fuse_lora(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
| 144 |
else:
|
| 145 |
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast")
|
| 146 |
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
| 147 |
pipe.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
| 148 |
-
pipe.fuse_lora(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
| 149 |
|
| 150 |
# Set random seed for reproducibility
|
| 151 |
with calculateDuration("Randomizing seed"):
|
|
|
|
| 140 |
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast")
|
| 141 |
pipe.load_lora_weights(lora_path, weight_name=selected_lora["weights"], adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
| 142 |
pipe.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
|
|
|
| 143 |
else:
|
| 144 |
pipe.load_lora_weights("ostris/OpenFLUX.1", weight_name="openflux1-v0.1.0-fast-lora.safetensors", adapter_name="fast")
|
| 145 |
pipe.load_lora_weights(lora_path, adapter_name=selected_lora["repo"], adapter_weights=lora_scale)
|
| 146 |
pipe.set_adapters(adapter_names={"fast", selected_lora["repo"]}, adapter_weights=[1.0, lora_scale])
|
|
|
|
| 147 |
|
| 148 |
# Set random seed for reproducibility
|
| 149 |
with calculateDuration("Randomizing seed"):
|