-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: batch images #28
Comments
Was also looking for this I guess for now workaround is to do the batch image logic locally... change seed as required |
@agawrylak @aleph65 so you mean that your workflow is creating multiple images and you want all of them to be returned? |
yes exactly! |
@aleph65 would you mind providing me with an example workflow, so that I can use it for testing & development? |
I'm also interested in this. Just using the default test input from https://raw.githubusercontent.com/blib-la/runpod-worker-comfy/main/test_input.json If I increase the batch_size from 1 to say 5, how can I get the 5 images separately from the API response? |
Ok thank you! I imagine we would deliver an array of images then. But we have to make sure that this is not breaking the current behavior OR release a breaking change. |
sorry for not sending this yet, my examples require additional packages and I want to send a out-of-box one Basically, there are 2 scenarios: 1 - there is a batch of images in a Save Image or Display Image node 2 - There are multiple Save Image or Display Image nodes If you query comfyui api today you will receive all of those outputs (all batches of all output image nodes) Personally if backcompat is important you can just return the original first image in the same place and return the full array as well. And add a flag for people who have already migrated to this new signature |
I'm also looking for this feature. The way comfyui handles this is by saving 2 images sequentially, you guys send the last image in ["output"]["message"] so the easiest way is to read how many files where generated in folder before and after comfyui gen and send those as ["output"]["message1"], ["output"]["message2"] ... ["output"]["messageN"] The reason I suggest reading the files instead of the workflow is in case the workflow contains multiple empty latents or custom nodes but for a default workflow you can just read "batch_size" to get the batch number. this is some relevant part of a log from my runpod testing:
let me know if you need testing, I would be happy to help PS: A workaround for users is to make a custom workflow that combines all images and saves them as one and then split them locally PPS: Modifying src/rp_handler.py, process_output_images function like this should do the trick (only tested with strings):
|
Is it possible to add an option to return a batch of images?
The text was updated successfully, but these errors were encountered: