Nodes/opencv-comfyui/OpenCV displayOverlay_0
ComfyUI Node

OpenCV displayOverlay_0

Draws text on an OpenCV window you probably don't have

By geroldmeisinger·Created about a year ago·Updated about a year ago· 35
OpenCV displayOverlay_0
    • unknown
    winname
    text
    delayms

    displayOverlay_0 calls cv2.displayOverlay(winname, text, delayms) - an OpenCV HighGUI function that draws a line of text over a live named window for a set number of milliseconds. It's a desktop-GUI tool for putting status text on top of a video preview. And in ComfyUI, where image output happens in the browser and the backend is often headless, there is no such window, so this node is essentially a function that writes text onto nothing.

    Let me be direct about where this node sits, because it's representative of a whole corner of the opencv-comfyui pack. The pack auto-generates a node for ~635 top-level OpenCV functions and doesn't filter for usefulness inside ComfyUI. The HighGUI family - displayOverlay, displayStatusBar, destroyWindow - are the clearest victims of that policy. They talk to a GUI event loop that needs a real display and a window created by cv2.namedWindow() or cv2.imshow(), and none of that exists in a typical ComfyUI run. There is no reddit thread about this node because nobody is hitting it; it's the pack's auto-generator sweeping up everything with a signature.

    Inputs: winname (STRING, the target window's title), text (STRING, what to draw), delayms (INT, how long in milliseconds it displays). Output: None, labeled unknown in the schema - there's nothing to wire onward, which should tell you the node is a side effect, not a data producer.

    The one scenario where it's not pure noise: you're running ComfyUI on a local machine with a display and you've got a live OpenCV preview window open from some other mechanism (a camera or video processing chain that uses imshow). Then displayOverlay_0 can slap progress text onto that window - like a burned-in "frame 47/200" label. That's a real-but-narrow use case, and it requires you to already be running HighGUI windows, which is itself unusual in this ecosystem. On a headless server or a remote install, the call does nothing visible (OpenCV tolerates overlaying on a missing window silently in most builds), so it won't crash your workflow - it just won't do anything you can observe.

    Install: same as every node in the pack - it ships in geroldmeisinger/opencv-comfyui:

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

    or ComfyUI Manager → search "OpenCV", then restart. Needs opencv-contrib-python; the conflicting-wheels Cannot import name 'guidedFilter' error will block the whole pack if it bites.

    Verdict: leave displayOverlay_0 in the search results. If you want text overlaid on an image you're generating, that's a different job (drawing on the pixels, not on a GUI window) and this node isn't it.

    Categoryimage/OpenCV

    Inputs (3)

    NameTypeDefaultDescription
    winnameSTRING
    textSTRING
    delaymsINT

    Outputs (1)

    NameTypeDescription
    unknownNone