Nodes/KJNodes for ComfyUI/Image Batch Extend With Overlap
ComfyUI Node Runs on cloud

Image Batch Extend With Overlap

Stitch video chunks without a hard seam

By kijai·Created 3 years ago·Updated about 14 hours ago· 2,930
Image Batch Extend With Overlap
  • source_images
  • new_images
  • source_images
  • start_images
  • extended_images
overlap13
overlap_sidesource
overlap_modelinear_blend

Video models can only generate so many frames at once. To make something longer than one chunk, you generate a second chunk that starts where the first one ended, then join them - and the join is where things go wrong. Do it naively and you get a visible jump at the seam. Image Batch Extend With Overlap is the helper that makes those joins smooth: it hands the tail of your last clip to the next generation as its starting frames, then blends the overlap back together so the cut disappears.

This is glue for the "generate 20 seconds by chaining 5-second clips" workflow that every open video model - Wan, LTX - pushes you into, because none of them do long form in a single pass.

How it works - it's a two-pass node

The description is the manual: "First input source and overlap amount to get the starting frames for the extension. Then on another copy of the node provide the newly generated frames and choose how to overlap them." So you use it twice:

  1. First copy - feed your source_images and an overlap count. It gives you start_images - the last few frames of the source - which you feed into the next generation as its conditioning/starting frames, so the model continues from them.
  2. Second copy - once the new chunk is generated, feed both the source and the new_images in, pick an overlap_mode, and it produces extended_images: the two chunks joined with the overlapping frames blended, not stacked.

The inputs that matter

  • overlap (default 13) - how many frames the chunks share. More overlap = a longer, smoother blend but more redundant frames to generate; too few and the blend has nothing to work with.
  • overlap_mode - how the shared frames are combined: cut (hard, no blend), linear_blend (a straight crossfade, the sane default), ease_in_out (eased crossfade), filmic_crossfade, and perceptual_crossfade (fancier blends that try to look more natural to the eye). Start with linear_blend; reach for the perceptual ones if you can see the transition.
  • overlap_side (source or new_images) - which chunk's frames win in the overlap region.

Outputs are source_images (passed through), start_images (the tail, for the next generation), and extended_images (the final stitched result).

Where it wires in

It bookends a generation loop. Copy one sits before the next chunk's sampler, extracting the seed frames; copy two sits after, welding the output onto what you already have. Repeat per chunk and you build a long sequence out of short generations without seams.

Installing it

Part of kijai's KJNodes pack.

  • ComfyUI Manager - search KJNodes for ComfyUI, install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, then pip install -r requirements.txt, and restart.

No downloads; it's frame manipulation.

Common issues

The two-copies structure is the thing people miss. If you drop in one node and expect it to both prep and stitch, it won't - the first call gets you the start frames, the second call does the join. Read the two roles as two separate placements in your graph.

And understand the node's real limits. It makes the visual join smooth, but it can't fix identity drift - the tendency of chained video chunks to slowly change a character's face or the scene across boundaries. That's the fundamental failure mode of every chunk-stitching approach, and a crossfade at the seam doesn't address it; it only hides the frame-to-frame jump. If your subject is morphing across a long chain, that's a conditioning problem, not something a better overlap_mode will solve. Pick your overlap generously enough that the blend has room to work, and if you still see the cut, step up from linear_blend to one of the crossfade modes.

CategoryKJNodes/image

Inputs (5)

NameTypeDefaultDescription
source_imagesIMAGEThe source images to extend
overlapINT131–4096Number of overlapping frames between source and new images
overlap_sideCOMBOsourceWhich side to overlap on
overlap_modeCOMBOlinear_blendMethod to use for overlapping frames
new_imagesoptIMAGEThe new images to extend with

Outputs (3)

NameTypeDescription
source_imagesIMAGEThe original source images (passthrough)
start_imagesIMAGEThe input images used as the starting point for extension
extended_imagesIMAGEThe extended images with overlap, if no new images are provided this will be empty