Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -82,6 +82,7 @@ async def image_to_image(
|
|
82 |
strength=strength,
|
83 |
guidance_scale=0.0,
|
84 |
).images[0]
|
|
|
85 |
|
86 |
bytes = BytesIO()
|
87 |
image.save(bytes, "PNG")
|
@@ -113,8 +114,9 @@ async def inpainting(
|
|
113 |
strength=strength,
|
114 |
guidance_scale=0.0,
|
115 |
).images[0]
|
|
|
116 |
|
117 |
bytes = BytesIO()
|
118 |
image.save(bytes, "PNG")
|
119 |
bytes.seek(0)
|
120 |
-
return StreamingResponse(bytes, media_type="image/png")
|
|
|
82 |
strength=strength,
|
83 |
guidance_scale=0.0,
|
84 |
).images[0]
|
85 |
+
image = image.resize(init_image.size)
|
86 |
|
87 |
bytes = BytesIO()
|
88 |
image.save(bytes, "PNG")
|
|
|
114 |
strength=strength,
|
115 |
guidance_scale=0.0,
|
116 |
).images[0]
|
117 |
+
image = image.resize(init_image.size)
|
118 |
|
119 |
bytes = BytesIO()
|
120 |
image.save(bytes, "PNG")
|
121 |
bytes.seek(0)
|
122 |
+
return StreamingResponse(bytes, media_type="image/png")
|