We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dac7568 commit 85f98abCopy full SHA for 85f98ab
invokeai/app/api/routers/images.py
@@ -99,7 +99,9 @@ async def upload_image(
99
raise HTTPException(status_code=400, detail="Invalid resize_to format or size")
100
101
try:
102
- np_image = pil_to_np(pil_image)
+ # heuristic_resize_fast expects an RGB or RGBA image
103
+ pil_rgba = pil_image.convert("RGBA")
104
+ np_image = pil_to_np(pil_rgba)
105
np_image = heuristic_resize_fast(np_image, (resize_dims.width, resize_dims.height))
106
pil_image = np_to_pil(np_image)
107
except Exception:
0 commit comments