Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,7 @@ import time
|
|
| 13 |
import re
|
| 14 |
import math
|
| 15 |
import numpy as np
|
|
|
|
| 16 |
|
| 17 |
# Load LoRAs from JSON
|
| 18 |
loras = [
|
|
@@ -357,9 +358,11 @@ def add_custom_lora(custom_lora):
|
|
| 357 |
print(new_item)
|
| 358 |
loras.append(new_item)
|
| 359 |
existing_item_index = len(loras) - 1 # Get the actual index after adding
|
| 360 |
-
|
| 361 |
return gr.update(visible=True, value=card), gr.update(visible=True), gr.Gallery(selected_index=None), f"Custom: {path}", existing_item_index, trigger_word
|
| 362 |
except Exception as e:
|
|
|
|
|
|
|
| 363 |
gr.Warning(f"Invalid LoRA: either you entered an invalid link, or a non-Qwen-Image LoRA, this was the issue: {e}")
|
| 364 |
return gr.update(visible=True, value=f"Invalid LoRA: either you entered an invalid link, a non-Qwen-Image LoRA"), gr.update(visible=True), gr.update(), "", None, ""
|
| 365 |
else:
|
|
|
|
| 13 |
import re
|
| 14 |
import math
|
| 15 |
import numpy as np
|
| 16 |
+
import traceback
|
| 17 |
|
| 18 |
# Load LoRAs from JSON
|
| 19 |
loras = [
|
|
|
|
| 358 |
print(new_item)
|
| 359 |
loras.append(new_item)
|
| 360 |
existing_item_index = len(loras) - 1 # Get the actual index after adding
|
| 361 |
+
|
| 362 |
return gr.update(visible=True, value=card), gr.update(visible=True), gr.Gallery(selected_index=None), f"Custom: {path}", existing_item_index, trigger_word
|
| 363 |
except Exception as e:
|
| 364 |
+
full_traceback = traceback.format_exc()
|
| 365 |
+
print(f"Full traceback:\n{full_traceback}")
|
| 366 |
gr.Warning(f"Invalid LoRA: either you entered an invalid link, or a non-Qwen-Image LoRA, this was the issue: {e}")
|
| 367 |
return gr.update(visible=True, value=f"Invalid LoRA: either you entered an invalid link, a non-Qwen-Image LoRA"), gr.update(visible=True), gr.update(), "", None, ""
|
| 368 |
else:
|