Image Batch Divider
Split a collected batch so each GPU's image saves separately
- images
- batch_1
Image Batch Divider is the cleanup node for parallel workflows. When Distributed Collector hands you back a batch - say three images, one from each of your three GPUs - they arrive stacked together as a single IMAGE batch. That's fine for a grid, but often you want them handled separately: one per Save node, one per Video Combine, each on its own path. This node cuts the stacked batch into that many individual streams.
It really comes into its own with video. That's where the README puts it, and for good reason.
How it works
The core of ComfyUI-Distributed is that every GPU runs the whole workflow in parallel and the Collector merges their results into one batch. For images that's usually what you want. For video it's a problem: each worker generated a separate clip, but they come back concatenated into one long IMAGE batch of frames, as if they were a single animation. Feed that straight to a video encoder and you get one video with everybody's clips jammed end to end.
Image Batch Divider un-stacks them. You tell it how many pieces to split into, and it slices the incoming batch into that many equal groups, each emerging on its own output socket. Set the split to match your GPU count and every worker's clip pops out on its own line, ready for its own Video Combine.
The inputs and outputs
- images (IMAGE) - the batch to divide, straight off Distributed Collector.
- divide_by (INT, default 2, range 1–10) - how many groups to split into. The rule from the pack's own WAN example is simple: set it to the number of participants. Master plus two workers is three, so
divide_by = 3. Each group then holds one participant's output.
The first output is batch_1 (IMAGE); as you raise divide_by, the node exposes additional numbered outputs (batch_2, batch_3, and so on) so each slice has somewhere to go. Wire each to its own downstream node - a separate Video Combine per clip, or a separate Save Image per image. This is also an output node in its own right, so it can terminate a branch directly.
The cap is ten, which also tells you the intended ceiling: this is a node for handfuls of GPUs, not a render farm of fifty.
Installing it
Comes with the ComfyUI-Distributed pack. ComfyUI Manager: search ComfyUI-Distributed, install, restart. Terminal: cd ComfyUI/custom_nodes && git clone https://github.com/robertvoy/ComfyUI-Distributed.git, then restart ComfyUI. No models, no heavy dependencies; the pack's requirement is multiple GPUs (or cloud workers), and for remote/cloud workers the master wants --enable-cors-header on launch.
Where people get burned
- Mismatched divide_by. The number has to match how many outputs actually came back. Split a 3-participant batch by 2 and the groups don't line up with clips - you'll get halves of two workers' output mashed together. Keep
divide_byequal to your active participant count. - Changing the worker set without changing the number. Enable or disable a worker and the batch size changes, but
divide_bydoesn't update itself. Re-check it whenever you toggle workers in the Distributed panel. - Reaching for it on plain image runs. If you're happy saving all your parallel images as one batch (Save Image handles a batch fine, numbering each file), you don't need this node at all. It earns its place when the outputs must go down separate paths - overwhelmingly the video case, where each worker made a distinct clip that needs its own encode.
- Uneven divisions. It splits into equal groups, so it assumes the batch divides cleanly by your count. Keep the number of images per participant consistent and the math stays tidy.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| divide_by | INT | 21–10 | Number of parts to divide the batch into |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| batch_1 | IMAGE | — |