Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -171,6 +171,8 @@ def randomize_loras(selected_indices, loras_state):
|
|
171 |
return selected_info_1, selected_info_2, selected_indices, lora_scale_1, lora_scale_2, lora_image_1, lora_image_2, random_prompt
|
172 |
|
173 |
def add_custom_lora(custom_lora, selected_indices, current_loras, gallery):
|
|
|
|
|
174 |
if custom_lora:
|
175 |
try:
|
176 |
title, repo, path, trigger_word, image = check_custom_model(custom_lora)
|
@@ -205,6 +207,7 @@ def add_custom_lora(custom_lora, selected_indices, current_loras, gallery):
|
|
205 |
lora_scale_2 = 1.15
|
206 |
lora_image_1 = None
|
207 |
lora_image_2 = None
|
|
|
208 |
if len(selected_indices) >= 1:
|
209 |
lora1 = current_loras[selected_indices[0]]
|
210 |
selected_info_1 = f"### LoRA 1 Selected: {lora1['title']} ✨"
|
@@ -213,6 +216,7 @@ def add_custom_lora(custom_lora, selected_indices, current_loras, gallery):
|
|
213 |
lora2 = current_loras[selected_indices[1]]
|
214 |
selected_info_2 = f"### LoRA 2 Selected: {lora2['title']} ✨"
|
215 |
lora_image_2 = lora2['image'] if lora2['image'] else None
|
|
|
216 |
print("Finished adding custom LoRA")
|
217 |
return (
|
218 |
current_loras,
|
|
|
171 |
return selected_info_1, selected_info_2, selected_indices, lora_scale_1, lora_scale_2, lora_image_1, lora_image_2, random_prompt
|
172 |
|
173 |
def add_custom_lora(custom_lora, selected_indices, current_loras, gallery):
|
174 |
+
print("Starting to load a custom LoRA...")
|
175 |
+
|
176 |
if custom_lora:
|
177 |
try:
|
178 |
title, repo, path, trigger_word, image = check_custom_model(custom_lora)
|
|
|
207 |
lora_scale_2 = 1.15
|
208 |
lora_image_1 = None
|
209 |
lora_image_2 = None
|
210 |
+
|
211 |
if len(selected_indices) >= 1:
|
212 |
lora1 = current_loras[selected_indices[0]]
|
213 |
selected_info_1 = f"### LoRA 1 Selected: {lora1['title']} ✨"
|
|
|
216 |
lora2 = current_loras[selected_indices[1]]
|
217 |
selected_info_2 = f"### LoRA 2 Selected: {lora2['title']} ✨"
|
218 |
lora_image_2 = lora2['image'] if lora2['image'] else None
|
219 |
+
|
220 |
print("Finished adding custom LoRA")
|
221 |
return (
|
222 |
current_loras,
|