Boolean Reduce
All, any, none, exactly one, or majority
- boolean
- true_count
- count
Here's a sentence nobody wants to build by hand: four conditions all have to be true before the save fires. With the basic two-input AND node that means three ANDs daisy-chained, and every one of them is another node to read and another place to miswire. Boolean Reduce is the "fold all my conditions into one answer" node, and it handles up to 26 of them in a single box.
Under WAS Suite/Logic/Boolean, you pick a reduction from a dropdown and wire in any number of condition_a through condition_z sockets. The modes are the standard boolean folding operations plus the two nobody else bothers to ship:
all- every connected condition must be true. The multi-input AND.any- at least one true. The multi-input OR.none- every connected condition false.exactly one- precisely one true and the rest false. Great for "these options are mutually exclusive and I need to confirm it."majority- more than half true. The quality-gate workhorse: "if most of my checks pass, ship it."
Unconnected slots simply aren't counted, so the reduction always runs over what's actually wired - you can have a 26-condition node with three wires in it and it behaves as a 3-input node. With three wired and two of them true: all = false, any = true, none = false, exactly one = false, majority = true. The tooltip's own example, and worth internalising before you wire it backwards.
The outputs that make it diagnosable
Past the combined boolean, the node reports two numbers: true_count (how many connected conditions are actually true) and count (how many are connected). These are the difference between a magic black box and something you can debug. When a majority gate mysteriously refuses to fire, true_count tells you instantly that it's 2 of 5 instead of 3 of 5 - no guessing which condition flipped. Wire true_count into a Compare and you can even build thresholds that the dropdown doesn't offer, like "at least four of these six must pass."
The shape of real use
This is the natural companion to the suite's other boolean logic. You can chain it with itself - one Reduce collecting individual comparisons, its output feeding another Reduce that folds whole groups - though the design intent is to keep that from being necessary. Where people reach for it most: quality gating before a save (image dimensions sane AND seed not blacklisted AND detector found a face), multi-stage validation before a video encode, and the "should we even attempt this branch" checks that would otherwise be a wall of AND nodes.
The honest limit: every input is a plain boolean. If your inputs are values that need testing first - "is this width over 512", "does this text contain a keyword" - those tests are WAS Compare Any's job, and Compare Any feeds Boolean Reduce perfectly. Test first, reduce second, gate third.
Installing
Part of WAS Node Suite v3 (WASasquatch/was-node-suite-comfyui), WASasquatch's MIT suite, going since 2023 and one of the packs that's been in the essentials conversation from the start. Logic nodes like this one are pure plumbing: no packages to pip-install, no model weights, no config. It needs ComfyUI 0.14.0+ because v3 targets ComfyUI's newer node backend.
Via ComfyUI Manager, search WAS Node Suite v3, or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
Restart, and it's under WAS Suite/Logic/Boolean. Node missing after install? Update ComfyUI - on anything older than 0.14.0 the pack won't register.
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| reduction | COMBO | all | How the conditions combine. With 3 wired and 2 true: `all` = false, `any` = true, `none` = false, `exactly one` = false, `majority` = true. |
| condition_aopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_bopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_copt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_dopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_eopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_fopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_gopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_hopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_iopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_jopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_kopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_lopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_mopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_nopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_oopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_popt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_qopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_ropt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_sopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_topt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_uopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_vopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_wopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_xopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_yopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
| condition_zopt | BOOLEAN | false | One condition, `true` or `false`. An unconnected slot is not counted, so the reduction runs over what is actually wired. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| boolean | BOOLEAN | The combined answer. Wire it to any switch's boolean. |
| true_count | INT | How many connected conditions are true. |
| count | INT | Connected conditions. |