Nodes/🐰 MaraScott Nodes/🐰 Is None ? - v1 /c
ComfyUI Node

🐰 Is None ? - v1 /c

The None detector β€” catch unconnected inputs before they crash your graph

By MaraScottΒ·Created 3 years agoΒ·Updated 10 months agoΒ· 179
🐰 Is None ? - v1 /c
  • any
  • boolean

Half of ComfyUI debugging is "why is this node complaining about a None input?" Optional inputs that nobody wired, nodes that return nothing under some branch, models that failed to load - they all arrive as None, and most downstream nodes react by throwing. Is None ? is the cheap detector for that exact situation: feed it anything, get a BOOLEAN that's True when the value is None.

Use it to turn "this will crash" into "this will branch." Wire an optional input into it, and when the boolean says True, route the workflow down a safe default path instead of feeding a None into a node that can't handle it.

How it works

One check: any is None. It's the identity test, not an equality test - which means it only fires on actual None, never on empty strings, empty lists, or zero. That precision is the whole point of having three separate checkers in this pack (Is Empty ?, Is Empty Or None ?, and this). The input is * type, so it accepts any slot in your graph.

Input: any. Output: boolean (BOOLEAN).

Using it

The pattern is "optional input guard": take an input your workflow may or may not supply, run it through Is None ?, and feed the boolean into a Switch or loop condition to pick the fallback. It's also genuinely handy inside the pack's For Loop set - an optional carried value that's None on the first pass but populated later is a real scenario, and this node tells you which pass you're on. For debugging, pair it with Display Any to literally see "this wire is None" on screen instead of inferring it from a crash.

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. It's a two-line node inside a pack that pins transformers==4.37.2 and installs opencv-python, numba, blend_modes - you're paying the pack's install tax either way.

Common issues

The precision cuts both ways. "" is not None, and if you guard with this node against an empty string, you'll get False and the empty value flows on - for string guards you want Is Empty ? or Is Empty Or None ?. Similarly an empty tensor isn't None. So the rule of thumb: know which failure mode you're defending against. If a crash message says "NoneType", this node is your match; if it says "empty", you need a different checker.

Category🐰 MaraScott/Utils

Inputs (1)

NameTypeDefaultDescription
any*β€”

Outputs (1)

NameTypeDescription
booleanBOOLEANβ€”