Nodes/opencv-comfyui/OpenCV getVersionRevision_0
ComfyUI Node

OpenCV getVersionRevision_0

The build number nobody asked for

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

    getVersionRevision_0 is the most technical of OpenCV's version-reporting nodes, and the one you'll use least. No inputs, one INT output: the revision/build component of the loaded OpenCV. For official release builds this is the patch/build number - in 4.11.0 that's the 0. For custom and developer builds it can be the git commit hash converted to a number or some build artifact, so its meaning is looser than the major and minor components. If you're running a normal pip-installed opencv-contrib-python, this output will almost always be 0 and never change.

    What it's actually for

    In the OpenCV ecosystem, the revision number matters in exactly one scenario: you're trying to identify a specific pre-release or custom build. Two OpenCV installs can share the same major.minor (both 4.11) yet differ in a meaningful way - one is a nightly with fixes, one is the stable release - and the revision is what tells them apart. It's the kind of detail a library maintainer needs and a user almost never does. Inside a ComfyUI graph, that value is essentially nil. There's no workflow you'd build around "if revision is odd, take the other branch."

    The honest framing: this node exists because the pack's auto-generator wrapped every top-level cv2 function it could parse, and cv2.getVersionRevision happened to be one of them. It's a faithful port of a real function whose use case is "identify a specific OpenCV build," which is a C++ build-debugging concern that doesn't survive contact with a node graph.

    How it fits with its siblings

    The version family in this pack is: getVersionMajor_0, getVersionMinor_0, getVersionRevision_0, and getVersionString_0. If you only ever use one, make it getVersionString_0 - it returns the whole 4.11.0 as a single readable string, which is everything the three numeric nodes give you in one place. The only time the split versions win is if you need a numeric INT for a comparison in another node. The revision, specifically, adds nothing on top of that for a typical user.

    Install

    Same pack, same steps:

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

    or ComfyUI Manager, search "opencv-comfyui". Requires opencv-contrib-python; numpy and torch come with ComfyUI. No models, no keys. If you're diagnosing environment issues, the version to care about is major and minor - check those. The revision is trivia: satisfying to know it exists, and nothing you should build around.

    Categoryimage/OpenCV

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    intINT