Comes after or equal to
The inclusive end of the string sort
- result
"Comes after or equal to" is the inclusive version of the string-ordering check: first >= second, true when the first string sorts after the second or is exactly the same. It's the boundary-tolerant sibling of "Comes after," and it exists for the same reason the arithmetic nodes have inclusive variants - when a threshold is "at least this," the equal case has to count. Off-by-one at a string boundary is a real bug, and this node exists so you don't have to fix it by stacking an equals check on top.
It's part of marco-zanella's ComfyUI-BooleanExpression pack, a dependency-free logic collection. Display name "Comes after or equal to," class name BooleanExpression.StringComparison.AlphabeticalGreaterThanOrEqualTo.
How it works
Three required inputs:
first- the first string (default empty)second- the second string (default empty)case_insensitive- a BOOLEAN toggle, defaulting totrue
Output is result, a BOOLEAN: first >= second on the (optionally lowercased) strings. Mechanism is Python's >= on strings - lexicographic, Unicode code-point order. Lowercasing happens first when case_insensitive is on, which is what makes the ordering feel like a real dictionary instead of a code-point table.
The "or equal to" is the whole point. A "Comes after" check is false for identical strings; this one is true. When you're building a range - "names from N onward" - the boundary name itself has to land in the bucket, and that's precisely the inclusive case.
When it matters
Pair it with "Comes before or equal to" and "Comes before" from the same pack to carve a list of labels into bands without the boundary falling through the cracks. "From N to the end" is a Comes-after-or-equal-to check; "strictly before M" is a Comes-before. Put those two on either side of a name and you've got a clean range with no gaps. It's the node you reach for when sorting text and you actually care about the edges, which is exactly the situation where the non-inclusive version silently loses a name.
Installing it
No models, no dependencies, pure Python - the pack's requirements.txt is empty. ComfyUI Manager, search ComfyUI-BooleanExpression, or:
cd ComfyUI/custom_nodes
git clone https://github.com/marco-zanella/ComfyUI-BooleanExpression.git
Restart ComfyUI, and it's under Boolean Expressions → String Comparisons.
Gotchas
- Inclusive means the boundary counts. Identical strings return
truehere andfalseon "Comes after". If a bucket mysteriously excludes its own boundary name, you used the strict node. - Case-insensitive by default. Leave it on for dictionary-like ordering; flip it for byte-exact. Either way, this isn't locale-aware collation - OS file-manager sort order won't match it for exotic Unicode.
- Both branches downstream still compute. As always with this pack, it's a value-producing node, not a control-flow switch - unselected chains upstream still run. Free for strings.
It's a thin node, and you'll mostly reach for it as the "from here onward" half of a string range. When you need that boundary to be inclusive, it's the difference between a correct bucket and one that's quietly missing its edge case.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| first | STRING | The first string. | |
| second | STRING | The second string. | |
| case_insensitive | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | BOOLEAN | — |