Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- app.py +1 -0
- multit2i.py +1 -1
app.py
CHANGED
@@ -72,6 +72,7 @@ with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", fill_width=True, css=css) as demo:
|
|
72 |
"""
|
73 |
)
|
74 |
gr.DuplicateButton(value="Duplicate Space")
|
|
|
75 |
|
76 |
gr.on(triggers=[run_button.click, prompt.submit, random_button.click], fn=lambda: gr.update(interactive=True), inputs=None, outputs=stop_button, show_api=False)
|
77 |
model_name.change(change_model, [model_name], [model_info], queue=False, show_api=False)\
|
|
|
72 |
"""
|
73 |
)
|
74 |
gr.DuplicateButton(value="Duplicate Space")
|
75 |
+
gr.Markdown(f"Just a few edits to *model.py* are all it takes to complete your own collection.")
|
76 |
|
77 |
gr.on(triggers=[run_button.click, prompt.submit, random_button.click], fn=lambda: gr.update(interactive=True), inputs=None, outputs=stop_button, show_api=False)
|
78 |
model_name.change(change_model, [model_name], [model_info], queue=False, show_api=False)\
|
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" or
|
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 status.state not in ["Loadable", "Loaded"]:
|
184 |
print(f"Failed to load by API: {model_name}")
|
185 |
return None
|
186 |
else:
|