Nodes/ComfyUI_Fill-Nodes/FL Video Batch Splitter
ComfyUI Node

FL Video Batch Splitter

Cut a long frame batch into equal chunks

By filliptm·Created 3 years ago·Updated about 6 hours ago· 628
FL Video Batch Splitter
  • images
  • batch_1
  • batch_2
  • batch_3
  • batch_4
  • batch_5
  • batch_6
  • batch_7
  • batch_8
  • batch_9
  • batch_10
  • batch_11
  • batch_12
  • batch_13
  • batch_14
  • batch_15
  • batch_16
  • batch_17
  • batch_18
  • batch_19
  • batch_20
frames_per_batch25
output_count4

Some video nodes only want to chew on a fixed number of frames at a time. Wan's native window is 81 frames; a lot of processing steps are happier on short, even chunks than on one giant batch. FL_VideoBatchSplitter takes a long frame batch and cuts it into N equal-sized pieces, each on its own output wire, so you can route each chunk to its own downstream branch (or the same node run several times). It's plumbing for chunked video pipelines.

The design is strict on purpose. You tell it how many frames go in each chunk and how many chunks you want, and it insists the numbers divide evenly - no leftover frames allowed. That strictness is a feature: if you're building a pipeline that assumes fixed-length windows, a silent remainder is exactly the kind of bug that corrupts the last chunk, so the node refuses to guess and makes you get the math right.

The inputs and outputs

  • images (IMAGE) - the long batch to split.
  • frames_per_batch (default 25) - how many frames each chunk contains.
  • output_count (default 4) - how many chunks to produce.

The catch, stated plainly: frames_per_batch × output_count must equal your total frame count exactly. 100 frames, 25 per batch, 4 batches - fine. 100 frames, 30 per batch - it won't divide, and the node errors rather than dropping frames.

Outputs are batch_1 through batch_20 (IMAGE). You get up to twenty separate chunk outputs; only the first output_count of them carry data, the rest stay empty. Wire the ones you're using into your downstream nodes.

Installing it

Part of ComfyUI_Fill-Nodes. ComfyUI Manager: search Fill-Nodes, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

then restart ComfyUI. No downloads - it's tensor slicing.

The gotcha, and how to avoid it

The exact-division rule is where everyone stubs their toe. If your generation gives you an awkward frame count (Wan clips are often 81 frames, which doesn't split into tidy chunks of 25), the splitter will reject it. Two ways out: pick a frames_per_batch that actually divides your total, or trim your batch to a divisible length first with FL_VideoTrim (also in this pack) - knock 81 down to 80 and split into 4×20, or into 20×4. Do the arithmetic before you wire it and this node is boringly reliable; ignore it and you'll get a runtime error that reads like the node is broken when really it's just holding you to the numbers. Also remember it hands out twenty output sockets no matter what - don't wire batch_5 if you only asked for 4 chunks, because it'll be empty.

Category🏵️Fill Nodes/Video

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
frames_per_batchINT251–1000
output_countINT41–20

Outputs (20)

NameTypeDescription
batch_1IMAGE
batch_2IMAGE
batch_3IMAGE
batch_4IMAGE
batch_5IMAGE
batch_6IMAGE
batch_7IMAGE
batch_8IMAGE
batch_9IMAGE
batch_10IMAGE
batch_11IMAGE
batch_12IMAGE
batch_13IMAGE
batch_14IMAGE
batch_15IMAGE
batch_16IMAGE
batch_17IMAGE
batch_18IMAGE
batch_19IMAGE
batch_20IMAGE