ComfyUI Node

Video overlay

The workhorse of the pack — a crossfade that also dips to black, white, or your own color

By yichengup·Created 11 months ago·Updated 11 months ago· 25
Video overlay
  • video1
  • video2
  • video
transition_mode
total_frames30
fps30
background_color#FF0000
width640
height640

Its display name on the canvas is "Video overlay," which is a lie - this is a straightforward crossfade/transition node, and honestly it's the one I'd reach for first out of this pack. Every edit needs a clean cut at some point, and a plain crossfade is the tasteful default you can't screw up. If you've loaded two clips into ComfyUI and just want them to dissolve into each other without any gimmick, this is your node.

How it works

This is one of the four pure-Python nodes in the pack (no Playwright, no browser). It samples frames from video1 and video2 by progress - so your two input clips don't need to be the same length or even the same fps - and blends each pair in NumPy/OpenCV over total_frames frames. The transition_mode enum is where the variety lives:

  • crossfade - the plain dissolve.
  • fade_to_black / fade_to_white - dip through black or white, that classic "scene break" feel.
  • fade_to_custom - dip through whatever color you put in background_color. (Note the default is #FF0000 - bright red - so if you pick this mode and get a weird red flash, that's why.)
  • additive_dissolve - additive (screen-ish) blending, hotter and glowy.
  • chromatic_dissolve - offsets the RGB channels during the fade for a cheap-but-effective chromatic aberration dissolve.

Inputs and outputs that matter

  • video1, video2 - the two clips, as IMAGE tensors. These are the only required inputs that aren't dials.
  • transition_mode - the enum above. Pick this first; everything else is tuning.
  • total_frames - how long the transition lasts, in frames. This is not the total video length; 30 at 30fps = a 1-second dissolve. Keep it short; nobody needs a 5-second crossfade.
  • fps - mostly metadata for the downstream combiner.
  • background_color, width, height - width/height here go down to 64, so you can also use this node to resize.

Output is a single video IMAGE batch. Combine with VHS_VideoCombine (or ImageBatch → save) to export an actual file.

Installing it

Part of yichengup/ComfyUI-VideoTransition. ComfyUI Manager → search "VideoTransition" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/yichengup/ComfyUI-VideoTransition
cd ComfyUI-VideoTransition
pip install -r requirements.txt

Note the playwright install chromium step the README pushes for the whole pack - you can skip it for this node, since it never touches a browser.

Common issues

  • cv2 ImportError - opencv isn't in the pack's requirements.txt; it relies on the copy ComfyUI ships. In a bare environment, pip install opencv-python.
  • Red flash out of nowhere - you're on fade_to_custom with the default red background. Set a color you actually want.
  • Looks like nothing happened - check total_frames; with a low value the transition is essentially instant, and with inputs that have very few frames the sampling gets chunky. More input frames, more dissolve.
CategoryVideoTransition

Inputs (8)

NameTypeDefaultDescription
video1IMAGE
video2IMAGE
transition_modeCOMBO6 options: crossfade, fade_to_black, fade_to_white, fade_to_custom, additive_dissolve, chromatic_dissolve
total_framesINT301–300
fpsINT3015–60
background_coloroptSTRING#FF0000
widthoptINT64064–3840
heightoptINT64064–2160

Outputs (1)

NameTypeDescription
videoIMAGE