Spaces:
Running
Running
Upload multit2i.py
Browse files- multit2i.py +1 -1
multit2i.py
CHANGED
@@ -180,7 +180,7 @@ def load_model_api(model_name: str):
|
|
180 |
try:
|
181 |
client = InferenceClient(timeout=5)
|
182 |
status = client.get_model_status(model_name)
|
183 |
-
if status is None or status.framework != "diffusers"
|
184 |
print(f"Failed to load by API: {model_name}")
|
185 |
return None
|
186 |
else:
|
|
|
180 |
try:
|
181 |
client = InferenceClient(timeout=5)
|
182 |
status = client.get_model_status(model_name)
|
183 |
+
if status is None or status.framework != "diffusers" or not status.state in ["Loadable", "Loaded"]:
|
184 |
print(f"Failed to load by API: {model_name}")
|
185 |
return None
|
186 |
else:
|