John6666 commited on
Commit
ae407cb
β€’
1 Parent(s): 4b2575f

Upload multit2i.py

Browse files
Files changed (1) hide show
  1. 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 (None, 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 (None, None)
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