and
Proceed only if both of these are true
- BOOLEAN
"Proceed only if both of these are true." That's the entire job of and, and it's one of the most-used nodes in Basic data handling, StableLlama's zero-dependency pack. Once your workflow grows past a single branch, you start collecting booleans - "image loaded?", "face detected?", "seed is even?" - and at some point you need to combine two of them into one gate. This is that node.
How it works
It's the logical AND from every truth table you've ever seen: the output is true only when both inputs are true. In Python terms it's input1 and input2. Nothing else - no coercion, no side effects. Both inputs are plain BOOLEANs and the output is a plain BOOLEAN, so you can chain these (and other logic nodes) into arbitrarily deep condition trees.
One behavior worth knowing: the inputs are marked forceInput, which means they show up as sockets you wire, not as toggles you click. That's deliberate - the pack wants you to build conditions out of actual nodes. If you need a literal true/false to feed one, use ComfyUI's core primitive value node or another logic node to produce it.
The inputs and the output
input1(BOOLEAN, default False) - first condition.input2(BOOLEAN, default False) - second condition.BOOLEAN(output) - true only when both are true.
That's the whole surface. Combine it with or, not, and the pack's comparison nodes and you can express almost any condition your workflow needs.
Installing it
Install Basic data handling via ComfyUI Manager (search "Basic data handling"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling
Restart ComfyUI. No dependencies, no models - the pack is about as risk-free an install as exists in this ecosystem.
Troubleshooting
- "Output is false when I expected true." With AND that means at least one input is false - trace both wires. The classic trap is an unconnected input reading as its default (
False), which permanently pins the result to false. If you genuinely have only one condition, you don't need AND at all - wire it straight through. - "The sockets won't accept my value."
forceInputmeans this node wants BOOLEAN-typed values from other nodes. If you're feeding it a number or a string, cast it first with the pack'sto BOOLEANnode. If you're feeding it nothing - well, that's the default-false trap above. - Inputs feel like widgets, not sockets? The
forceInputflag can behave differently across ComfyUI frontend versions. If you're on a build where these render as toggles, right-click and check "convert to input" so you can actually wire conditions in.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | BOOLEAN | false | — |
| input2 | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |