Video Composite
The multi-layer video blender that respects your VRAM
- 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) throughlayer8(optional) - layer configs fromVideoCompositeLayer.- 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 VideoComposite → VideoSave. 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.
VideoCompositetakes its frame count fromlayer1. 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 whereImageToVideo'sframe_countearns 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
ImageToVideofirst. - 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.
addblend blows out.addclamps at white fast;multiplydarkens;overlayis the contrast-friendly one. If things look washed out, you're usually onaddorscreenwith 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.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| layer1 | VIDEOCOMPOSITE_LAYER | — | |
| layer2opt | VIDEOCOMPOSITE_LAYER | — | |
| layer3opt | VIDEOCOMPOSITE_LAYER | — | |
| layer4opt | VIDEOCOMPOSITE_LAYER | — | |
| layer5opt | VIDEOCOMPOSITE_LAYER | — | |
| layer6opt | VIDEOCOMPOSITE_LAYER | — | |
| layer7opt | VIDEOCOMPOSITE_LAYER | — | |
| layer8opt | VIDEOCOMPOSITE_LAYER | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |