Mpi Unpacker
The other half of the wire that carries five values at once
- pack
- any_1
- any_2
- any_3
- any_4
- any_5
Mpi Unpacker is the "receiving end" of the tidy trick that makes big ComfyUI graphs bearable. Its sibling, Mpi Packer, bundles up to five values of any type - an image, a float, an int, a boolean, whatever - onto one MPI_PACK wire. Mpi Unpacker takes that single wire and hands you the five values back, in the exact slot order they were packed. If you've ever watched forty wires drag model, clip, vae, width, height, and a seed across half the canvas, you already know why this exists: one wire instead of a noodle plate.
It's a plumbing node, so the mechanism is the whole story, and it's refreshingly honest. Under the hood a pack is just a Python list - MpiPacker returns [value_1, ..., value_5] and MpiUnpacker reads it back by index. No hidden state, no context object carrying stale copies of things. That's the point worth internalizing if you've been burned by the "context bus" pattern (the KB's comfyui-node-plumbing.md essay has a whole section on the stale-context failure mode): a pack is stateless, a snapshot of whatever was actually connected at run time. It can't drift. What you trade is legibility - slot 3 is "whatever you plugged into slot 3" - so keep the packer in view while you wire.
The input surface is minimal. One required input, pack (type MPI_PACK, forced to be wire-only - there's no widget to type into). Five outputs, any_1 through any_5, each typed * so any kind of value flows out. The contract is order, not labels: whatever went into the packer's any_2 comes out of any_2 here.
Two behaviors are worth knowing before they surprise you:
- Empty slots block. If a slot in the pack was left unconnected,
MpiUnpackeremits an execution blocker on that output instead of a value, so nothing downstream of that socket runs. That's a feature - it stops a node that indexes into a missing image from throwingIndexError- but if your downstream branch silently never fires, check whether the packer slot feeding it was actually wired. - Oversized packs drop the tail. Feed a 10-slot pack into this 5-slot unpacker and slots 6–10 are silently discarded (the node prints a warning to the console, but only if real values were dropped). If you see
[MpiNodes] Mpi Unpacker: pack holds 10 slots...in your logs, that's what happened - switch to Mpi Unpacker 10.
Because a pack is just a list, packs nest: put five packers into one packer and you've carried 25 values on a single wire. It's the "collapse a region" trick without subgraphs, and it's how this pack keeps its shared workflows readable.
Install - it ships in the ComfyUi-MpiNodes pack (100+ utilities from Mad Pony Interactive, the outfit behind the Cubric Vision app). Easiest via ComfyUI Manager: Custom Nodes Manager → search "ComfyUi-MpiNodes" → Install, then restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
Restart ComfyUI. The pack has no pip requirements and needs no model downloads for the logic nodes - just keep ComfyUI reasonably current, since the pack leans on newer backend APIs. (Licence note: 1.2.7 onward is AGPL-3.0; versions up to 1.2.6 remain MIT.)
Reach for it whenever your graph's wire count is the problem. The one caveat: * outputs mean the type checker can't catch a mis-wire, so if a value arrives somewhere as the wrong type, the pack is the first place to look.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| pack | MPI_PACK | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| any_1 | * | — |
| any_2 | * | — |
| any_3 | * | — |
| any_4 | * | — |
| any_5 | * | — |