Checkbox Logic (VixUI)
The Visionatrix checkbox that also switches your whole graph
- input_off_state
- input_on_state
- output_to
VixUiCheckboxLogic is what you get when you cross the VixUiCheckbox control with a routing switch. It's a checkbox with all the Visionatrix UI metadata - display_name, optional, advanced, order, custom_id - and it's also a lazy two-way switch that sends either input_off_state or input_on_state out its single output_to port depending on whether the box is checked.
In a Visionatrix flow, that means one checkbox does two jobs: it's a control a user flips, and it's the thing that decides which execution path the workflow takes. The README's framing - "two modes and paths of workflow execution" - is exactly this: a "Do inpainting?" box that routes the pipeline into an inpaint branch when ticked.
It's the Visionatrix-flavored twin of VixCheckboxLogic; same switch mechanics, plus the metadata that makes it render as a control in the simplified UI.
Inputs that matter
- state (BOOLEAN, default
false) - the value of the checkbox.false→ off branch,true→ on branch. - input_off_state (*) and input_on_state (*) - the two branches. Wire each to the subgraph you want for that state. They're lazy, so only the active one is computed.
- display_name (default
"Display Name"), optional, advanced, order (default99), custom_id - the control metadata Visionatrix renders.
hidden is the optional input if you want the control invisible.
Outputs
output_to (*) - the chosen branch's value, passed through unchanged. Any type: model, conditioning, text, image.
How it works
Same lazy-switch pattern as VixCheckboxLogic: check_lazy_status tells ComfyUI to only evaluate the active branch's input, then do_it returns that input. The UI fields ride along as metadata for Visionatrix. In plain ComfyUI it's simply a checkbox that switches - the extra fields are inert but harmless.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Visionatrix/ComfyUI-Visionatrix
Restart ComfyUI, or install ComfyUI-Visionatrix via ComfyUI Manager. No model downloads; deps are torch, pillow, numpy.
Gotchas
The classic mistake is wiring both branches into the same output that the other branch also needs - because only one branch runs, you can end up with a node that "sometimes doesn't feed." Design your two paths to be independent subgraphs. Also remember state defaults to false, so the off branch is what runs out of the box - if your default should be "on," set the default state before publishing. And keep VixCheckboxLogic vs. VixUiCheckboxLogic straight: when you're building a Visionatrix flow, use this one; the plain version is for logic with no UI.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| state | BOOLEAN | false | — |
| display_name | STRING | Display Name | — |
| optional | BOOLEAN | true | — |
| advanced | BOOLEAN | true | — |
| order | INT | 99 | — |
| custom_id | STRING | — | |
| input_off_stateopt | * | — | |
| input_on_stateopt | * | — | |
| hiddenopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_to | * | — |