ComfyUI Node

Pipe Get Any

Pull one named value back off a pipe

By tom-m-2020·Created about a month ago·Updated 7 days ago· 1
Pipe Get Any
  • pipe
  • value
◄keyvalue►

Pipe Get Any is the key-value read for the pack's context bus. You stored something in a UTILITY_ANY_PIPE under a name - "seed", "steps", "positive", whatever - and this node asks for that name and gives you the value back. One input, one string, one output.

It's the flexible counterpart to Pipe From Any. From Any is a fixed nine-slot tuple (any_1…any_6, list_1…list_3) that you pass around whole; Get Any is a lookup for anything else, which means you can name your fields what they actually mean instead of remembering that slot 4 is CFG.

Inputs and output

  • pipe - a UTILITY_ANY_PIPE. Required. Something upstream has to have built one.
  • key - a STRING, defaulting to "value". This is the name the field was stored under by Pipe Set Any, matching exactly: case-sensitive, no trimming, no aliasing.
  • Output: value, any-type. It'll connect to whatever expects the type you stored, but see the caveat below.

The two errors, both of which are features

KeyError: UTILITY_ANY_PIPE has no field 'seed'. The pipe simply doesn't have that name. In practice this is almost always one of two things: a typo in the key widget (you stored steps and asked for step), or a pipe built in a different branch that never passed through your setter. Unlike Pipe From Any, which quietly returns None for a field it can't find, this node refuses - which is exactly what you want when a missing value would otherwise mean a workflow running with a silently wrong setting.

TypeError: field 'items' is a list; use Pipe Get List. You stored a list under this key and asked for a scalar. The pipe keeps scalar fields and list fields in separate namespaces, and it will not let you cross the streams. Use Pipe Get List for anything that was stored with Pipe Set List.

That strictness is the interesting design decision in this half of the pack. Get Any fails loudly; From Any degrades quietly. Pick per situation: sampling with a missing cfg should stop the run, whereas an optional preview image that isn't there can reasonably come back as nothing.

A word on typing

The output socket is any-type, so ComfyUI will let you wire the string in slot "label" into a sampler's steps without complaint, and you'll find out at execution. Keep a habit of naming keys after their type when a pipe carries several kinds of thing (seed_int, mask_list), because the pipe itself is untyped and the graph can't help you. This is the general trade of every context bus, and it's covered in comfyui-node-plumbing.md: one wire instead of forty makes the graph readable and hides what's inside each value. Get Any is the tool you reach for when you need to prove the contents, so give it good key names.

Where it's used

The pattern is a long pipe line down one side of the canvas - loader and settings assembled into a pipe, every working node tapping it with Get Any for what it needs and To/Edit Any to write back what changed. The read is cheap and the node has no side effects, so it's normal to have several of them off one pipe.

The one discipline worth keeping: build the pipe after the thing that changes the value you want. Unpacking a model off a pipe assembled before the LoRA loader is the classic stale-context bug, and this node will happily hand you the base weights while looking completely correct.

Install

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

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

No models, no downloads; the pack's single requirement is opencv-python-headless, which this node doesn't use. The pack is written against ComfyUI's V3 node API and defines the custom pipe socket type there, so an old ComfyUI shows none of these nodes - update before you debug anything else.

Troubleshooting

"has no field" on a key I'm sure I set. Check the setter in the same execution path, not just the same canvas. A branch that got bypassed never wrote the field, and the pipe you're reading is an older one from before the branch existed.

The value arrives but the downstream node rejects it. The pipe stores whatever you put in it. A string stored under "steps" will come out as a string. Read back with the ear of "what did I actually store", not "what did the socket name promise".

It worked, then stopped after I edited the graph. Almost always a key rename on one side only. Search the workflow for the string.

CategoryUtility Suite/Pipe

Inputs (2)

NameTypeDefaultDescription
pipeUTILITY_ANY_PIPE—
keySTRINGvalue—

Outputs (1)

NameTypeDescription
value*—