TdxhOnOrOff
A dropdown that's secretly a 0 and a 1
- NUMBER
- INT
This is the simplest node in the pack and probably the one you'll actually use. TdxhOnOrOff is an ON/OFF dropdown that outputs NUMBER and INT - 1 when you pick ON, 0 when you pick OFF. That's all it does, and that's enough.
The reason it exists is that the TDXH efficiency nodes take bool_int inputs (0 or 1 integers) instead of booleans, and typing 0 or 1 into a small integer box is a lousy way to drive a workflow switch. Wire this node's INT output into any bool_int input and suddenly you're flipping a readable dropdown instead of nudging a number field. It also quietly solves the case where you want a value that starts as a switch but ends up somewhere that expects a numeric 1/0 - say a strength multiplier or a conditional branch that checks if value.
Two outputs, NUMBER and INT, both the same value. If the downstream node is one of the TDXH ones, grab INT. If it's pickier about types, grab NUMBER.
Installing it
Same as the rest of the pack. ComfyUI Manager → search tdxh_node_comfyui → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/youyegit/tdxh_node_comfyui
Then restart ComfyUI and find it under TDXH → tdxh_bool. It's a helper pack by a hobbyist (GPL-3.0, a couple of stars), and the README is upfront that node behavior can change between versions. No models, no extra dependencies beyond the pack's sentencepiece.
When to skip it
Honestly? If you're on a recent ComfyUI, TdxhToggleMaster does the same job with a real boolean checkbox and also outputs NUMBER and INT - strictly more useful for the same graph space. TdxhOnOrOff's one edge is self-documentation: "ON/OFF" reads more clearly in a shared workflow than a checkbox. Pick whichever fits your habits; neither is going to generate a single pixel on its own.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| ON_or_OFF | COMBO | 2 options: ON, OFF |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| NUMBER | NUMBER | — |
| INT | INT | — |