Nodes/ComfyUI-VideoBlender/Video Preprocess (YC)
ComfyUI Node

Video Preprocess (YC)

The quiet cleanup pass that keeps video blends from looking janky

By yichengup·Created 2 years ago·Updated 2 years ago· 37
Video Preprocess (YC)
  • frames
  • IMAGE
interpolationlanczos
edge_feather0.00
smoothing0.00
sharpness0.50
anti_aliasingtrue

Every compositor has a boring node nobody thanks, and in ComfyUI-VideoBlender that's VideoPreprocess. Feed it a frame sequence and it tidies each frame up before you blend: it controls the resampling quality, softens hard edges, smooths noise, and sharpens detail. Used properly, it's the difference between a composite where the overlay visibly "sits on top" and one where you can't find the seam. Skip it, and your scaled-up overlay clips arrive at the stack with aliased, crunchy edges - the kind that scream "green screen with no spill cleanup."

It's part of the same small, community-maintained video compositing pack as VideoBlendLayer and VideoBlendStack, and it sits logically right before the layer node: preprocess the frames, then transform them, then stack them. For AI-generated clips especially, this is worth a stop - generated video is often soft, and a light sharpening/smoothing balance before compositing beats trying to fix it after the fact.

How it works

Per-frame image processing, wired to four knobs that each do one obvious thing. There's no exotic pipeline here - this is the standard set of cleanup operations that video tools have had for decades, exposed as nodes:

  • interpolation - bilinear, bicubic, or lanczos (default lanczos). This is the resampling method used when frames get scaled. Lanczos is the sharpest of the three and the right default; bicubic is the safer middle ground; bilinear is soft and fast. If your scaled layer looks oversharpened or ringing, drop to bicubic.
  • edge_feather - 0 to 1, default 0. Softens the boundaries of the layer, which matters when your clip has a hard cut-out edge (masked subject, foreground plate) that would otherwise show a visible seam against the background. This is the one to reach for on "how do I make this overlay not have a harsh border."
  • smoothing - 0 to 1, default 0. A light blur/noise-reduction pass. Useful on grainy or low-quality source footage before it gets scaled up, where sharpening would just amplify noise.
  • sharpness - 0 to 1, default 0.5. The detail recovery dial. On soft generated video this is the one you'll actually push up; just don't max it, because sharpening a noisy clip makes the noise worse.
  • anti_aliasing - boolean, default on. Whether to apply edge anti-aliasing during scaling; leave it on unless you're chasing performance.

The single output is IMAGE - your cleaned frame sequence, ready to feed VideoBlendLayer.

Installing it

It ships in ComfyUI-VideoBlender, so the whole pack comes together:

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

or ComfyUI Manager → search "ComfyUI-VideoBlender" → install → restart. Requirements are opencv-python, numpy, torch, pillow, moviepy - the moviepy install is the only one likely to actually pull anything new into a stock ComfyUI.

Using it without overthinking it

Start with the defaults, then move exactly one knob. The failure mode people hit is cranking sharpness because their clip looks soft, ignoring that it's soft because it was upscaled - and the upscaling interpolation is interpolation, not sharpness. The sensible order is: if the edges are bad, feather them; if the whole clip is mushy, sharpen gently; if it's noisy, smooth first, then sharpen. And when you're just stacking two clean generated clips with normal blending, you can skip this node entirely - its value is real but situational. It's the prep you add when you see the problem, not the one you add because a workflow told you to.

CategoryVideoBlender

Inputs (6)

NameTypeDefaultDescription
framesIMAGE
interpolationCOMBOlanczos3 options: bilinear, bicubic, lanczos
edge_featherFLOAT0.000–1
smoothingFLOAT0.000–1
sharpnessFLOAT0.500–1
anti_aliasingBOOLEANtrue

Outputs (1)

NameTypeDescription
IMAGEIMAGE