ComfyUI Node
String Binary Condition JK๐
Equality checks for strings โ the branch that's really about a name
String Binary Condition JK๐
- BOOLEAN
โopโพโบ
โaโบ
โbโบ
Numbers get compared constantly; strings usually don't. But ComfyUI workflows end up carrying strings - model names, prompt fragments, file stems, metadata - and sometimes the branch you want is literally "is this the one." CM_StringBinaryCondition_JK does exactly two comparisons on two string inputs, a and b: Eq (equal) and Neq (not equal). Output is a BOOLEAN.
When comparing strings matters
- Model or LoRA name routing. A loader outputs a model name string; you want different sampler settings for "sd_xl_base" vs "flux1-dev". Eq against the known name drives the switch.
- Mode detection. If some upstream node hands you a mode string ("canny", "depth", "pose"), an Eq check replaces a manual toggle - the workflow chooses its own path.
- Empty/not-empty checks. Compare against an empty string to detect "nothing was provided," which is the string-world version of a boolean.
- Fallback logic. "If this prompt equals the placeholder, use the real one instead."
Because the output is a proper boolean, it chains with the pack's Bool And/OR gates - "the model is X and the mode is Y" is two comparisons and one AND.
The honest caveats
- It's case-sensitive. "Canny" and "canny" are not equal. If upstream nodes aren't consistent about casing, normalize first or you'll be debugging a false branch.
- Whitespace counts. Trailing spaces and line breaks from multiline inputs will break Eq in ways that are hard to see. If you're comparing against a literal, keep the inputs trimmed.
- It's not "contains". This node is equality, not substring search. For "does the name contain 'fp8'", you'd need a different utility - this one is deliberately strict.
Installing it
Ships with ComfyUI-JakeUpgrade:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
# Windows standalone: install.bat
# or: python_embeded\python.exe -s -m pip install -r requirements.txt
pip install -r requirements.txt # non-Windows
Or ComfyUI Manager, search "JakeUpgrade", install, restart. Nothing to download.
Gotchas
- Case and whitespace are the two silent killers. Compare exactly what the upstream produces, not what you think it produces - a Show Text node is the debugging friend here.
- Manager's JakeUpgrade / IPAdapter_plus conflict warning is a false positive from the pack's
replacement/folder. - ComfyUI-MultiGPU causes CUDA errors with recent ComfyUI - disable it per the README.
Category๐ JK/โ๏ธ Math/๐ค String
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| op | COMBO | Select comparison operation | |
| a | STRING | First string input | |
| b | STRING | Second string input |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | โ |