Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -389,7 +389,9 @@ def get_huggingface_safetensors(link):
|
|
389 |
model_card = ModelCard.load(link)
|
390 |
base_model = model_card.data.get("base_model")
|
391 |
print(f"Base model: {base_model}")
|
392 |
-
|
|
|
|
|
393 |
raise Exception("Not a FLUX LoRA!")
|
394 |
image_path = model_card.data.get("widget", [{}])[0].get("output", {}).get("url", None)
|
395 |
trigger_word = model_card.data.get("instance_prompt", "")
|
|
|
389 |
model_card = ModelCard.load(link)
|
390 |
base_model = model_card.data.get("base_model")
|
391 |
print(f"Base model: {base_model}")
|
392 |
+
acceptable_models = {"black-forest-labs/FLUX.1-dev", "black-forest-labs/FLUX.1-schnell"}
|
393 |
+
models_to_check = base_model if isinstance(base_model, list) else [base_model]
|
394 |
+
if not any(model in acceptable_models for model in models_to_check):
|
395 |
raise Exception("Not a FLUX LoRA!")
|
396 |
image_path = model_card.data.get("widget", [{}])[0].get("output", {}).get("url", None)
|
397 |
trigger_word = model_card.data.get("instance_prompt", "")
|