Nodes/Nifty Nodes for ComfyUI/None Output Switch
ComfyUI Node

None Output Switch

Route a stream into exists-or-none, and block the branch you don't want

By Stibo·Created 5 months ago·Updated 2 months ago· 9
None Output Switch
  • input
  • value
  • on_exists
  • on_none

The None Input Switch family decides which input to let through based on a None check. None Output Switch works in the opposite direction: it takes one input value and routes it to one of two outputs depending on whether a value is None - and, crucially, the output you didn't pick is blocked, meaning whatever hangs off it doesn't execute.

What it is

Inputs:

  • input - the value to route.
  • value - the thing to check for None.

Outputs:

  • on_exists - active when value is not None.
  • on_none - active when value is None.

So you feed the check value into value, and the thing you actually want to send somewhere into input. If the check value exists, input flows out of on_exists; if it's None, it flows out of on_none. The inactive output is blocked, which in ComfyUI means downstream nodes on that side don't run.

Why you'd reach for it

This is the "split and skip" node. A common shape: you have a pipeline that may or may not need post-processing. The check value is, say, whether an image actually got loaded. When it exists, route it through the enhancement branch (hangs off on_exists); when it's None, route it straight to the output (hangs off on_none) and the enhancement subgraph never runs. That's a conditional pipeline with real branch skipping, not just a value passthrough.

It pairs naturally with the pack's None node (which just emits a None value) and with Is None if you want the boolean form of the check. Output switches like this are the workhorse of "if this, do that, otherwise skip" workflow design - the pack's Input Switch / Output Switch pair is the boolean version of the same idea, and this is the None-flavored one.

Inputs that matter

In practice you mostly set two things: the value you're checking and the input you're routing. Both are optional-typed, so an unconnected check value reads as None - which means with nothing connected it defaults to routing through on_none. That's a useful default (fail-open to the simple path) but worth knowing before it surprises you.

Installing it

Part of the Nifty Nodes pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes

or search "Nifty Nodes" in ComfyUI Manager, then restart. No models or heavy dependencies.

Gotchas

The blocked-output behavior cuts both ways: it's the feature, but if you connect something important to the wrong output, that branch will be silently skipped - ComfyUI won't error, it just won't run. So double-check which side is "active" when value is None versus when it isn't; swapping the two is the classic mistake. Also remember unconnected = None here, so a node you intended to be "always on" may actually be routing through on_none the whole time. And keep ComfyUI updated - the pack targets the newer V3 API, and that's the first place to look if the node doesn't appear after install.

Categorynifty/logic

Inputs (2)

NameTypeDefaultDescription
inputoptCOMFY_MATCHTYPE_V3The value to route to either on_exists or on_none.
valueoptCOMFY_MATCHTYPE_V3The value to check. If not None, 'input' is routed to on_exists; otherwise to on_none.

Outputs (2)

NameTypeDescription
on_existsCOMFY_MATCHTYPE_V3
on_noneCOMFY_MATCHTYPE_V3