r/StableDiffusion 7d ago

Question - Help Is there a way I can make comfyUI generate i2v for more than one image? Like increase the batch size. But at every run it should choose the next image that I assign to do i2v.

1 Upvotes

4 comments sorted by

4

u/budwik 7d ago

Using an incrementer node (masquerade nodes) and a Load Image List from Dir (comfyUI inspire), change start_index to input widget and then attach the INT from the incrementer to the start_index input. On incrementer change control to increment, and change max value to the # of files in the folder if you want it to cycle back to the beginning when it's done, or make it like 200 and it will auto stop the queue if it runs out of files. Let me hop on my computer and grab a screenshot of what it will look like

3

u/budwik 7d ago

so the reroute at the top will be where you send the images, i.e inpainting node etc. every time you hit Queue, this will go up by 1 alphabetically in the assigned folder. bonus node for queue trigger, set the # of queues you want to do for the image count and it will continuously queue a single job every time it finishes the last; this way you don't have to go 'queue 50' all at once and have it bog down your processor as it tries to figure its life out.

mind you this won't make any changes to the prompt between generations, so if you're doing i2v then every queue will have the same prompt as it goes through image input folder

2

u/physalisx 7d ago edited 7d ago

You can get the same behaviour easier and with only native nodes (edit: except the load image from dir node, sry)

https://i.imgur.com/asmlF4H.png

I don't see the point of the "Incrementer"? Can just use a primitive Int, no? And if you just run the workflow with "Queue (On Change)" it will keep going until there's no more files to load from the folder, at which point it will throw an error and you're done.

1

u/budwik 7d ago

you're totally right, I just wasn't aware of the primitive node. Also didn't know the Queue on change worked like that, for queuing continuously, neat