Nodes/opencv-comfyui/OpenCV setWindowProperty_0
ComfyUI Node

OpenCV setWindowProperty_0

Fullscreen and friends on a window that may not exist

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV setWindowProperty_0
    • unknown
    winname
    prop_id
    prop_value

    setWindowProperty_0 sets a property on an OpenCV HighGUI window - fullscreen, autosize, aspect ratio, that sort of thing. And like the rest of this pack's window nodes, it only works in the specific scenario where OpenCV is showing real desktop windows on the machine running ComfyUI.

    The underlying call is cv2.setWindowProperty(winname, prop_id, prop_value), and the inputs map straight onto it:

    • winname - STRING, the window you're configuring.
    • prop_id - INT, which property. 0 is WND_PROP_FULLSCREEN, 1 is WND_PROP_AUTOSIZE, 2 is WND_PROP_ASPECT_RATIO, 3 is WND_PROP_OPENGL. The one people actually mean when they use this node is 0.
    • prop_value - FLOAT, the value for that property. For fullscreen, 1 (WINDOW_FULLSCREEN) or 0 (WINDOW_NORMAL).

    Output is None (unknown in the schema) - pure side effect, nothing to wire.

    Now the reality check, and it's the same one that applies to setTrackbarPos and friends: HighGUI windows are pop-ups on a real display. In the way most people run ComfyUI - as a server, headless, or on a machine they're not physically in front of - there are no such windows, and this node silently does nothing. Even on a desktop install, you'd need a sibling node (like namedWindow) to have created the window first. Found it in a downloaded workflow? It's scaffolding from someone's live OpenCV experiment; you can delete it, since nothing consumes its None output.

    If your actual goal is "show a big preview" or "make a window fullscreen," ComfyUI already does that properly - its own preview and image-view nodes are built for the node graph and don't need a display attached to the server's Python process. This node is the auto-generated version of a GUI API call that was never designed to live in a server-side graph.

    The pack's install is the same everywhere: ComfyUI Manager → search "opencv-comfyui", or git clone https://github.com/geroldmeisinger/opencv-comfyui into ComfyUI/custom_nodes, restart. Dependencies are opencv-contrib-python, numpy, torch. If startup throws Cannot import name 'guidedFilter' from 'cv2.ximgproc', another node's conflicting OpenCV build is the cause - uninstall the duplicate.

    Honest verdict: skip it unless you're running desktop ComfyUI and actively live-debugging with OpenCV windows. For everyone else this is one of the pack's completeness artifacts - the author admits the generated nodes are ugly and not all of them make sense in ComfyUI, and the window-management family is the clearest example of that.

    Categoryimage/OpenCV

    Inputs (3)

    NameTypeDefaultDescription
    winnameSTRING
    prop_idINT
    prop_valueFLOAT

    Outputs (1)

    NameTypeDescription
    unknownNone