Widget To Boolean Ovum
Read any node's widget as true/false
- any_input
- BOOLEAN
Somewhere in your workflow a KSampler has a seed widget, a checkpoint loader has a name, a LoRA node has a toggle - and you want that value somewhere else, as a proper typed boolean. Widget To Boolean Ovum reads a widget off any node in your graph and outputs its value as BOOLEAN. It's one of three typed variants in the pack (Int and Float are its siblings), all modeled on KJNodes' WidgetToString - the category is literally ovum/KJNodes - with the cast-to-primitive twist.
The realistic job: pull a flag like use_hires_fix or a model toggle off some node and drive an IfElse or a switch downstream without re-wiring everything. Instead of manually duplicating a value into a constant node, you read it straight from where it already lives. It's a "don't repeat yourself" node, and for a graph editor that's genuinely useful.
How it works
Under the hood it reads your workflow's serialized data (via the pack's MetadataProcessor) to find the target node and extract the widget value, then casts it to boolean. The cast rules are forgiving: true/1/yes/on → True, false/0/no/off/empty → False, and it falls back to Python truthiness for anything else.
Finding the node is the fiddly part, and there are three ways:
- By node id (
id): exact and unambiguous, but ids are only visible if you enable node-id display - the author notes it's done from the Manager badge menu. - By node title (
node_title): search by a manually-set title. Titles only work if they've actually been edited; auto-generated titles don't count. - By the
any_inputlink: if you wire anything from the target node intoany_input, the node uses that link's origin. This is the recommended path because it also forces the target to exist and run before this node - the input's real purpose is execution ordering, as the description spells out.
Inputs and output
id- STRING (required).widget_name- STRING (required), the widget's name as Comfy knows it.return_all- BOOLEAN (required, defaultfalse). Flip on to get all of the node's widget values back (cast) instead of just the one.any_input-*(optional), the ordering/lookup anchor.node_title- STRING (optional).- Output:
BOOLEAN.
Install
Manager: search comfy-ovum, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Restart. No model downloads; nothing special in the pack's requirements for this node.
Gotchas worth knowing
If id and node_title are both blank, the any_input link is the only lookup mechanism - wire it or the node has nothing to find. And remember the any_input is really about ordering: it guarantees the upstream node executed before this one reads its widget, which is exactly the failure mode you'd otherwise hit on a re-run. Use it, and this little reader becomes one of the more trustworthy utilities in the pack.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | — | |
| widget_name | STRING | — | |
| return_all | BOOLEAN | false | — |
| any_inputopt | * | — | |
| node_titleopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |