OpenCV currentUIFramework_0
CurrentUIFramework_0 — a node that tells you which GUI OpenCV thinks it has
- string
currentUIFramework_0 wraps cv2.currentUIFramework(), a function that returns the name of the UI toolkit OpenCV's highgui module was built against - think "qt", "gtk", "win32", "cocoa", or "none". It takes no inputs and outputs one STRING. That's the whole thing. This is the purest example in the pack of auto-generation producing a node nobody asked for: the author scraped every top-level cv2 function, and currentUIFramework() is an environment-introspection one-liner that got promoted to a ComfyUI node like everything else.
Why does this function exist in OpenCV at all? Because cv2.imshow/namedWindow need a windowing backend, and which one you get depends on how your OpenCV build was compiled. currentUIFramework() exists so you can check which backend is active. In ComfyUI - which runs headless by default and never pops native windows - that information is almost always a non-answer. ComfyUI is a web UI, not a desktop app; OpenCV's GUI layer isn't doing anything, so on a normal headless install this returns "none".
When would you use it?
Let's be blunt: for almost everyone, never. It's a diagnostic curiosity. The one semi-realistic case is debugging - if some workflow depends on OpenCV's GUI functions (this pack even wraps imshow, namedWindow, destroyAllWindows - functions that are useless and error-prone in a headless server context), checking currentUIFramework_0 tells you instantly whether any of them can possibly work. If it returns "none", that whole family of nodes is dead on arrival on your machine, and you should stop trying to make imshow pop a window.
Otherwise: it's a string. You can display it, log it, branch on it. You almost certainly won't.
The spec
- Inputs: none. No
src, no knobs. You can't misconfigure it. - Output:
string- one of the framework names. Expect"none"on a headless ComfyUI server; possibly"qt"/"gtk"on a desktop install depending on build flags.
Install
Ships with opencv-comfyui. ComfyUI Manager → search opencv-comfyui → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
Restart. Needs opencv-contrib-python, numpy, torch. No models.
Anything to watch?
The one trap is expecting it to do something. It's a sensor, not an actor - it reports, it doesn't change anything. If you came here hoping for a "make OpenCV windows work in ComfyUI" button, this isn't it; that problem is about highgui needing a display server, and no node fixes that. Take the string, know your environment, move on. Sometimes the best summary of a node is "it's a thermometer."
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |