api-inference-community
api-inference-community copied to clipboard
[Bug] Multiple Image Outputs are returned in a single byte buffer
Currently if you are attempting to return multiple image outputs from a pipeline task, all of the image data is crammed into a single binary response, which makes it almost impossible to decode and consume.
Ideally we should be returning multiple images like how we return multiple audio files, as json with each blob as image encoded to base64 string.
https://github.com/huggingface/api-inference-community/blob/9748c07fcb5f89f0e1f234ac530736bc2f713d97/api_inference_community/routes.py#L140-L152