π§ Simple Condition
Simple Condition (ComfyUI Essentials)
- evaluate
- on_true
- on_false
- result
A little if/else for your graph. Simple Condition looks at a value you give it and, depending on whether that value is true, passes along one thing or another. It's the closest thing the Essentials pack has to a branch - a way to make a workflow pick between two options instead of hardcoding one.
Why you'd reach for it
ComfyUI is a dataflow graph, not a program, so "do this only if that" is awkward by default. Simple Condition gives you a clean choice point: feed it a condition and two candidate values, and it outputs whichever one the condition selects. Typical uses are picking between two settings based on some computed flag - one denoise value if a toggle is on, another if it's off; one prompt or another; one size or another. It's a switch you can drive from elsewhere in the graph rather than flipping by hand, which is what makes a workflow adapt to its inputs.
How it works
It's a ternary: evaluate is the condition, on_true is what to output when the condition holds, on_false is what to output otherwise. If evaluate is truthy - a non-zero number, essentially - you get on_true; if it's zero/false, you get on_false. All three ports are the wildcard type (*), so it doesn't care whether you're switching between numbers, strings, or other values - it just routes one of the two through.
Inputs and outputs
Required: evaluate (the condition) and on_true (the value passed when the condition is true). Optional: on_false (the value passed when it's false). The single output is result, again wildcard-typed, carrying whichever input won. Because the ports are untyped, you connect them to whatever kind of value you're choosing between - just keep the two candidates the same kind as what the downstream node expects.
Installing it
Part of ComfyUI Essentials by cubiq (Matteo Spinelli, of IPAdapter fame). Install through ComfyUI Manager (search ComfyUI Essentials, restart) or:
cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_essentials
then restart. It's π§ Simple Condition under essentials/utilities, class SimpleCondition+. The pack's been maintenance-only since April 2025.
Common issues
The wildcard typing is the double-edged bit. It's flexible, but ComfyUI won't warn you if on_true and on_false are different kinds of thing than the target node wants - you'll only find out at run time. So keep both branches the same type and make sure that type matches downstream. The other snag is the condition itself: evaluate is a value, not a comparison operator, so you usually compute the true/false upstream (a Simple Math expression that returns 1 or 0, for instance) and feed that in. If your branch always picks the same side, check what you're actually feeding into evaluate - it's probably constant.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| evaluate | * | 0 | β |
| on_true | * | 0 | β |
| on_falseopt | * | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | * | β |