Nodes/AK Pack/AK Pipe
ComfyUI Node

AK Pipe

A pipe node that mostly just gets out of the way

By akawana·Created 9 months ago·Updated 8 days ago· 2
AK Pipe
  • pipe_in
  • model
  • clip
  • vae
  • positive
  • negative
  • latent
  • image
  • pipe_out
  • model
  • clip
  • vae
  • positive
  • negative
  • latent
  • image

AK Pipe is the pack's answer to the "too many wires" problem, and it's deliberately boring in the best way. It bundles the seven things every sampler section needs - model, clip, vae, positive, negative, latent, and image - into a single AK_PIPE object that travels down one wire, and it spits them all back out on the other side. If you've used rgthree's Context nodes or Impact Pack's pipes, you know the pattern; this is a lean, no-frills take on it.

The detail that makes it interesting is the author's "zero-copy" claim, and it's real in the code. When a pipe comes in and nothing new arrives on the inputs, the node passes the same tuple through instead of rebuilding a fresh container on every run. It only creates a new pipe object when an actual value changes - it fingerprints each incoming object with a quick hash and only replaces what's different. In a workflow that runs a pipe through a dozen stages, that's less memory churn and less Python overhead than the average pipe-merge node, which is the whole pitch: for large, complex graphs, every allocation you avoid adds up.

The inputs. All optional. pipe_in is the incoming AK_PIPE; the other seven (model, clip, vae, positive, negative, latent, image) are the "override" slots. Here's the design decision that matters: whatever you connect gets written into the pipe, and whatever you leave disconnected keeps whatever value the incoming pipe already carried. So you can daisy-chain pipes and at each stage only wire the input you're actually changing - a zero-wire edit is just passing the pipe through.

The outputs. pipe_out (the AK_PIPE object) plus individual model, clip, vae, positive, negative, latent, image outputs. Wire the pipe forward to keep bundling, or tap individual outputs to feed a KSampler directly. The pack also ships an AK Pipe Loop sibling that always outputs the most recently modified connected pipe - useful for loop-style graphs.

How to install. ComfyUI Manager (search "AK Pack") or:

cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-Utils-extra

Restart ComfyUI. No pip dependencies, no models.

Where people get burned. Pipe types are pack-specific. An AK_PIPE from this node will not plug into a Context node from rgthree or a pipe socket from another pack - you can't mix pipes across packs, and that's true here as much as anywhere. Second, don't mistake "zero-copy" for isolation: if you mutate an object that came in through the pipe, you're mutating the shared object. For ordinary workflows that's a non-issue; for exotic graphs where you splice a latent in-place, keep it in mind. And note it's flagged as an output node, so ComfyUI treats it as an endpoint - harmless, but it can show up in the "output nodes" count if you're counting them.

CategoryAK/pipe

Inputs (8)

NameTypeDefaultDescription
pipe_inoptAK_PIPE
modeloptMODEL
clipoptCLIP
vaeoptVAE
positiveoptCONDITIONING
negativeoptCONDITIONING
latentoptLATENT
imageoptIMAGE

Outputs (8)

NameTypeDescription
pipe_outAK_PIPE
modelMODEL
clipCLIP
vaeVAE
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
imageIMAGE