🎞️ Incremental Auto-Stitcher
The node that collects every chunk and knows when the loop is done
- images
- audio
- ALL_IMAGES
- AUDIO_OUT
- IS_FINAL_CYCLE
- IS_ABSOLUTE_FINAL
- log
Every chunked-video workflow has the same endgame problem: the GPU renders chunk after chunk, and you need all of them gathered, in order, into one final video with its audio intact - without holding 900 frames in VRAM at the end. IncrementalVideoStitcher is the pack's answer: it caches each cycle's frames to disk as PNGs, tracks the global progress, and on the final cycle loads everything back and assembles it.
It's also the pack's "brain" in a practical sense - it's the node that advances the accumulated-frame counter (the number the loop trigger uses to decide when to stop) and it emits the IS_FINAL_CYCLE / IS_ABSOLUTE_FINAL flags that the MasterSwitch and ConditionalAudioRouter keys off.
How it works
Each cycle, the stitcher receives the generated images (a batch tensor) and the audio for that chunk. It saves every frame as a timestamped PNG into a temp cache directory (meisoft_video_cache), and saves the audio chunk as a safetensors file. It cleans that cache on cycle 0, then accumulates:
- It advances
global_accumulated_framesby the number of frames in the chunk (accounting for theselect_every_nthstride, and correctly handling LTX'sn+1padding via the pack's ltx_mode flag). - It computes whether this chunk was the last (
IS_FINAL_CYCLE) and whether the whole project is done (IS_ABSOLUTE_FINAL).
On the final cycle it loads every cached PNG in order, concatenates them into one ALL_IMAGES tensor, merges the audio chunks into AUDIO_OUT, deletes the cache, and returns the whole thing. On intermediate cycles it returns just the last frame (as a passthrough so the graph doesn't break) with the flags set to false.
Inputs and outputs
images(IMAGE) - the current chunk, from your VAE decode.audio(AUDIO) - the chunk's audio; the pack's guide says to wiresource_audiofrom the analyzer straight here, and the router/slicer can carve the right slice first.current_loop_index(INT) - from SequentialLoopStart; cycle 0 triggers the cache wipe.
Outputs: ALL_IMAGES (IMAGE) - the full assembled video on the last cycle; AUDIO_OUT (AUDIO) - merged audio; IS_FINAL_CYCLE and IS_ABSOLUTE_FINAL (BOOLEAN) - the wiring everyone downstream depends on; log.
Wiring and gotchas
The README's canonical chain puts the stitcher before the Loop Trigger, and the trigger's trigger_dependency is fed from the stitcher so auto-queue only fires after each chunk is safely cached. Watch two things: in "step by chunk" flows (the TTS/Director modes) the stitcher deliberately doesn't add frames to the accumulator - the calculators already did - so don't mix both progress sources. And IS_ABSOLUTE_FINAL only goes true when the final chunk meets the final file, which is what lets a multi-file batch finish cleanly.
Install
ComfyUI Manager → search "comfyui-sequential-batcher", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher
Restart ComfyUI. Needs safetensors (installed with the pack) and FFmpeg only if you encode video elsewhere - this node itself writes PNGs and tensors. Pack-wide rule: no --highvram, and the disk cache is under ComfyUI's temp dir - make sure you have a few GB free for long projects.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| audio | AUDIO | — | |
| current_loop_index | INT | 0 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| ALL_IMAGES | IMAGE | — |
| AUDIO_OUT | AUDIO | — |
| IS_FINAL_CYCLE | BOOLEAN | — |
| IS_ABSOLUTE_FINAL | BOOLEAN | — |
| log | STRING | — |