[X] I have searched the existing issues and checked the recent builds/commits
What happened?
When API call for Img2Img, i send to Image data as Json.
but it's not working when i send PNG 32 Image data.
when i decoded Test data as base 64 from this page ,
it Decoded well and i saved Bulk data in Local, it saved well...
so i think i don't have problem with Data. it's diffrenece is only that it's PNG32 or PNG24.
is it bug, right???
Steps to reproduce the problem
Sample data :
a. PNG32
a.PNG24
make BitDepth 32 PNG File.
(From PNG24 file after Using UE5 Texture as Save.. .. ETC any. -
or just using my samples.)
Post query for Img2Img that file as base64 encoded to API.
err?
What should have happened?
PNG32 Data should be decoded well,
espicially in ImgColor.py i think?
Commit where the problem happens
0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
What platforms do you use to access the UI ?
No response
What browsers do you use to access the UI ?
No response
Command Line Arguments
set COMMANDLINE_ARGS=--xformers --deepdanbooru --nowebui
List of extensions
확장기능 | URL | Version | 업데이트
-- | -- | -- | --
AI-WEBUI-scripts-Random | | |
gif2gif | https://github.com/LonicaMewinsky/gif2gif.git | 24ad81fc (Mon Mar 6 19:09:19 2023) | 최신 버전
multi-subject-render | https://github.com/Extraltodeus/multi-subject-render.git | 03427e26 (Mon Mar 6 14:11:30 2023) | 최신 버전
openpose-editor | https://github.com/fkunn1326/openpose-editor | 124e47c5 (Sun Mar 5 22:55:09 2023) | 최신 버전
sd-dynamic-prompts | | |
sd-extension-steps-animation | https://github.com/vladmandic/sd-extension-steps-animation.git | ee270d3e (Fri Mar 3 15:20:20 2023) | 최신 버전
sd-web-ui-quickcss | https://github.com/Gerschel/sd-web-ui-quickcss.git | 53fe5a86 (Sat Jan 28 21:19:33 2023) | 최신 버전
sd-webui-controlnet | https://github.com/Mikubill/sd-webui-controlnet | 6dd043aa (Mon Mar 6 16:59:46 2023) | 최신 버전
stable-diffusion-webui-chatgpt-utilities | https://github.com/hallatore/stable-diffusion-webui-chatgpt-utilities.git | dc76df64 (Mon Mar 6 15:39:15 2023) | 최신 버전
stable-diffusion-webui-daam | https://github.com/toriato/stable-diffusion-webui-daam.git | 0906c850 (Thu Jan 26 04:20:48 2023) | 최신 버전
stable-diffusion-webui-images-browser | | |
stable-diffusion-webui-localization-ko_KR | | |
stable-diffusion-webui-nsfw-censor | https://github.com/AUTOMATIC1111/stable-diffusion-webui-nsfw-censor.git | c21cc99b (Sat Dec 10 11:33:46 2022) | 알수 없음
stable-diffusion-webui-two-shot | https://github.com/opparco/stable-diffusion-webui-two-shot | 9936c52e (Sun Feb 19 08:40:41 2023) | 최신 버전
tag-autocomplete | | |
video_loopback_for_webui | https://github.com/fishslot/video_loopback_for_webui | e1390f53 (Mon Feb 27 15:18:18 2023) | 최신 버전
LDSR | built-in | |
Lora | built-in | |
ScuNET | built-in | |
SwinIR | built-in | |
prompt-bracket-checker | built-in |
### Console logs
```Shell
INFO: 127.0.0.1:61126 - "POST /sdapi/v1/img2img HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py", line 94, in receive
return self.receive_nowait()
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py", line 89, in receive_nowait
raise WouldBlock
anyio.WouldBlock
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 77, in call_next
message = await recv_stream.receive()
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py", line 114, in receive
raise EndOfStream
anyio.EndOfStream
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 407, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 271, in __call__
await super().__call__(scope, receive, send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 125, in __call__
await self.middleware_stack(scope, receive, send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__
raise exc
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__
await self.app(scope, receive, _send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 106, in __call__
response = await self.dispatch_func(request, call_next)
File "A:\NovelAI\stable-diffusion-webui\modules\api\api.py", line 96, in log_and_time
res: Response = await call_next(req)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 80, in call_next
raise app_exc
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 69, in coro
await self.app(scope, receive_or_disconnect, send_no_error)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__
await responder(scope, receive, send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__
await self.app(scope, receive, self.send_with_gzip)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__
raise e
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__
await self.app(scope, receive, send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 706, in __call__
await route.handle(scope, receive, send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 276, in handle
await self.app(scope, receive, send)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 66, in app
response = await func(request)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 237, in app
raw_response = await run_endpoint_function(
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
result = context.run(func, *args)
File "A:\NovelAI\stable-diffusion-webui\modules\api\api.py", line 246, in img2imgapi
processed = process_images(p)
File "A:\NovelAI\stable-diffusion-webui\modules\processing.py", line 486, in process_images
res = process_images_inner(p)
File "A:\NovelAI\stable-diffusion-webui\modules\processing.py", line 577, in process_images_inner
p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
File "A:\NovelAI\stable-diffusion-webui\modules\processing.py", line 971, in init
image = images.flatten(img, opts.img2img_background_color)
File "A:\NovelAI\stable-diffusion-webui\modules\images.py", line 665, in flatten
background = Image.new('RGBA', img.size, bgcolor)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 2923, in new
color = ImageColor.getcolor(color, mode)
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageColor.py", line 136, in getcolor
color, alpha = getrgb(color), 255
File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageColor.py", line 119, in getrgb
raise ValueError(msg)
ValueError: unknown color specifier: ''
```
### Additional information
**my sended payload like this.**
{
"prompt": "masterpiece, best quality",
"negative_prompt": "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name",
"sd_model_checkpoint": "512-depth-ema",
"CLIP_stop_at_last_layers": "2",
"Steps": "20",
"cfg_scale": "1",
"height": "732",
"width": "512",
"samples": "0",
"init_images": [
"data:image/png;base64, **Sample Image PNG32 As Encoded Base64** "
]
}
Is there an existing issue for this?
What happened?
When API call for Img2Img, i send to Image data as Json. but it's not working when i send PNG 32 Image data.
when i decoded Test data as base 64 from this page , it Decoded well and i saved Bulk data in Local, it saved well... so i think i don't have problem with Data. it's diffrenece is only that it's PNG32 or PNG24.
is it bug, right???
Steps to reproduce the problem
Sample data :
a. PNG32 a.PNG24
make BitDepth 32 PNG File. (From PNG24 file after Using UE5 Texture as Save.. .. ETC any. - or just using my samples.)
Post query for Img2Img that file as base64 encoded to API.
err?
What should have happened?
PNG32 Data should be decoded well, espicially in ImgColor.py i think?
Commit where the problem happens
0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
What platforms do you use to access the UI ?
No response
What browsers do you use to access the UI ?
No response
Command Line Arguments
List of extensions
확장기능 | URL | Version | 업데이트 -- | -- | -- | -- AI-WEBUI-scripts-Random | | | gif2gif | https://github.com/LonicaMewinsky/gif2gif.git | 24ad81fc (Mon Mar 6 19:09:19 2023) | 최신 버전 multi-subject-render | https://github.com/Extraltodeus/multi-subject-render.git | 03427e26 (Mon Mar 6 14:11:30 2023) | 최신 버전 openpose-editor | https://github.com/fkunn1326/openpose-editor | 124e47c5 (Sun Mar 5 22:55:09 2023) | 최신 버전 sd-dynamic-prompts | | | sd-extension-steps-animation | https://github.com/vladmandic/sd-extension-steps-animation.git | ee270d3e (Fri Mar 3 15:20:20 2023) | 최신 버전 sd-web-ui-quickcss | https://github.com/Gerschel/sd-web-ui-quickcss.git | 53fe5a86 (Sat Jan 28 21:19:33 2023) | 최신 버전 sd-webui-controlnet | https://github.com/Mikubill/sd-webui-controlnet | 6dd043aa (Mon Mar 6 16:59:46 2023) | 최신 버전 stable-diffusion-webui-chatgpt-utilities | https://github.com/hallatore/stable-diffusion-webui-chatgpt-utilities.git | dc76df64 (Mon Mar 6 15:39:15 2023) | 최신 버전 stable-diffusion-webui-daam | https://github.com/toriato/stable-diffusion-webui-daam.git | 0906c850 (Thu Jan 26 04:20:48 2023) | 최신 버전 stable-diffusion-webui-images-browser | | | stable-diffusion-webui-localization-ko_KR | | | stable-diffusion-webui-nsfw-censor | https://github.com/AUTOMATIC1111/stable-diffusion-webui-nsfw-censor.git | c21cc99b (Sat Dec 10 11:33:46 2022) | 알수 없음 stable-diffusion-webui-two-shot | https://github.com/opparco/stable-diffusion-webui-two-shot | 9936c52e (Sun Feb 19 08:40:41 2023) | 최신 버전 tag-autocomplete | | | video_loopback_for_webui | https://github.com/fishslot/video_loopback_for_webui | e1390f53 (Mon Feb 27 15:18:18 2023) | 최신 버전 LDSR | built-in | | Lora | built-in | | ScuNET | built-in | | SwinIR | built-in | | prompt-bracket-checker | built-in |### Console logs ```Shell INFO: 127.0.0.1:61126 - "POST /sdapi/v1/img2img HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py", line 94, in receive return self.receive_nowait() File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py", line 89, in receive_nowait raise WouldBlock anyio.WouldBlock During handling of the above exception, another exception occurred: Traceback (most recent call last): File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 77, in call_next message = await recv_stream.receive() File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\streams\memory.py", line 114, in receive raise EndOfStream anyio.EndOfStream During handling of the above exception, another exception occurred: Traceback (most recent call last): File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 407, in run_asgi result = await app( # type: ignore[func-returns-value] File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in __call__ return await self.app(scope, receive, send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\applications.py", line 271, in __call__ await super().__call__(scope, receive, send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\applications.py", line 125, in __call__ await self.middleware_stack(scope, receive, send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 184, in __call__ raise exc File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\errors.py", line 162, in __call__ await self.app(scope, receive, _send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 106, in __call__ response = await self.dispatch_func(request, call_next) File "A:\NovelAI\stable-diffusion-webui\modules\api\api.py", line 96, in log_and_time res: Response = await call_next(req) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 80, in call_next raise app_exc File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\base.py", line 69, in coro await self.app(scope, receive_or_disconnect, send_no_error) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 24, in __call__ await responder(scope, receive, send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\gzip.py", line 44, in __call__ await self.app(scope, receive, self.send_with_gzip) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__ raise exc File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__ await self.app(scope, receive, sender) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 21, in __call__ raise e File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\middleware\asyncexitstack.py", line 18, in __call__ await self.app(scope, receive, send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 706, in __call__ await route.handle(scope, receive, send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 276, in handle await self.app(scope, receive, send) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\routing.py", line 66, in app response = await func(request) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 237, in app raw_response = await run_endpoint_function( File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\fastapi\routing.py", line 165, in run_endpoint_function return await run_in_threadpool(dependant.call, **values) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\starlette\concurrency.py", line 41, in run_in_threadpool return await anyio.to_thread.run_sync(func, *args) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File "A:\NovelAI\stable-diffusion-webui\modules\api\api.py", line 246, in img2imgapi processed = process_images(p) File "A:\NovelAI\stable-diffusion-webui\modules\processing.py", line 486, in process_images res = process_images_inner(p) File "A:\NovelAI\stable-diffusion-webui\modules\processing.py", line 577, in process_images_inner p.init(p.all_prompts, p.all_seeds, p.all_subseeds) File "A:\NovelAI\stable-diffusion-webui\modules\processing.py", line 971, in init image = images.flatten(img, opts.img2img_background_color) File "A:\NovelAI\stable-diffusion-webui\modules\images.py", line 665, in flatten background = Image.new('RGBA', img.size, bgcolor) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 2923, in new color = ImageColor.getcolor(color, mode) File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageColor.py", line 136, in getcolor color, alpha = getrgb(color), 255 File "A:\NovelAI\stable-diffusion-webui\venv\lib\site-packages\PIL\ImageColor.py", line 119, in getrgb raise ValueError(msg) ValueError: unknown color specifier: '' ``` ### Additional information **my sended payload like this.** { "prompt": "masterpiece, best quality", "negative_prompt": "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, artist name", "sd_model_checkpoint": "512-depth-ema", "CLIP_stop_at_last_layers": "2", "Steps": "20", "cfg_scale": "1", "height": "732", "width": "512", "samples": "0", "init_images": [ "data:image/png;base64, **Sample Image PNG32 As Encoded Base64** " ] }