Nodes/opencv-comfyui/OpenCV scaleAdd_1
ComfyUI Node

OpenCV scaleAdd_1

The blend, UMat twin edition

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV scaleAdd_1
  • src1
  • src2
  • dst
  • nparray
alpha

scaleAdd_1 is scaleAdd_0's UMat overload - the same cv2.scaleAdd function, the same inputs, the same output, and no difference you'll ever observe from inside ComfyUI. This pack generated a numbered node for every OpenCV type-stub overload, so nearly every function ships twice. Treat the two as the same node and move on.

What it does

What it does: dst = src1 * alpha + src2. Scale the first image by alpha, add the second. The useful real-world cases are crossfading between two images (alpha = 0.5 is a 50/50 dissolve) and superimposing one image over another at partial weight. It's the simpler sibling of addWeighted, and its job in the post-processing stack is a deterministic compositing primitive - nothing exotic, just the blend that shows up in every fade-and-overlay recipe. The scaleAdd_0 article has the full rundown; nothing there changes for this variant.

Inputs and outputs

Inputs: src1, alpha (FLOAT), src2 - all required - plus an optional dst out-parameter you should leave unwired per the README. Output: one nparray. Keep src1 and src2 the same shape and channel count or OpenCV asserts.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-contrib-python

Install: ComfyUI Manager → search "opencv-comfyui", or the commands above, then pip install opencv-contrib-python (the declared dependency; no models).

Verdict

If you grabbed this one instead of _0, that's fine - the class names are interchangeable in any workflow JSON. Don't go looking for a behavioral difference; there isn't one. This article is short because it's a duplicate, and the interesting content lives next door.

One detail worth carrying over from the _0 page: alpha scales only src1, and the add is element-wise with no clamping, so bright content can clip to pure white. If you need a gamma-corrected blend, that's addWeighted's job - this node is the simple, subtract-or-fade arithmetic version.

Categoryimage/OpenCV

Inputs (4)

NameTypeDefaultDescription
src1NPARRAY
alphaFLOAT
src2NPARRAY
dstoptNPARRAY

Outputs (1)

NameTypeDescription
nparrayNPARRAY