Nodes/ComfyUI-Utility-Suite/Pipe Any (Single)
ComfyUI Node

Pipe Any (Single)

A pass-through wire that also tells you if anything is plugged in

By tom-m-2020·Created about a month ago·Updated 7 days ago· 1
Pipe Any (Single)
  • any
  • any
  • present

Some nodes are one idea wearing a node's clothes, and this is one of them. Pipe Any (Single) takes one optional input of whatever type you plug into it, and gives you that same value back - plus a boolean, present, that says whether anything was connected at all.

That boolean is the whole point. The pass-through is just what lets you put the check in the middle of a wire.

The mechanism, which is the interesting half

The node's only input is an optional match-type socket: connect an image and it's an IMAGE socket, connect a latent and it's a LATENT socket. Internally it builds a one-entry pipe with the key any, stores the incoming value, and reads it straight back out. The output socket inherits the same match type, so downstream you can wire it into any consumer that accepts the type you connected upstream.

Then there's the presence flag. In ComfyUI, an optional input you leave unwired simply isn't passed to the node's function - the node's parameter falls back to a sentinel. This node checks for that sentinel and, if it's there, returns None and False instead of erroring. If something is wired, you get the value and True.

Why that matters: a plain core Reroute with an unplugged input doesn't report anything - the graph simply stops there, because the node never executes, and every node downstream of it never runs either. You get a run that finishes suspiciously fast and a preview that never appeared, with no error to read. Putting this node in that spot converts the silence into a signal. Downstream, present can gate a switch, trigger a fallback branch, or just get printed so you know which path your graph took.

Inputs and output

  • any - optional, match-type. Whatever you connect. Leave it empty on purpose if you're using this purely as a "did this branch run?" probe.
  • Outputs: any, the same type back (or None), and present, a BOOLEAN.

Notice there is no pipe input or output here despite the name - this node uses a pipe internally and hands you the scalar. If you want to actually carry values between distant parts of a graph, the real bus is Pipe Set Any / Pipe To/Edit Any feeding Pipe Get Any / Pipe From Any.

When you'd actually reach for it

Three cases, and all of them are about branches:

  1. Making an optional input explicit. You have a graph where sometimes a mask is supplied and sometimes not; wire the mask through here, branch on present, and route the masked and unmasked paths differently instead of maintaining two workflows.
  2. Debuggability. A single node that says "yes, the thing was connected" is worth more than it should be in a graph with forty wires, which is exactly the failure mode the plumbing layer exists to fight - legibility, not logic.
  3. A typed placeholder. Because the node has no fixed type until you connect it, it's a convenient any-socket to park when restructuring. Note the usual caveat with any-type wiring: hiding a connection behind an untyped socket is how you end up unable to see what feeds what. Use one, not twenty.

Honest caveat: this is one of the thinner nodes in the pack. If you don't have a conditional branch to build, you don't need it.

Install

Manager: search ComfyUI Utility Suite (publisher tom-m) → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/tom-m-2020/ComfyUI-Utility-Suite

Nothing to download; the pack's single requirement is opencv-python-headless, unused by this node. It's authored against ComfyUI's V3 node API, which is also where the match-type sockets come from - so this node genuinely needs a current ComfyUI. On an older build the pack installs and registers zero nodes, which looks like a broken install and isn't.

Troubleshooting

The output type doesn't match what I need. The socket type follows the input; if nothing is connected it has no type to adopt, so downstream connections may refuse. Connect it, or use a typed primitive instead.

present is False and the branch never fires. The input is genuinely not connected - that's the node doing its job. Check the wire, and check whether an upstream node was bypassed, because a bypassed node also stops delivering.

I expected this to bundle multiple values. It doesn't. One value, one flag. The multi-field version is Pipe To/Edit Any.

CategoryUtility Suite/Routing

Inputs (1)

NameTypeDefaultDescription
anyoptCOMFY_MATCHTYPE_V3—

Outputs (2)

NameTypeDescription
anyCOMFY_MATCHTYPE_V3—
presentBOOLEAN—