TdxhBoolNumber
The AND-gate that lets one switch rule a whole branch
- NUMBER
- INT
TdxhBoolNumber is the "guest" half of the TDXH master/guest toggle idea, and underneath it's just a two-input boolean AND-gate with a kill switch. You feed it a bool_int (0 or 1) and a bool_int_from_master (0 or 1), and it hands back a single 0/1 you can wire into anything that expects one.
The interesting part is control_by_master, a plain ON/OFF dropdown. Leave it OFF and the node is a pure pass-through - whatever bool_int gets, the output gets. Flip it ON and the output becomes bool_int AND bool_int_from_master: both inputs have to be 1 for the output to be 1. That's the whole node, and it's genuinely enough.
Why would you want that? ComfyUI has no native concept of "one switch rules a group of switches." This is the workaround. Say your workflow stacks a few other TDXH nodes - a LoRA loader, a ControlNet apply, a reference node - each carrying its own bool_int on/off. Put a TdxhBoolNumber in front of each one's switch, run one master toggle into every bool_int_from_master, and a single flip now disables the entire branch without you deleting or rewiring anything. Same pattern the pack's own TdxhToggleMaster/TdxhToggleGuest pair implements with real booleans; this is the integer-flavored version, which matters because TDXH nodes take bool_int inputs, not booleans.
The two outputs, NUMBER and INT, carry the same value in two types. Feed the INT into the bool_int inputs of the other TDXH nodes; use the NUMBER where a pickier node asks for it. If you'd rather have checkboxes than 0/1 integers, use the ToggleMaster/ToggleGuest family instead - same logic, nicer widgets.
Installing it
The whole pack installs at once. Easiest path is ComfyUI Manager - search for tdxh_node_comfyui and install, then restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/youyegit/tdxh_node_comfyui
pip install -r tdxh_node_comfyui/requirements.txt # just sentencepiece
Restart ComfyUI and the node sits under the TDXH menu group. Fair warning from the README itself: this is a personal helper pack (a couple of stars, GPL-3.0) and the author doesn't guarantee nodes stay stable between versions. The only node in it that needs a model download is TdxhStringInputTranslator; everything else, this one included, is pure logic.
When to skip it
If you're not building master/guest hierarchies, a stock toggle does the same job with fewer moving parts. TdxhBoolNumber earns its keep in exactly one scenario: you've got a family of TDXH nodes and you want one big switch that turns a whole branch off without deleting it. That's literally what the author built it for.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| bool_int | INT | 10–1 | — |
| bool_int_from_master | INT | 10–1 | — |
| control_by_master | COMBO | OFF | 2 options: ON, OFF |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| NUMBER | NUMBER | — |
| INT | INT | — |