Spaces:
Running
Running
Upload 2 files
Browse files
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
|