Eden_Compare
Compare any two values and get a real boolean out
- a
- b
- boolean
Here's a quietly frustrating ComfyUI gap: comparing two values - is this count greater than that threshold? is this sampler name equal to that one? - and getting a boolean you can branch on is oddly rare in stock ComfyUI. Eden_Compare fills it, and it does it properly: its two inputs are typed as wildcard *, so it happily compares ints, floats, strings, or anything else you throw at it. Numbers in, strings in, a clean BOOLEAN out.
It's the value-comparison sibling of Eden_BoolBinaryOperation. Where that node does boolean algebra (AND/OR/XOR on true/false), this one does relational comparisons (==, !=, <, >, <=, >=) on arbitrary values. Two different jobs, and this one is the "does this thing match that thing" decision-maker.
How it works
You give it a and b (any types, both defaulting to 0) and pick a comparison from the dropdown:
- a == b, a != b - equality. Works across strings, numbers, and even some structured values, because it's a plain Python comparison.
- a < b, a > b, a <= b, a >= b - ordering. Meaningful for numbers and strings; for weird types, Python's comparison rules decide, which is usually fine.
The output is a single BOOLEAN wire you can feed straight into a conditional-execution node, an Eden_BoolBinaryOperation, or any boolean input. Because the inputs are wildcard-typed, you can compare the output of a batch node (a count) against a threshold int, or the string from SDTypeConverter against a literal like "euler_ancestral" - no type-shuffling required.
The pattern that makes it worth installing
The classic use is a guard clause: compare, then branch. Take a frame count from a loader, compare it to a minimum, and only run the expensive pass when it clears the threshold. Or compare a loaded checkpoint's name against a known string and route the workflow to the right sampler settings. Pair it with a couple of Eden_Bool toggles and you can build readable "if this condition, do that" control flow at the top of a graph - the same way you'd structure a conditional in code, but as nodes.
Installing
One of 70+ nodes in edenartlab/eden_comfy_pipelines (Eden.art nodesuite):
cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines.git
cd eden_comfy_pipelines
pip install -r requirements.txt
Restart ComfyUI, or ComfyUI Manager β search "Eden". No models, no heavy dependencies.
Gotchas
The wildcard typing is a gift and a trap. Because a and b accept anything, it's easy to compare mismatched types - an int against a string - and get a result that's technically valid Python but nonsense to your workflow ("5" < 10 errors, for example). Also, equality on floats is the usual float trap: 0.1 + 0.2 == 0.3 is false in Python, so if you're comparing computed floats, use a tolerance-based comparison (or compare against a rounded value) rather than ==. And as with all logic nodes, it only re-evaluates when its inputs change - queue the graph to see updated results after tweaking a setting.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| a | * | 0 | β |
| b | * | 0 | β |
| comparison | COMBO | a == b | 6 options: a == b, a != b, a < b, a > b, a <= b, a >= b |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| boolean | BOOLEAN | β |