Nodes/ComfyUi-MpiNodes/Mpi Any Checker
ComfyUI Node

Mpi Any Checker

Ask ComfyUI 'does this wire actually hold something?'

By MadPonyInteractive·Created 11 months ago·Updated 5 days ago· 3
Mpi Any Checker
  • any
  • any
  • has_value

Mpi Any Checker is the question-asking sibling of the blocker family. Where Mpi Any Blocker stops a branch dead when a value is empty, this node tells you whether the value is empty and then passes it along regardless. One has_value boolean comes out of it, and that boolean is the seed of a whole if/else branch.

Mechanically it's dead simple: the input any is the wildcard * type, so it accepts any kind of data. It runs the same is_empty_value check the blocker uses, and outputs two things - the original any value unchanged, plus a has_value BOOLEAN that's true when the value holds something and false when it's empty. Empty follows the pack's rules: None, empty string/list/dict, a zero-element tensor, an empty audio waveform. And the part that surprises people every time: 0, 0.0, and False count as having a value. The node's whole philosophy is "falsy" and "empty" are not the same thing - an explicit zero is information, not absence.

So the pattern is: wire has_value into an if/else and route the branch yourself - or run it through MpiBoolean, which hands you the same value as an INT or FLOAT if a switch needs a number. Checker doesn't decide anything - it hands you the answer and lets the graph decide. That's the difference between this and the blocker, and it's why you'd pick one over the other:

  • Use Mpi Any Blocker when you want the empty case to be a silent no-op - nothing downstream runs, period.
  • Use Mpi Any Checker when you want to do something different on the empty case - fall back to a default prompt, load a placeholder image, log a warning.

A concrete setup that shows it off: a text node that may legitimately produce nothing, feeding a prompt builder. Put the checker on the text wire, wire has_value into an if/else with two prompt branches - "generated text" on true, a canned fallback on false - and the any passthrough continues into the builder either way. You've turned "sometimes empty" into "always has a sensible value" without any node knowing or caring.

One thing to keep in mind: because the passthrough is unconditional, the checker itself never blocks anything. If you wire the any output onward and ignore has_value, it behaves like a glorified reroute. That's fine - the boolean is the entire point, and ignoring it is a footgun only in the sense that you added a node for no reason.

Install is shared with the whole pack: ComfyUI Manager → search ComfyUi-MpiNodes → install, or clone it manually and restart:

cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes

No dependencies beyond what ComfyUI already has, no model files, no API key. The pack is pure-Python utilities - it powers the open-source Cubric Vision app, which is where most of these workflows escape from. If you found the node there, the install is already done.

CategoryMpiNodes/Logic

Inputs (1)

NameTypeDefaultDescription
any*

Outputs (2)

NameTypeDescription
any*
has_valueBOOLEAN