John6666 commited on
Commit
89d82e9
·
verified ·
1 Parent(s): 08c6266

Upload 2 files

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -64,7 +64,8 @@ async def infer(model_index, prompt, nprompt="", height=None, width=None, steps=
64
  if task.done() and result is not None:
65
  with lock:
66
  png_path = "image.png"
67
- result.save(png_path)
 
68
  image = str(Path(png_path).resolve())
69
  return image
70
  return None
 
64
  if task.done() and result is not None:
65
  with lock:
66
  png_path = "image.png"
67
+ if isinstance(result, tuple): result[0].save(png_path)
68
+ else: result.save(png_path)
69
  image = str(Path(png_path).resolve())
70
  return image
71
  return None