Nodes/Comfyui-PixNodes/Any Data Is Empty
ComfyUI Node

Any Data Is Empty

Is my data empty?

By pixixai·Created 8 months ago·Updated 6 months ago· 24
Any Data Is Empty
  • any_data
  • is_empty
invertfalse

You've got a node that sometimes produces nothing, and you want the rest of the graph to react instead of throwing a type error into your face. Pix_AnyDataIsEmpty is the PixNodes answer to that: feed it any single value, get a true/false boolean out. That's the whole job, and it's a job that shows up constantly once your workflows grow past "load one image, generate."

The name undersells what it actually handles. ComfyUI's wildcard * input means you can wire in a string, an image tensor, a latent, a mask, a JSON object, even an empty list - and it correctly treats each one differently. A tensor is "empty" when it has zero elements (numel() == 0); a latent dict is checked by looking at its samples tensor; a string or list is empty when its length is zero; a plain number is never empty (which is the right call - 0 is a value, not a lack of one). None of this is guesswork on my part; the logic is right there in nodes/Logic/is_empty.py, and it's sensible.

Two inputs, one output. any_data is the wildcard slot - wire whatever you're testing into it. invert flips the result, with the widget labels literally reading "Normal (Empty=True)" and "Invert (Empty=False)". Set invert and it becomes a "does this have content?" check instead of an "is it empty?" check. The single output, is_empty, feeds anything that takes a BOOLEAN - a switch, a conditional, a PixNodes If-Else dispatcher, whatever.

Where this earns its keep: guarding a branch. The classic combo is Pix_AnyDataIsEmptyPix_IfElseDispatcher, so an optional input that never got connected routes the workflow down a fallback path instead of failing. ComfyUI is aggressive about caching and about skipping nodes with no data, and half the "why is this not running" questions on the subreddit are really "my node quietly received nothing." This is the node that makes that state visible and actionable.

Install is the standard PixNodes story: ComfyUI Manager, search PixNodes, install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/pixixai/Comfyui-PixNodes
cd Comfyui-PixNodes
pip install -r requirements.txt

then restart ComfyUI. The requirements file is just openai and Requests, so nothing heavy. One honest warning: the pack ships a lot of nodes, so you're installing a whole toolbox to get one tiny logic node. That's normal for the PixNodes suite, and the logic nodes are the cheap part - no models, no VRAM.

The only real gotcha is that the output is a Python boolean, and not every downstream node knows what to do with a bare boolean input. If you're feeding something that wants an INT, throw a bool-to-int converter in between. Otherwise this is one of those nodes you install, use once, and wonder why ComfyUI's core still doesn't ship it.

CategoryPixNodes/Logic

Inputs (2)

NameTypeDefaultDescription
invertBOOLEANfalse
any_dataopt*

Outputs (1)

NameTypeDescription
is_emptyBOOLEAN