chrisgoringe / cg-image-picker

227 stars 15 forks source link

Request/idea: Batch size option/node #52

Closed Erehr closed 7 months ago

Erehr commented 10 months ago

Image picker is great but because of it I started to generate a large batches (up to 64) and sending multiple of images next to upscale often resulting in out of memory errors.

First I fixed it with build-in 'Rebatch Latents' node to split it into smaller chunks but soon noticed the issue. The latents are split but images are not and I need them later for controlnet. That resulted in batches after first comming out all disorted.

I tried looking for Rebatch Images node but not found any. It would be nice to have option to set batch size on image picker itself or as separate node that split both latents and images into chunks.

Erehr commented 10 months ago

Workflows to show the issue: https://gist.github.com/Erehr/abba167728ed0e5d7e3d553c21319c89

In this example I want to split the generation after image picker to only do 2 images at once (Rebatch Node). It works untill I introduced controlnet and preprocessed image. The output not only uses only images from the first batch every time but I think it's also in wrong order as all output images are coming out messed up.

For now I bypassed the issue by generating controlnet image after rebatch node but that requires second duplicate VAE Decode.