ComfyUI Node Runs on cloud

Any Is Empty

Ask 'did that stage actually produce anything?'

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
Any Is Empty
  • value
  • is_empty
  • value
  • reason
zero_is_emptyfalse

Most failures in ComfyUI aren't crashes - they're stages that quietly produce nothing. A detector that found no faces. A text parse that came back blank. A video load with an empty first frame. You can't easily branch on "nothing happened" because nothing travels on the wire. Any Is Empty exists to turn that nothing into a boolean you can act on.

Under WAS Suite/Logic/Boolean, it takes one input, value, of any type, and answers three things. The headline is is_empty: true when the wire is carrying nothing. An empty mask, a blank line of text, an empty list, and a batch of zero frames all read as empty - the node understands "empty" across types instead of just checking None. The value output is the same value, unchanged, so the node can sit in the middle of a chain and let you inspect without rerouting. And reason is a string explaining why it read as empty, or what it actually holds when it doesn't - wire that to a note or a text node and a workflow that silently failed becomes a workflow that tells you what it found.

The one setting that matters

zero_is_empty, default off, extends the definition of empty to cover masks or images that are entirely black. Off, only a batch of no frames counts as empty. Turn it on when you're testing a mask stage and an all-black mask is as good as a missing one for your purposes. It's the difference between "this branch produced literally nothing" and "this branch produced a zeroed-out result," and only you know which one your workflow should treat as a failure.

Wiring it into a real graph

The canonical shape: detection or extraction → Any Is Empty → gate or switch.

[Face detector] → [Any Is Empty is_empty] → [Any Gate open] → [Save Image]
        ↑──────────────────────────────────────────[value]→

Feed is_empty into an Any Gate and you get "only save when there was actually something to save" without any of the graph running when there wasn't. Feed it into a switch's boolean and you branch: empty means take the fallback path (regenerate, try another detector, log and move on); not empty means take the real path.

Because it passes value through untouched and types itself from the connection, you can drop it inline anywhere you'd like a live "is this thing empty?" readout. It's the cheap guard-rail node: a lot of the "sometimes the workflow just produces nothing and I don't know why" confusion dissolves the moment you can see what came back empty and why the reason string says so.

Installing

Part of WAS Node Suite v3 (WASasquatch/was-node-suite-comfyui), WASasquatch's MIT pack - going since 2023, over a million downloads, and a fixture in the "what should I install" lists since the start. Logic/boolean nodes like this carry zero dependencies: no pip packages, no models, nothing to configure, and it works fine with whatever else you've wired around it. Requires ComfyUI 0.14.0+ - the v3 suite is built against the newer node backend.

Install from ComfyUI Manager (search WAS Node Suite v3), or:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui

Restart ComfyUI and it appears under WAS Suite/Logic/Boolean. If it's not in the menu after install, update ComfyUI first - an outdated core is the usual culprit.

CategoryWAS Suite/Logic/Boolean

Inputs (2)

NameTypeDefaultDescription
valueCOMFY_MATCHTYPE_V3Anything. The wire is read and passed on unchanged.
zero_is_emptyoptBOOLEANfalseCount a mask or an image that is entirely black as empty. Off, only a batch of no frames counts.

Outputs (3)

NameTypeDescription
is_emptyBOOLEANtrue when nothing is being carried. Wire it to a switch.
valueCOMFY_MATCHTYPE_V3The same value, unchanged, so the node sits in the middle of a chain.
reasonSTRINGWhy it reads as empty, or what it holds when it does not.