ComfyUI Node

BOOL ++

A boolean that hands you the answer in every type at once

By drmbt·Created 2 years ago·Updated 7 months ago· 6
BOOL ++
  • override_bool
  • override_on_false
  • override_on_true
  • BOOL
  • BOOL_STRING
  • INT
  • FLOAT
  • STRING
  • ANY
valuefalse
on_false0.0
on_true1.0

BOOL ++ is the little conditional mapper you didn't know you needed until you're mid-workflow and realize a sampler's control_after_generate or a text field wants an INT, a FLOAT, and a string version of the same toggle. Instead of chaining four conversion nodes, this one gives you all of them from a single boolean - plus a trick: you can override which values get returned when it's true or false.

What it does

Give it a value (a boolean, or wire in a switch from anywhere), and it answers in six flavors:

  • BOOL - the raw boolean itself
  • BOOL_STRING - "True" / "False" as text
  • INT and FLOAT - numeric representations, handy for weights, multipliers, and step counts
  • STRING - the on_true / on_false text you typed in, echoed through
  • ANY - the raw output value, which can be a number, string, or anything you pushed through an override

The two inputs that actually matter are on_true and on_false (defaults "1.0" and "0.0"). Those define what the numeric outputs return for each branch. Set on_true to 0.9 and on_false to 0.5 and you've built a strength switch: flip one boolean and a denoise or LoRA weight changes from high to low with zero conversion nodes in the path.

The overrides are the interesting part

The optional override_bool, override_on_true, and override_on_false inputs are typed as ANY, which means you can feed them from other nodes rather than hardcoding. Wire a slider into override_on_true and a different slider into override_on_false, and your boolean becomes a two-way picker between two live values - like a mini router that can't accidentally pass a mismatched type, because each output is already converted for you.

A word on how it converts: the source is careful about strings. "False", "false", "0", "0.0" and empty strings all evaluate to false; anything else becomes true. If you've ever been bitten by "0" being truthy in Python, this node handles that for you - the parse happens before the branch, so the INT/FLOAT outputs come out right.

Install and the one real caveat

It's one node in the grab-bag pack drmbt/comfyui-dreambait-nodes. ComfyUI Manager (search "comfyui-dreambait-nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/drmbt/comfyui-dreambait-nodes

then restart ComfyUI. The honest caveat: this pack is a collection of forks and utilities, so its requirements.txt drags in heavyweight stuff (transformers, bitsandbytes, librosa) even though a boolean node needs none of it. If you're installing just for this, expect a bigger pip install than the node justifies - it's the price of the bundle.

Honestly, if you just need "swap between two numbers," a plain Switch node is simpler. Reach for BOOL ++ when you need the same condition expressed across multiple types at once, or when you want the live-value override routing. That's the case it's built for.

CategoryDRMBT nodes

Inputs (6)

NameTypeDefaultDescription
valueBOOLEANfalse
on_falseSTRING0.0return value if false
on_trueSTRING1.0return value if true
override_boolopt*override any type float int or legal float wrappable string value to number
override_on_falseopt*override any type float int or legal float wrappable string value
override_on_trueopt*override any type float int or legal float wrappable string value

Outputs (6)

NameTypeDescription
BOOLBOOLEAN
BOOL_STRINGSTRING
INTINT
FLOATFLOAT
STRINGSTRING
ANY*