Nodes/ComfyUI-UniversalToolkit/Image Batch Extend With Overlap (UTK)
ComfyUI Node

Image Batch Extend With Overlap (UTK)

Extend a video past its last frame without a hard cut

By whmc76·Created about a year ago·Updated 2 months ago· 72
Image Batch Extend With Overlap (UTK)
  • source_images
  • new_images
  • source_images
  • start_images
  • extended_images
overlap13
overlap_sidesource
overlap_modelinear_blend

There's a classic trick for extending video generation past a model's frame limit: take the last few frames of clip A, make them the first frames of clip B, generate, then stitch the overlapping region together so the transition doesn't pop. That's exactly what Image Batch Extend With Overlap (UTK) automates. It's a port of the KJNodes helper of the same idea, and it's the difference between a seamless 24-frame extension and a jarring cut.

How the two-pass flow works

The node is used twice, which the node description spells out clearly.

Pass one - feed it your source_images and an overlap count. It hands back the same source images, plus start_images: the tail frames of the clip that your new generation should begin from. Feed those into your video model as the context/starting frames.

Pass two - on a second copy of the node, plug in the newly generated clip as new_images. Now it does the actual work: it blends the overlap region between the two sequences and outputs the combined extended_images.

The overlap input is how many frames overlap (default 13, tuned for common video lengths). overlap_side picks whether the blend region belongs to the source or the new clip - you generally leave it at source.

The overlap modes

This is where the port earns its keep, because the modes are not all the same quality:

  • linear_blend - plain alpha crossfade. Fast, works, slightly flat.
  • ease_in_out - smoothstep easing on the alpha. Smoother than linear for motion; the default.
  • filmic_crossfade - blends in linear light (gamma 2.2) instead of sRGB, so it looks more like a real dissolve and less like a gray flash in the middle.
  • perceptual_crossfade - blends in LAB color space. The nicest result, but it needs the optional kornia library; without it the option doesn't even appear in the dropdown (and if missing at runtime it falls back to linear).
  • cut - no blending, just drops the overlap. Only if you want a hard cut.

If your outputs keep washing out mid-transition, you're on linear_blend and should try filmic_crossfade - it's genuinely better for motion.

Outputs

Three: source_images (passthrough), start_images (the seed frames for pass one), and extended_images (the blended full sequence, empty until new_images is provided).

Installing and gotchas

Pack install as usual - ComfyUI Manager → search ComfyUI-UniversalToolkit, or git clone https://github.com/whmc76/ComfyUI-UniversalToolkit into custom_nodes/ and pip install -r requirements.txt, then restart.

Two things bite people:

  • Source and new images must be the same resolution. The code raises a clear error if the shapes don't match, so this surfaces fast - but it means your second pass has to be generated at the source clip's dimensions.
  • Overlap ≥ the whole clip is handled - it just returns the source as-is rather than crashing, which is forgiving but also silently does nothing. If your output looks like no extension happened, check that your overlap isn't eating the entire sequence.

For anyone doing multi-clip video with Wan or LTX, this is the node that makes "generate 5 more seconds" not look like a restart. It's one of the genuinely useful things in the pack, not a shelf ornament.

CategoryUniversalToolkit/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