AIHub Expose Boolean
Exposing a checkbox to the app that's driving your workflow
- BOOLEAN
AIHub Expose Boolean is the simplest node in the whole pack: it exposes one true/false toggle to the external app driving the workflow. The client shows it as a checkbox, the user flips it, and the value shows up in the graph as a BOOLEAN output you can wire into a sampler condition, a bypass toggle, or a "use fallback" switch. If you've used any of the other "expose" nodes in otavanopisto's ComfyUI-aihub-workflow-exposer, this is the same idea with the smallest possible data type.
The mental model for the whole pack, once: it turns ComfyUI into the generation engine inside another application. Expose nodes are the inputs - the client's values arrive over the pack's own websocket (port 8111) and are fed into the workflow as node values. In the stock web UI these look like ordinary widgets, which is exactly the point: the same workflow runs in the UI or inside a client app.
How it works
The client sends the boolean over the websocket; the node's function returns it straight through as the BOOLEAN output. There's no transformation - a true stays true. The node also carries the metadata (id, label, tooltip, advanced flag, sort index) that tells the client how to render the field in its own UI. All the interesting behavior lives in that metadata, not in the tiny bit of pass-through logic.
The inputs that matter
- id - the unique field id. This is the contract with the client and with condition expressions, so make it unique within the workflow and don't rename it casually.
- label - the text shown in the client UI ("Enhance details"). This is what the user sees; the id is what the code sees.
- tooltip - optional helper text shown on hover.
- value - the default value when the field isn't set yet (default false).
- advanced - if true, the client hides this field under an "advanced" section. Good for toggles most users shouldn't touch.
- index - field ordering in the client's UI; lower numbers first.
The output
- BOOLEAN - the value, ready to wire into a
booleaninput anywhere in the graph.
Installing it
ComfyUI Manager (search "ComfyUI-aihub-workflow-exposer"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
# restart ComfyUI
No dependencies, no downloads.
Where people get burned
Two things, and they're about discipline rather than mechanics. Keep ids unique and stable - if you duplicate an id or rename it, the client's fields get confusing and condition expressions silently reference the wrong thing. And remember the value only changes when a client is actually driving the run: in the stock UI it behaves like a plain boolean widget with a default, which is fine for testing and misleading for production. The pack's expose nodes are the seam between the UI you see and the client that matters.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | boolean | A unique custom id for this workflow. |
| label | STRING | Boolean | This is the label that will appear in the field. |
| tooltip | STRING | An optional tooltip for this input. | |
| value | BOOLEAN | false | — |
| advanced | BOOLEAN | false | If set to true, this option will be hidden under advanced options for this workflow. |
| index | INT | 0 | This value is used for sorting the input fields when displaying; lower values will appear first. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |