EmAySee Checkbox to Float
Checkbox to Float — a boolean in, a 1.0 or 0.0 out, zero surprises
- CHECKBOX_VALUE
Some ComfyUI nodes insist on a FLOAT input when what you actually want is an on/off switch. EmAySee Checkbox to Float exists for exactly that mismatch: it gives you a checkbox in the UI, and when checked it outputs 1.0, unchecked it outputs 0.0.
Where does that come up? Strength parameters, mostly. Things like denoise or conditioning weights often take a float in the 0–1 range, and a checkbox is a nicer mental model than typing 0 vs 1 when you're toggling between "use it" and "don't use it." It's also a clean way to multiply a value: wire the output into a math node and you've got a master enable/disable switch that scales whatever it's wired to, no if-else logic needed.
The name is a slight lie in one direction - it's not a checkbox that holds a float, it's a checkbox that becomes a float. The node's own input label spells it out: "Enable (Outputs 1.0)." There are no intermediate values. Checked = 1.0, unchecked = 0.0, done.
How it works
The implementation (py/EmAySee_CheckboxFloatNode.py) is a two-branch if. Boolean True returns (1.0,), False returns (0.0,). That's the whole mechanism - which is exactly what you want from a conversion node, because there's nothing to tune and nothing to break.
The inputs that matter
- checkbox_input - a BOOLEAN, rendered as a checkbox, default off.
Output is CHECKBOX_VALUE, a FLOAT that's either 1.0 or 0.0. Wire it into anything that takes a strength/weight float, or into a math node if you want it to scale another value.
Install
Part of the EmAySee pack - one person's 60+ node grab-bag with zero extra pip dependencies. Install once:
cd ComfyUI/custom_nodes
git clone https://github.com/EmAySee/ComfyUI_EmAySee_CustomNodes
Restart ComfyUI (or use ComfyUI Manager and search "ComfyUI_EmAySee_CustomNodes"). It shows up under EmAySee_Utils.
Gotchas
Not much to trip on. One thing to know: some other packs ship a checkbox-to-float that lets you configure the two output values; this one doesn't - it's hardcoded to 1.0/0.0, so if you need 2.0/0.0 you're either picking a different node or multiplying the output. And remember it's a hobby pack with no support and no guarantee (the README says so in as many words), so if you use it in a workflow you're shipping to others, this is a node they'll need to install too. Keep that in mind before you scatter it everywhere.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| checkbox_input | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CHECKBOX_VALUE | FLOAT | — |