Condition Checker
The little comparator that gives your graph an if/else
- result
Every workflow eventually needs a decision: is this CFG above 7, does the filename contain "v2", is the denoise strength high enough to bother with an upscale pass? ComfyUI gives you no native comparison node worth using, so you end up hand-rolling boolean logic or reaching for a big switch pack. Condition Checker is the small, typed comparator that turns a comparison into a single BOOLEAN output you can feed straight into Condition Assignment (same pack) or any boolean-driven node.
It's nothing exotic - which is the point. You pick a data type, pick a condition, plug in two values, get one true/false.
How it works
The node is organized around a data_type switch (String, Int, or Float). You select the type and it evaluates the pair of inputs for that type using the selected condition. The comparison happens at graph-execution time, and the node's IS_CHANGED method makes sure the output updates whenever any of its inputs change - so you don't have to force a re-run after tweaking a value.
Inputs that matter
- data_type -
String,Int, orFloat. This determines which input pair is actually compared. Switching it re-reads the other inputs. - condition -
equals,contains,not_equals,greater_than, orgreater_or_equal. Pick honestly: for String, onlyequals,contains, andnot_equalsdo anything meaningful. For Int/Float,greater_thanandgreater_or_equaljoin the party, andcontainsisn't supported. - string1 / string2, int1 / int2, float1 / float2 - the value pairs. Note the quirk in
contains: an emptystring2inside a non-emptystring1returns false (it's a real substring check, and empty string isn't a "hit"). If both are empty, it returns true.
Output: result, a BOOLEAN. That's it - one wire.
Install
Same as every node in this pack - ComfyUI Manager (search "ComfyUI-AutoFlow") or:
cd ComfyUI/custom_nodes
git clone https://github.com/ZXL-Xinram/ComfyUI-AutoFlow
Restart after cloning. No models, no new Python packages; it only uses stdlib plus ComfyUI's own type definitions.
Where people get burned
- Selecting a condition the type can't do.
greater_thanon a String doesn't error - it just returns false and prints a warning to the console. Easy to miss if you're not watching the terminal. - It's a comparator, not a gate. The output is a value; it doesn't pause or skip execution. To actually branch on the result, wire it into Condition Assignment or a switch, and remember both sides of a branch still execute in this pack (see that node's notes).
- No less-than. The condition list covers equals, not-equals, contains, greater-than, greater-or-equal. If you need
less_than, swap the operands and usegreater_than.
For a beginner the honest take: this node is a convenience, not a necessity - the same logic is three nodes deep in most big utility packs. But if you're already installing AutoFlow for its path and string helpers, the Condition Checker + Condition Assignment pair gives you a tiny, readable branch primitive without pulling in another dependency. That's worth something.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| data_type | COMBO | String | 3 options: String, Int, Float |
| condition | COMBO | equals | 5 options: equals, contains, not_equals, greater_than, greater_or_equal |
| string1opt | STRING | — | |
| string2opt | STRING | — | |
| int1opt | INT | 0-999999–999999 | — |
| int2opt | INT | 0-999999–999999 | — |
| float1opt | FLOAT | 0.00-999999–999999 | — |
| float2opt | FLOAT | 0.00-999999–999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | BOOLEAN | — |