Update app.py
Browse files
app.py
CHANGED
@@ -231,7 +231,7 @@ def remove_lora_2(selected_indices, loras_state):
|
|
231 |
|
232 |
def remove_lora_3(selected_indices, loras_state):
|
233 |
if len(selected_indices) >= 3:
|
234 |
-
selected_indices.pop(
|
235 |
selected_info_1 = "Select a Celebrity as LoRA 1"
|
236 |
selected_info_2 = "Select a LoRA 2"
|
237 |
selected_info_3 = "Select a LoRA 3"
|
@@ -267,7 +267,7 @@ def remove_lora_3(selected_indices, loras_state):
|
|
267 |
|
268 |
def remove_lora_4(selected_indices, loras_state):
|
269 |
if len(selected_indices) >= 4:
|
270 |
-
selected_indices.pop(
|
271 |
selected_info_1 = "Select a Celebrity as LoRA 1"
|
272 |
selected_info_2 = "Select a LoRA 2"
|
273 |
selected_info_3 = "Select a LoRA 3"
|
@@ -458,6 +458,11 @@ def run_lora(prompt, cfg_scale, steps, selected_indices, lora_scale_1, lora_scal
|
|
458 |
|
459 |
selected_loras = [loras_state[idx] for idx in selected_indices]
|
460 |
|
|
|
|
|
|
|
|
|
|
|
461 |
# Build the prompt with trigger words
|
462 |
prepends = []
|
463 |
appends = []
|
|
|
231 |
|
232 |
def remove_lora_3(selected_indices, loras_state):
|
233 |
if len(selected_indices) >= 3:
|
234 |
+
selected_indices.pop(2)
|
235 |
selected_info_1 = "Select a Celebrity as LoRA 1"
|
236 |
selected_info_2 = "Select a LoRA 2"
|
237 |
selected_info_3 = "Select a LoRA 3"
|
|
|
267 |
|
268 |
def remove_lora_4(selected_indices, loras_state):
|
269 |
if len(selected_indices) >= 4:
|
270 |
+
selected_indices.pop(3)
|
271 |
selected_info_1 = "Select a Celebrity as LoRA 1"
|
272 |
selected_info_2 = "Select a LoRA 2"
|
273 |
selected_info_3 = "Select a LoRA 3"
|
|
|
458 |
|
459 |
selected_loras = [loras_state[idx] for idx in selected_indices]
|
460 |
|
461 |
+
# Print the selected LoRAs
|
462 |
+
print("Running with the following LoRAs:")
|
463 |
+
for lora in selected_loras:
|
464 |
+
print(f"- {lora['title']} from {lora['repo']} with scale {lora_scale_1 if selected_loras.index(lora) == 0 else lora_scale_2}")
|
465 |
+
|
466 |
# Build the prompt with trigger words
|
467 |
prepends = []
|
468 |
appends = []
|