Nodes/opencv-comfyui/OpenCV resize_1
ComfyUI Node

OpenCV resize_1

Resize_1 — the resize twin you can skip

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV resize_1
  • src
  • dst
  • nparray
fx
fy
interpolation
dsize

resize_1 is resize_0 with a different number. Same cv2.resize overload, generated twice by opencv-comfyui (geroldmeisinger/opencv-comfyui), no behavioral difference. Use the _0, ignore this one.

For the record, both do the same thing: resize an NPARRAY image to an exact size or scale factor with OpenCV interpolation. Inputs are src (an NPARRAY), dsize (a (width, height) literal - (0, 0) means "use the scale factors"), fx/fy (float multipliers, ignored when dsize is nonzero), interpolation (an int; 3 = INTER_AREA, the quality pick for downscaling), and an optional dst out-parameter. Output is the resized nparray.

The full write-up - including the one gotcha that matters, which is that dsize is a required literal and can't be left blank, and the shape-order trap of (width, height) vs (height, width) - is in the resize_0 article. Read that one.

Installing it

The standard pack install. ComfyUI Manager (search "opencv-comfyui"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui

restart, confirm OpenCV:

pip install opencv-contrib-python

No models, no GPU. And once more, the pack rule that saves you time across the whole category: _0/_1 twins are the same overload, emitted twice. The trailing number is a generator counter, not a version - bookmark the _0 and move on.

Categoryimage/OpenCV

Inputs (6)

NameTypeDefaultDescription
srcNPARRAY
fxFLOAT
fyFLOAT
interpolationINT
dsizeoptSTRING
dstoptNPARRAY

Outputs (1)

NameTypeDescription
nparrayNPARRAY