Compare Anything
The true/false test that decides when a Cyclist loop stops
- thing1
- thing2
- BOOLEAN
Compare Anything takes two inputs of any type, a comparison operator, and outputs a single boolean: true or false. In a Cyclist loop it's the decision node - the thing that turns "is this good enough?" into a true that an Interrupt node can act on. Recall your score, compare it to your target, feed the boolean to Interrupt, and the loop stops itself. That's the spine of every "generate until it's actually good" workflow in the pack.
The clever part: it compares anything
The reason it's called Compare Anything is that both inputs are wildcards, and the node has rules for whatever you throw at it. From the author's own docs:
- Integers compare as normal numbers.
- Floats compare with a tiny tolerance (~1e-09) instead of exact equality - which is the right call, because exact float
==is a classic footgun. - Strings compare alphabetically.
- Images and latents compare by total pixel count across the whole batch - so "greater than" means "more pixels," useful for a grow-until-big-enough upscale loop.
- Anything else gets cast to a string first.
- If the two inputs are different types, it tries to coerce them into a common type, in the order boolean → float → string.
That last rule is worth internalising, because it's where surprises come from: comparing mismatched types quietly casts them, and the result may not be what you meant.
The inputs that matter
condition(enum) - one of six:equals,not equals,greater than,less than,greater or equals,less or equals.thing1(*) - first value.thing2(*) - second value.
Output is a single BOOLEAN. For the ordered comparisons the direction is thing1 <condition> thing2 - so "greater than" is true when thing1 > thing2.
Install
- ComfyUI Manager: search comfyui-cyclist, install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/Pos13/comfyui-cyclist, restart.
Pure Python, nothing to download.
Where it gets fiddly
The mixed-type coercion is powerful but it's also the thing that'll confuse you. If a comparison keeps coming out the "wrong" way, check whether your two inputs are actually the same type - the boolean → float → string casting order can turn a comparison into something you didn't intend. When in doubt, cast both sides yourself with Convert to first so you know exactly what's being compared.
The image/latent "compare by pixel count" behaviour is genuinely handy for size-based stop conditions but useless for content - it can't tell you an image got better, only bigger. For quality you still need an external scorer (ImageReward, an aesthetic model) feeding a float in.
And the standing caveat: Cyclist is archived and unmaintained. Compare Anything is the second-cleverest node in the pack after Interrupt, and it still works - just don't expect fixes if a future ComfyUI version changes how wildcard inputs behave.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| condition | COMBO | 6 options: equals, not equals, greater than, less than, greater or equals, less or equals | |
| thing1 | * | — | |
| thing2 | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |