Nodes/ComfyUI-VideoBlender/Video Blend Layer (YC)
ComfyUI Node

Video Blend Layer (YC)

This node doesn't blend anything — and that's the trick

By yichengup·Created 2 years ago·Updated 2 years ago· 37
Video Blend Layer (YC)
  • frames
  • IMAGE
  • LAYER_INFO
blend_mode
opacity1.00
position_x0
position_y0
scale1.00
rotation0.0

If you came here expecting the node that mixes two clips together, you're in the wrong place - but only by one step. VideoBlendLayer is the prep half of the ComfyUI-VideoBlender pipeline: it takes one video's frames, moves/scales/rotates them into position, and bundles them with a blend mode and opacity for the node that actually does the mixing (VideoBlendStack). Think of it as laying your clip on the editing timeline and setting its transform, without touching the composite yet.

The pack is a small, quietly maintained Chinese-language project (v1.1.0, Feb 2025) that gives ComfyUI a layer-based video compositor - the kind of thing you'd normally leave ComfyUI for a real NLE to do. It's worth knowing about precisely because it keeps video work inside the node graph: generate a clip, layer another on top, and export, all in one workflow.

How it works

Under the hood the node runs each frame through an OpenCV affine transform - it builds a 2x3 matrix from your scale and rotation around the frame's center, then adds your position offset in pixels and applies it with warpAffine. Simple, fast, and it runs on CPU because per-frame transforms are cheap.

The important mental model: the transform happens here, the blend doesn't. The node returns two things - the transformed frames and a LAYER_INFO dict that records your blend_mode, opacity, and transform settings. That dict is a contract for the Stack node downstream. If you stare at the outputs of VideoBlendLayer and see nothing visually blended, that's not a bug; wire the LAYER_INFO into VideoBlendStack and the mix happens there.

The inputs that matter

  • frames - an IMAGE tensor, i.e. a frame sequence. You get these from a video loader (more on that below).
  • blend_mode - pick from 12: normal, multiply, screen, darken, lighten, overlay, color_dodge, color_burn, soft_light, hard_light, difference, exclusion. These are the classic Photoshop-style blend modes, so if you know what screen does to two images, you know what it does here. normal with opacity is what you'll use 90% of the time for simple overlays.
  • opacity - 0 to 1, default 1. This is the layer's opacity in the composite; you'll often want it below 1 so the base clip shows through.
  • position_x / position_y - pixel offsets, ±10000 range. The offset is relative to the frame's original position after the transform is applied, so the exact reference depends on how your clip sits on the canvas.
  • scale - 0.01 to 10, default 1. Values above 1 crop into the frame (it scales from center, so you can't easily do a corner-zoom with this alone).
  • rotation - degrees, -360 to 360.

The two outputs are IMAGE (your transformed frames) and LAYER_INFO, which feeds straight into the layer_info input of VideoBlendStack or VideoBlendStackAdvanced. Nothing else consumes LAYER_INFO, so if you see a purple wire with nowhere to go, that's why.

Installing it

Via ComfyUI Manager: search "ComfyUI-VideoBlender" and hit Install, then restart. Or manually:

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

The requirements are opencv-python, numpy, torch, pillow, and moviepy. A working ComfyUI already has most of those; moviepy is the one that might be new to your environment, and it's a chunky dependency, so expect the first install to take a minute.

The gotchas that will trip you up

First, this pack has no video loader or saver. The README's basic flow says "LoadVideo → ... → SaveVideo," but those nodes don't ship here - you need ComfyUI-VideoHelperSuite (VHS) for VHS_LoadVideo on the front end and VHS_VideoCombine on the back. In fact the pack's own example workflow (the "shatter mask" demo) uses VHS and ComfyUI_LayerStyle's ImageScaleByAspectRatio V2, so installing just this pack and loading that JSON will complain about missing nodes.

Second, the README warns to compress large videos before processing and watch your memory - sound advice. ComfyUI keeps full frame tensors in VRAM/CPU RAM, and a long 4K clip through a per-frame loop adds up fast.

Finally, remember that blend_mode and opacity are passed through this node, not applied here. Set them here, yes - but judge your result at the Stack node, or you'll be confused by "why does my layer look untouched."

CategoryVideoBlender

Inputs (7)

NameTypeDefaultDescription
framesIMAGE
blend_modeCOMBO12 options: normal, multiply, screen, darken, lighten, overlay, +6
opacityFLOAT1.000–1
position_xINT0-10000–10000
position_yINT0-10000–10000
scaleFLOAT1.000.01–10
rotationFLOAT0.0-360–360

Outputs (2)

NameTypeDescription
IMAGEIMAGE
LAYER_INFOLAYER_INFO