Spaces:
Running
Running
Upload multit2i.py
Browse files- multit2i.py +2 -2
multit2i.py
CHANGED
@@ -163,12 +163,12 @@ def infer(prompt: str, model_name: str, recom_prompt: bool, progress=gr.Progress
|
|
163 |
caption = model_name.split("/")[-1]
|
164 |
try:
|
165 |
model = load_model(model_name)
|
166 |
-
if not model: return (
|
167 |
image_path = model(prompt + rprompt + seed)
|
168 |
image = Image.open(image_path).convert('RGB')
|
169 |
except Exception as e:
|
170 |
print(e)
|
171 |
-
return (
|
172 |
return (image, caption)
|
173 |
|
174 |
|
|
|
163 |
caption = model_name.split("/")[-1]
|
164 |
try:
|
165 |
model = load_model(model_name)
|
166 |
+
if not model: return (Image.new("RGB", (64, 64), (0, 0, 0)), None)
|
167 |
image_path = model(prompt + rprompt + seed)
|
168 |
image = Image.open(image_path).convert('RGB')
|
169 |
except Exception as e:
|
170 |
print(e)
|
171 |
+
return (Image.new("RGB", (64, 64), (0, 0, 0)), None)
|
172 |
return (image, caption)
|
173 |
|
174 |
|