Nodes/ComfyUI-Video-Edit/Video Composite
ComfyUI Node

Video Composite

The multi-layer video blender that respects your VRAM

By guchendesigndog·Created 4 months ago·Updated 4 months ago· 6
Video Composite
  • image
  • layer1
  • layer2
  • layer3
  • layer4
  • layer5
  • layer6
  • layer7
  • layer8
  • video

VideoComposite is the payoff node of ComfyUI-Video-Edit: it blends up to eight video layers onto a background canvas and produces a finished video. It's the closest thing this pack has to a mini NLE inside ComfyUI - and unlike a lot of "just do it in an editor" advice, it works with long files because it processes in chunks instead of loading everything into memory at once.

The name is doing some lifting, so let's be precise about the inputs. The canvas is an IMAGE (not a VIDEO) - that's your background, and it defines the final output dimensions. Everything else is layer1 through layer8, each produced by the pack's VideoCompositeLayer node, which is where you set position, scale, opacity, blend mode, and stacking order.

How it works

  • image (IMAGE, required) - the canvas/background. Its resolution is the output resolution.
  • layer1 (required) through layer8 (optional) - layer configs from VideoCompositeLayer.
  • Output: video (VIDEO) - the composited result, ready for Video Save or further processing.

Under the hood: layers are sorted by their order (bottom to top), then processed in chunks of 64 frames. Each chunk gets decoded, the layers scaled (lanczos via ComfyUI's common upscaler) and pasted at their position, the blend mode applied per pixel, and the result released before the next chunk. That chunked loop is the whole point - it keeps memory bounded no matter how long the source clips are. Blend-then-fade is the order of operations: the blend mode combines the layer with what's already on the canvas, then opacity fades the blended result.

Getting a scene together

A typical three-layer setup: canvas image → ImageToVideo (if you want the background to be a same-length video) or straight in as the IMAGE canvas; two clips → each through VideoCompositeLayer (position, scale, opacity, distinct order values); all three into VideoCompositeVideoSave. That's a logo-over-footage, or a picture-in-picture, or a multi-source collage without touching a timeline editor.

The traps

  • Output length follows the first layer. VideoComposite takes its frame count from layer1. If your layers have different lengths - say a 30-frame background and a 120-frame foreground - the composite only runs for the first layer's length and the rest of your footage silently never appears. Keep layer lengths aligned (this is where ImageToVideo's frame_count earns its keep).
  • Canvas is IMAGE, not VIDEO. New users try to feed a video into the canvas slot and get a type error. If your background is a video, run it through ImageToVideo first.
  • Off-canvas layers just get clipped. Position a layer at x/y outside 0–1 and it's cropped at the canvas edge - no error, just missing pixels.
  • add blend blows out. add clamps at white fast; multiply darkens; overlay is the contrast-friendly one. If things look washed out, you're usually on add or screen with too many layers.

Install

cd ComfyUI/custom_nodes/
git clone https://github.com/guchendesigndog/comfyui-video-edit.git
pip install -r comfyui-video-edit/requirements.txt

Or search "ComfyUI-Video-Edit" in ComfyUI Manager and restart. The only real dependency is PyAV (av>=10.0.0), which needs FFmpeg. Small MIT-licensed pack by a solo author - there's no community heavyweight behind it, so treat the docs and source as your contract. But the chunked compositing here is legitimately the nicest part of the pack: eight layers, long clips, bounded memory.

CategoryVideoEdit

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
layer1VIDEOCOMPOSITE_LAYER
layer2optVIDEOCOMPOSITE_LAYER
layer3optVIDEOCOMPOSITE_LAYER
layer4optVIDEOCOMPOSITE_LAYER
layer5optVIDEOCOMPOSITE_LAYER
layer6optVIDEOCOMPOSITE_LAYER
layer7optVIDEOCOMPOSITE_LAYER
layer8optVIDEOCOMPOSITE_LAYER

Outputs (1)

NameTypeDescription
videoVIDEO