FL Video Batch Splitter
Cut a long frame batch into equal chunks
- 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
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.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| frames_per_batch | INT | 251–1000 | — |
| output_count | INT | 41–20 | — |
Outputs (20)
| Name | Type | Description |
|---|---|---|
| batch_1 | IMAGE | — |
| batch_2 | IMAGE | — |
| batch_3 | IMAGE | — |
| batch_4 | IMAGE | — |
| batch_5 | IMAGE | — |
| batch_6 | IMAGE | — |
| batch_7 | IMAGE | — |
| batch_8 | IMAGE | — |
| batch_9 | IMAGE | — |
| batch_10 | IMAGE | — |
| batch_11 | IMAGE | — |
| batch_12 | IMAGE | — |
| batch_13 | IMAGE | — |
| batch_14 | IMAGE | — |
| batch_15 | IMAGE | — |
| batch_16 | IMAGE | — |
| batch_17 | IMAGE | — |
| batch_18 | IMAGE | — |
| batch_19 | IMAGE | — |
| batch_20 | IMAGE | — |