Nodes/opencv-comfyui/OpenCV convertScaleAbs_1
ComfyUI Node

OpenCV convertScaleAbs_1

ConvertScaleAbs_1 — the identical twin of the pack's best node

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV convertScaleAbs_1
  • src
  • dst
  • nparray
alpha
beta

Here's the thing you need to know about convertScaleAbs_1 before anything else: it's the same node as convertScaleAbs_0. OpenCV's type definitions list cv2.convertScaleAbs twice - for a regular MatLike array and for a UMat - and this auto-generated pack produced a node for each overload. Both came out byte-identical, because both map to the same NPARRAY socket. If you came for the how-to, read convertScaleAbs_0, because that's where the actual tutorial lives.

The short version of what it does, since you're here: it applies dst = |alpha * src + beta| per pixel and saturates into a uint8 image. alpha is your contrast (1.0 = unchanged, >1 = punchier), beta is your brightness offset. Inputs are src, alpha, beta; output is a viewable nparray that goes back through Nparrays2Image cleanly. This is the pack's genuinely useful image-adjustment node - the one you drop into a post chain to fix a washed-out render or bring intermediate filter output back into display range.

Honestly, the only reason both _0 and _1 exist is that the pack auto-generates ~600 nodes from overloaded function signatures and the author is upfront that the naming came out ugly. This is one of those "expect dragons" moments in miniature: two identical nodes, no functional difference, pick whichever.

Install and gotchas

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

Or ComfyUI Manager → search opencv-comfyui → restart.

The standard pack reminders: it operates on numpy NPARRAYs, so Comfy IMAGE goes through Image2Nparray first (batch size 1 only - ImageFromBatch with length=1 if it complains). And the color-order thing is worth repeating: OpenCV is BGR here, so if your output looks hue-shifted you're seeing the RGB/BGR bridge, not a node bug.

If a workflow you loaded references convertScaleAbs_1, wire it in as-is and treat it exactly like _0. The suffix doesn't change the math, the settings, or the result - it's just the second half of a duplicated pair.

Categoryimage/OpenCV

Inputs (4)

NameTypeDefaultDescription
srcNPARRAY
alphaFLOAT
betaFLOAT
dstoptNPARRAY

Outputs (1)

NameTypeDescription
nparrayNPARRAY