Spaces:
Paused
Paused
nykadamec commited on
Commit ·
d3b20d2
1
Parent(s): d2a328e
fix: validate LoRA repo ID format
Browse files
app.py
CHANGED
|
@@ -79,8 +79,8 @@ def generate(
|
|
| 79 |
|
| 80 |
print("Model loaded!")
|
| 81 |
|
| 82 |
-
# Load LoRA if specified
|
| 83 |
-
if lora_repo and lora_repo != current_lora:
|
| 84 |
try:
|
| 85 |
print(f"Loading LoRA: {lora_repo}")
|
| 86 |
# Download LoRA from HF Hub
|
|
|
|
| 79 |
|
| 80 |
print("Model loaded!")
|
| 81 |
|
| 82 |
+
# Load LoRA if specified and valid
|
| 83 |
+
if lora_repo and isinstance(lora_repo, str) and lora_repo.strip() and "/" in lora_repo and lora_repo != current_lora:
|
| 84 |
try:
|
| 85 |
print(f"Loading LoRA: {lora_repo}")
|
| 86 |
# Download LoRA from HF Hub
|