COMPARISON (JOV) π΅π½
If/then routing for data, without a logic pack
- π °οΈ
- π ±οΈ
- π
- π₯΅
- β‘
- VAL
COMPARISON (JOV) π΅π½ is an if/then node for arbitrary data. It takes two values, compares them with any of 16 operators (EQUAL, NOT_EQUAL, LESS_THAN, GREATER_THAN, AND, OR, XOR, and the NAND/NOR/XNOR family, plus a few more), and routes a success value or a failure value based on the result. Two data ports in, a decision made, and - here's the good part - you get to define what "success" even passes along.
If you've been building branching ComfyUI workflows, you know the usual pattern is several nodes bolted together: a compare node, a switch node, a "pass this if true" node. This one collapses all of it into a single node, and it works on any type - numbers, vectors, strings, whatever. It's the Jovimetrix answer to "logic without a logic pack."
The inputs that matter
Six optional inputs, and the clever ones are the middle two:
- π °οΈ - the master comparator (default 0).
- π ±οΈ - the secondary comparator (default 0). Compare these two.
- π - the data to pass on a successful comparison.
- π₯΅ - the data to pass on a failed comparison.
- π΅π½ββοΈ - the comparison function (default EQUAL). The full 16 include the boolean logic ops AND/OR/XOR and their negations, which is where this turns into a general logic gate.
- π - flip A and B (for when "greater than" and "less than" have you twisted around).
- π³ - reverse the success and failure inputs, i.e. invert the whole decision.
The two outputs: β‘ hands you whichever of the pass/fail inputs evaluated true, and VAL gives you the raw comparison result - handy when you want the boolean and the routed data.
How it works
It evaluates the chosen operator element-wise between A and B, and if the comparison holds for all elements it returns the success payload, otherwise the failure payload. That "all elements" detail matters: comparing two vectors succeeds only if every component passes, which is the correct behavior for chained conditions.
Installing it
Part of Jovimetrix:
- ComfyUI Manager - search "Jovimetrix", install.
- Manual -
git clone https://github.com/Amorano/Jovimetrix.gitintocustom_nodes/, thenpip install -r requirements.txt.
No models. Dependencies: numpy, OpenCV, Pillow, matplotlib, cozy_comfyui. Needs ComfyUI 0.1.3+.
Where it fits
Reach for this when a workflow branches: "if the seed is even, use prompt A, else prompt B" is a wired connection plus this node and a prompt switch. Or gate a whole stage - compare a counter against a threshold and pass a KSampler's settings on success and a "skip" value on failure. The trap is the same one as all if/then nodes: you'll wire it, it'll pass the wrong payload, and the fix is usually the π swap or the π³ invert rather than a rebuild. It's not the node people talk about, but it's the one that keeps procedural workflows from becoming a spiderweb of switches.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| π °οΈopt | * | 0 | Master Comparator |
| π ±οΈopt | * | 0 | Secondary Comparator |
| πopt | * | 0 | pass this data on a successful condition |
| π₯΅opt | * | 0 | pass this data on a failure condition |
| π΅π½ββοΈopt | COMBO | EQUAL | Comparison function. Will pass the data in π on successful comparison |
| πopt | BOOLEAN | false | Flip Input A and Input B with each other |
| π³opt | BOOLEAN | false | reverse the successful and failure inputs |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| β‘ | * | Outputs the input at π °οΈ or π ±οΈ depending on which evaluated TRUE |
| VAL | * | The comparison result value |