JK String Empty
Gate a branch on whether a text field was left blank
- BOOLEAN
This node does exactly what the name says and nothing more: you give it a string, it tells you whether that string is empty. That's the entire node. The reason it exists isn't the logic - len(a) == 0 isn't hard - it's that ComfyUI graphs need that check as a node so you can wire its BOOLEAN output into something that branches on it, like a Switch or a gate that skips an optional step.
Where this actually earns its keep in this pack: several of the other JK nodes (EasyHRFix, JKEasyDetailer, and their Context variants) have optional extra_positive_text / extra_negative_text fields that default to an empty string and only do anything if you fill them in. JKStringEmpty is the natural partner for checking "did the user actually type something in that optional field" before you route conditioning through an extra encode step, or before you decide whether to log/display a value at all.
The inputs and outputs that matter
There's really just one input to know: a (STRING), required. Feed it any string - a prompt fragment, a filename, a widget you've routed through a Reroute or JKAnythingToString if it started life as something other than text.
The single output is a BOOLEAN: true if the string is empty, false otherwise. Wire that into whatever gate node your workflow uses to decide "run this branch or skip it."
If you want the inverse check without adding a NOT node, this pack ships JKStringNotEmpty as a direct counterpart - same input, opposite answer.
Installing it
It ships as part of the whole kostenickj/jk-comfyui-helpers pack, not as a standalone install - there's no way to grab just the string utilities. It's already present on comfy.icu's shared image. Self-hosting: cd ComfyUI/custom_nodes && git clone https://github.com/kostenickj/jk-comfyui-helpers.git, then restart ComfyUI. The pack's README notes its ComfyUI Manager listing was pending at time of writing, so the manual clone is the safer bet; git pull in that folder to update later. Nothing here needs a model download or a Python dependency - it's pure logic, so once the pack's installed, this node just works.
Worth knowing before you go looking for it elsewhere: this whole pack is a fairly obscure, one-person toolkit - it isn't something you'll see recommended in workflow write-ups the way Impact Pack or rgthree-comfy are. That doesn't make the string utilities less useful, it just means don't expect a big community thread to troubleshoot against if something looks off; the README and the node itself are basically your whole reference.
Common issues
Honestly, there's not much that goes wrong with a node this small. The one real trap: ComfyUI treats None and an unconnected optional input differently from an actual empty string "". If you're feeding this from a node whose output can be None (rather than a genuinely empty string), you may need a converter or default value upstream so a always arrives as a real string - otherwise the empty check may not behave the way you expect. When in doubt, run JKAnythingToString first to force whatever you're checking into a proper string type before it hits this node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| a | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BOOLEAN | BOOLEAN | — |