π° Is Empty ? - v1 /c
Is Empty ? β the string guard that keeps empty prompts out of your graph
- any
- boolean
ComfyUI has a habit of letting empty strings flow through silently. An unpopulated prompt box, an optional text input nobody wired, a concatenation that produced nothing - and suddenly your KSampler is running with a blank positive, and you're wondering why the output is garbage. Is Empty ? is a one-wire guard against exactly that: feed it a value, and it returns True if that value is an empty string, False otherwise.
It's the narrowest of the pack's three "checker" nodes - Is None ? checks for None, this checks for "", and Is Empty Or None ? is both in one. If you know you're guarding a string, this is the precise tool.
How it works
One comparison: the input equals "". That's it. None returns False here (that's the sibling node's job), a whitespace-only string like " " also returns False because it's not literally empty - that's worth remembering, because a box of spaces will sail right past this guard. The input is any (* type), so you can throw anything at it; for non-string values it's simply not equal to "", so it returns False.
Input: any. Output: boolean (BOOLEAN).
Using it
Wire an optional STRING input into it, then feed the boolean into a switch or conditional to fall back to a default prompt when nothing arrived. It's also handy as a workflow diagnostic - put it on a text wire and let Display Any (same pack) show you whether the value was truly empty. Inside the For Loop set, it combines with ToBoolNode-style logic for "keep going while there's still prompt text" loops.
Installing it
Ships in the MaraScott pack: ComfyUI Manager β search "MaraScott" β Install β restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MaraScott/ComfyUI_MaraScott_Nodes
Then restart. One two-line node riding in a pack that pins transformers==4.37.2 and installs opencv-python, numba and blend_modes - the usual MaraScott install tax.
Common issues
The empty-vs-whitespace distinction is the classic gotcha: " " (spaces) is not empty to this node. If you're validating user-entered prompts, strip the input first or the guard lets whitespace through. And remember it's strict - None, empty lists, and zero are all "not empty" to it. If your workflow crashes on a None and you only used this node, that's the mismatch: you wanted Is Empty Or None ? instead. Check what's actually on the wire before blaming the node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| boolean | BOOLEAN | β |