Nodes/opencv-comfyui/OpenCV flip_1
ComfyUI Node

OpenCV flip_1

The duplicate flip node, and what it says about this pack

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV flip_1
  • src
  • dst
  • nparray
flipCode

flip_1 is flip_0 wearing a different label. Same node code, same inputs, same output - in the current release the two are identical, because the generator that built this pack emitted one node per OpenCV overload and flip's overloads collapsed into the same thing. You can use either one and get the same result. So the only question worth answering is: what does the node itself do?

It flips an image. That's it. It's the cv2.flip function as a ComfyUI node, and it's one of the handful of genuinely simple nodes in this otherwise rough-edged auto-generated pack.

Inputs and outputs

  • src (NPARRAY) - the image to flip (convert from Comfy IMAGE via Image2Nparray first).
  • flipCode (INT) - the entire control surface: 0 flips vertically (upside down), 1 flips horizontally (mirror), -1 flips both (180°). The naming is the classic OpenCV gotcha - 0 is vertical, 1 is horizontal - and it will bite you exactly once.
  • dst (NPARRAY, optional) - an OpenCV out-parameter; the README says to ignore these, so ignore it.

Output is nparray, the flipped image, ready for Nparrays2Image.

Installing

Comes with geroldmeisinger/opencv-comfyui. ComfyUI Manager: search "opencv-comfyui". Or:

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

Restart ComfyUI. The pack installs opencv-contrib-python (with numpy and torch) from its requirements.txt.

Common issues

The pack's standing rules: single-image batches only (batch_size==1 or Image2Nparray throws), and remember the whole chain is IMAGE → Image2Nparray → flip → Nparrays2Image → IMAGE. OpenCV lives in BGR while Comfy lives in RGB; skip cvtColor or the conversion nodes and you'll be debugging channel swaps on a node that otherwise can't fail.

The bigger point is the duplicate itself. This pack wraps ~635 functions with zero hand-tuning, so you get artifacts: redundant _0/_1 nodes, composite-type results spat out as strings, parameters with no tooltips. The author's README is disarmingly honest about all of it - "ugly and complex to use. Expect dragons!" - and the flip pair is the mildest dragon in the cave. If you need a mirror, grab either variant. If the duplication bothers you, that's the pack's design philosophy talking, and the author is literally asking for feedback to make it better.

Categoryimage/OpenCV

Inputs (3)

NameTypeDefaultDescription
srcNPARRAY
flipCodeINT
dstoptNPARRAY

Outputs (1)

NameTypeDescription
nparrayNPARRAY