Nodes/opencv-comfyui/OpenCV getVersionMinor_0
ComfyUI Node

OpenCV getVersionMinor_0

The version number that actually changes under you

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV getVersionMinor_0
    • int

    The major version of OpenCV has sat at 4 for years, but the minor version is where the real action happens - 4.4, 4.7, 4.11 - and that's the number getVersionMinor_0 reports. It has no inputs and one INT output: the minor component of whatever OpenCV wheel is loaded in your ComfyUI environment. On a recent install that's 11 for OpenCV 4.11. The minor version is what actually gates feature availability, because OpenCV adds functions and parameters every minor release.

    Why the minor number matters here specifically

    This matters more for this pack than you'd think. opencv-comfyui is auto-generated from type definitions - it wraps whatever cv2 functions exist in your installed OpenCV at generation time. But the running OpenCV can differ from the one the nodes were generated against. If your opencv-contrib-python is older than what the pack expects, some nodes call functions that don't exist in your build and throw AttributeError at runtime. If it's newer, you're generally fine. So:

    • The minor version tells you whether a specific feature exists. The gradientSize parameter of goodFeaturesToTrack, for example, landed in OpenCV 4.4. If getVersionMinor_0 reports something under 4, the _2/_3 variants of that node are walking into missing functionality.
    • It's the number to quote when reporting a bug - "works on 4.9, breaks on 4.11" is a genuinely useful report.

    Where it fits in a workflow

    Realistically, this is a diagnostic node you add when something's wrong, not a permanent part of a generation graph. The pack's own README tells you to expect rough edges and version drift is a known source of them. If you're chasing a subtle failure, drop in getVersionMajor_0 + getVersionMinor_0, compare with the OpenCV docs page for the function you're using, and confirm your wheel actually matches.

    Install

    Standard pack install - ComfyUI Manager (search "opencv-comfyui") or:

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

    then restart. The pack's dependency is opencv-contrib-python, with numpy/torch already present. No models, no keys. And the usual startup gotcha: conflicting OpenCV packages give you Cannot import name 'guidedFilter' from 'cv2.ximgproc' - fix it by keeping exactly one OpenCV wheel installed, then re-check this node's output to confirm you're on the version you think you are.

    Categoryimage/OpenCV

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    intINT