ComfyUI Node

is connected

A node that answers 'is this wire actually plugged in?'

By StableLlama·Created about a year ago·Updated about 15 hours ago· 48
is connected
  • input
  • is_connected

Here's a question most nodes pretend doesn't exist: is this input actually connected to anything? is connected from the Basic data handling pack answers it with a simple True or False - and that tiny piece of self-knowledge is surprisingly powerful for building workflows that behave differently depending on how they're wired.

What it does

It has one optional input, input (wildcard *), and one boolean output, is_connected. If that input is wired to another node's output, you get True. If it's not wired, you get False. Under the hood it's the simplest possible check - input is not None - because an unwired input arrives as None and a wired one arrives as a value. No evaluation of what's on the wire, just whether there's a wire.

The one subtlety: if a node is connected but outputs an actual None value, this reads as not-connected. For most workflows that never happens, but it's the edge case to keep in mind.

What you'd do with it

This is an adaptive-workflow tool. Wire is_connected into an if/else and you can make a workflow degrade gracefully: "if a mask is attached, use the masking path; if not, use the plain path." It's also a genuinely useful diagnostic - drop one next to an optional input and it tells you at a glance whether your wiring actually took, which is a nicer debugging experience than staring at a grey socket.

Inputs and outputs

  • input - optional, wildcard *. Wire something into it to test the connection.
  • Output is_connected - BOOLEAN, True when wired, False when not.

Install

Part of the Basic data handling pack. ComfyUI Manager → search "Basic data handling" → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/StableLlama/ComfyUI-basic_data_handling

then restart ComfyUI. Pure Python, no dependencies, no models.

The honest limits

Because it's a static check at execution time, it can't tell you whether a connection is "good" - a wired node that errors upstream will still read True if it produced any value. And there's no "is not connected" inverse node; just flip the output with the pack's boolean not or route through Generic Or's invert. For the 90% case - "is this optional input populated" - it does exactly what it says, which is more than most nodes will admit about their own wiring.

CategoryBasic/flow control

Inputs (1)

NameTypeDefaultDescription
inputopt*

Outputs (1)

NameTypeDescription
is_connectedBOOLEAN