ComfyUI Node

Image Batch Splitter

Chop a frame batch into pieces — but you only get the first one out

By turnbros·Created 11 months ago·Updated 10 months ago· 0
Image Batch Splitter
  • images
  • split_batch
  • info
split_modechunk_size
chunk_size8
num_chunks2
start_frame0
end_frame-1

Image Batch Splitter slices a batch of frames into pieces, or extracts a specific range of frames. You pick a splitting strategy, feed it an IMAGE batch, and it hands back one batch plus a detailed JSON report of all the pieces it would return.

Here's the design decision you need to know before anything else: the node only outputs one piece at a time. Despite the name, split_batch isn't a bundle of chunks - it's the first chunk (or the requested frame range), and the info output describes the whole split so you know what else exists. To get chunk 2 of 3, you change the parameters and re-run. It's a "split, then select" workflow crammed into one node, and it trips people up until they accept it.

The three split modes

  • chunk_size (default) - chops the batch into chunks of N frames. chunk_size 8 on a 20-frame batch gives 3 chunks (8/8/4); you get chunk 1 out.
  • num_chunks - divides into N roughly-equal chunks. 20 frames into 3 chunks is 7/7/6; you get the first 7.
  • frame_range - the useful one for grabbing a specific slice. start_frame 0, end_frame 9 extracts frames 0–9. Set end_frame to -1 and it means "through the last frame," so 5 to -1 gives you everything from frame 5 onward.

The inputs relevant to each mode are the tooltipped ones: chunk_size (1–1000), num_chunks (1–100), start_frame, end_frame.

Outputs

  • split_batch - the IMAGE result (first chunk, or your frame-range slice).
  • info - a STRING of JSON with mode, the original frame count, and a chunks array listing every chunk's start/end frames. This is how you figure out what parameters to feed in for the next chunk.

Installing it

ComfyBros installs like any custom node pack. ComfyUI Manager - search "ComfyBros" - or:

cd ComfyUI/custom_nodes
git clone https://github.com/turnbros/ComfyBros

Then restart ComfyUI. The README's requirements.txt doesn't exist (deps are in pyproject.toml). The node lives under ComfyBros/Image Utils.

Gotchas

Remember the one-piece-out rule - if you split into 4 chunks and wonder where chunks 2–4 went, they're in the info output as coordinates, not wires. Range validation is strict: start_frame and end_frame out of bounds raise errors, so check your batch's frame count first (the info output of a combiner or an image-info node is the easy way). And there's no shuffle or reorder here - this is purely slicing, which is exactly what you want for animation cleanup.

CategoryComfyBros/Image Utils

Inputs (6)

NameTypeDefaultDescription
imagesIMAGE
split_modeCOMBOchunk_size3 options: chunk_size, num_chunks, frame_range
chunk_sizeoptINT81–1000Number of frames per chunk (for chunk_size mode)
num_chunksoptINT21–100Number of chunks to create (for num_chunks mode)
start_frameoptINT0Start frame index (for frame_range mode)
end_frameoptINT-1End frame index, -1 for last frame (for frame_range mode)

Outputs (2)

NameTypeDescription
split_batchIMAGE
infoSTRING