Nodes/ComfyUI Deadline Distributed/Deadline Image Batch Divider
ComfyUI Node

Deadline Image Batch Divider

Splitting one big batch so each GPU gets its own slice

By doubletwisted·Created about a year ago·Updated 3 months ago· 9
Deadline Image Batch Divider
  • images
  • batch_1
divide_by2

You've got a batch of frames or images and a handful of GPUs, and you want each GPU to work on its own contiguous slice rather than everyone chewing on the whole pile. That's this node's entire job: take one IMAGE batch and cut it into divide_by chunks.

The setup is two fields. images is the batch you're splitting. divide_by is the number of parts - default 2, up to 10 - with the tooltip from the author spelling it out: "Number of parts to divide the batch into." The outputs are batch_1 through batch_10, all IMAGE, though only as many as you set divide_by will actually contain real data; the rest come back as empty tensors to keep the declared output count stable.

How the split works. It's plain contiguous slicing, not round-robin: total frames divided by divide_by, any remainder assigned to the first chunks. A 20-frame batch divided by 3 gives 7, 7, 6. Because it's contiguous, each output is self-contained and can be shipped to a different worker as its own job unit - which is exactly how the pack's batch upscale workflow uses it: divide, distribute each chunk to a worker, refine, and let the collector reassemble.

Where people get burned. Three things. First, remember the caps: divide_by maxes at 10, so you can't split a 64-frame batch into 20 worker chunks with this node - you'd chunk at the batch level before it. Second, the node is marked as an output node, so it doesn't pass a single combined image onward; the meaningful outputs are the individual batch slots, and you wire each one to where that slice is needed. Third, the padded empty outputs: if you wire batch_7 without setting divide_by to 7, you're feeding a worker an empty tensor and it will happily "process" nothing - one of the more confusing ways to get a blank result out of a farm.

It ships with the Deadline prefix by default in this pack (same class as the plain ImageBatchDivider), fitting the studio naming scheme. It's not a node you'll use in a single-GPU workflow - with one GPU, batch division is just extra hops. It earns its keep exactly when you have multiple workers and want to hand each one a clean, contiguous slice of the work instead of fighting over batch indices at the collector.

Categoryimage

Inputs (2)

NameTypeDefaultDescription
imagesIMAGE
divide_byINT21–10Number of parts to divide the batch into

Outputs (1)

NameTypeDescription
batch_1IMAGE