Nodes/ComfyUI-Utility-Suite/Pipe To/Edit Any
ComfyUI Node

Pipe To/Edit Any

Write back into a pipe without destroying what's already there

By tom-m-2020·Created about a month ago·Updated 7 days ago· 1
Pipe To/Edit Any
  • pipe
  • any_1
  • any_2
  • any_3
  • any_4
  • any_5
  • any_6
  • list_1
  • list_2
  • list_3
  • pipe

A context bus is only half useful if you can't write to it. Pipe Set Any handles the one-value case; Pipe To/Edit Any is the bulk version - six scalar slots and three list slots on a single node, and the crucial property that only the slots you actually wire get written. Everything else passes through untouched.

That's what makes it an edit node rather than a rebuild node, and it's what makes the pipe pattern work at all in a big graph. A working node halfway down the canvas changes the latent; it wires the new latent into any_3 and leaves the other eight slots alone. The pipe keeps the model, clip, vae and settings it was given, and now also carries the new latent. Nothing downstream needs to know that anything happened.

Inputs and output

Inputs: pipe (optional - unwired starts a fresh pipe) plus any_1 through any_6 and list_1 through list_3. Every one of those nine is optional, and unconnected optional inputs in ComfyUI simply don't reach the node's function. Internally the node is written to check which keys are present and set only those, so "unwired" literally means "not written". You don't need to worry about a slot coming through as None and clobbering a value. It won't.

One output: pipe, updated.

The field names line up exactly with Pipe From Any's outputs, which is the intended round trip: explode a pipe, change one or two things, re-assemble it. Slots are named, not positional - any_2 is the key "any_2", so both ends of the round trip speak the same vocabulary for free.

There is no delete. Nothing in this pack unsets a field; once a name exists in a pipe it either gets overwritten or carried. In practice that's fine - a stale field nobody reads costs nothing - but if you were expecting to prune a pipe before passing it on, you'll be rebuilding it with a fresh Pipe Set chain instead.

Immutability, again

As with the rest of the pipe family, the output is a new pipe, not a mutated one. Two branches of the graph editing the same incoming pipe each get their own consistent version. That property is the difference between a context bus you can debug and a shared dictionary that changes under you depending on what the graph evaluated first.

The trade you're making

This whole pattern is the plumbing layer's central bargain, and comfyui-node-plumbing.md is blunt about both halves: one wire instead of twelve makes a graph legible, and the same wire hides which version of each value is inside it. With forty explicit wires you can see that the LoRA output never reached the sampler. With a pipe you can't, because the connection is there and the contents are wrong. Rule of thumb from that doc, and I'd keep it: use the bus where legibility is your binding constraint, and keep explicit wires in the region you're actively iterating on so you can see what feeds what.

For the editor specifically, the discipline is to write the pipe back after the node that changed the value, every time. A pipe that gets assembled, then has a model swapped into it later, is carrying two versions of reality depending on which tap you read.

Install

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

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

No model files; the pack's only requirement is opencv-python-headless. It's built on ComfyUI's V3 node API, where the custom pipe socket type lives - so if you install it and no Utility Suite/* categories show up in the node search, the fix is updating ComfyUI, not reinstalling the pack.

Troubleshooting

A slot I cleared still has the old value downstream. Correct - disconnecting a slot means "don't write", not "erase". Overwrite it with something, or build a new pipe.

The getter raises "has no field". You wired a value into any_5 and the reader is asking for a differently named key via Pipe Get Any. The nine slots only satisfy Pipe From Any and its slot names.

Values look one step stale. Classic pipe bug: the edit happens after the read. Check evaluation order on the canvas, because the wire won't tell you.

CategoryUtility Suite/Pipe

Inputs (10)

NameTypeDefaultDescription
pipeoptUTILITY_ANY_PIPE—
any_1opt*—
any_2opt*—
any_3opt*—
any_4opt*—
any_5opt*—
any_6opt*—
list_1opt*—
list_2opt*—
list_3opt*—

Outputs (1)

NameTypeDescription
pipeUTILITY_ANY_PIPE—