mix1009 / sdwebuiapi

Python API client for AUTOMATIC1111/stable-diffusion-webui
MIT License
1.35k stars 181 forks source link

Wrong payload for rembg #172

Closed KonradBreitsprecher closed 1 month ago

KonradBreitsprecher commented 2 months ago

Hello @mix1009,

using rembg failed with: RuntimeError: (500, '{"error":"HTTPException","detail":"Invalid encoded image","body":"","errors":""}')

The error is an invalid payload at https://github.com/mix1009/sdwebuiapi/blob/main/webuiapi/webuiapi.py#L1283 with a wrong key for the image. Its input_image, not just image at least in 1.9.4 (https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/feee37d75f1b168768014e4634dcb156ee649c05).

Otherwise works great!

mix1009 commented 1 month ago

Thank you for the bug report. I've fixed in recent update. image is renamed to input_image.