Nodes/Mickmumpitz-Nodes/Collect Image
ComfyUI Node

Collect Image

Tag images here, gather them anywhere

By mickmumpitz·Created 8 months ago·Updated 9 days ago· 47
Collect Image
  • image
  • image
name
order0

Some images in your graph are produced in awkward places - deep inside a subgraph, in the middle of a branch that fans out and never re-converges. Dragging a wire back to where you need them is either impossible or turns your graph into spaghetti. ImageCollect solves it with a name instead of a cable: drop one on any number of image outputs, give them the same name, and a companion ImageCollectUnpack node gathers them all into one batch wherever you put it.

It's a pass-through node - the image output is the input, unchanged - so it can also sit inline and not disturb data flow. The wiring magic happens because collection is handled by a prompt handler after the frontend flattens subgraphs, not by a physical connection. That's the part that makes it work "across subgraph boundaries," which is exactly the case that cables can't.

How it works

Inputs:

  • image - required, the IMAGE to tag.
  • name - the collection key. All ImageCollect nodes sharing a name feed the same ImageCollectUnpack (also in this pack, in the Utils category).
  • order - an INT (default 0) to control the order images land in the gathered batch. Use it when the collection order from the graph isn't the order you want.

Output: image, the input unchanged. So "collecting" costs you nothing - the node is safe to insert anywhere in a pipeline.

The mental model: it's the collect-by-label pattern, and it earns its keep the moment a workflow stops being a straight line. If you've ever built a "gather every variation" workflow by hand-wiring N branches into one concat, this is the version that doesn't fall over when you add branch N+1.

Where it fits

  • Subgraph output gathering - a subgraph generates several images; ImageCollect inside it tags them; one ImageCollectUnpack outside receives the whole set.
  • Variation grids - several generation paths each tagged variants, collected and compared or saved in one place.
  • Cleaner graphs - replacing long backtracking wires with a name-based rendezvous.

Installing it

Part of Mickmumpitz-Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git

or ComfyUI Manager → search "Mickmumpitz" → install → restart. No downloads, no heavy deps - numpy, Pillow, opencv-python only.

Troubleshooting

  • Unpack node empty - the name strings don't match, or the collecting subgraph never ran. Names are exact strings; a trailing space is a different key.
  • Ordering looks random - collection order follows graph/subgraph execution order, which isn't deterministic across runs. Set order explicitly if order matters.
  • Forgetting the unpack node - ImageCollect alone does nothing visible; it's only meaningful paired with ImageCollectUnpack. If you expected images to appear somewhere, that's the missing half.
CategoryMickmumpitz/Utils

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
nameoptSTRING
orderoptINT0-100000–100000

Outputs (1)

NameTypeDescription
imageIMAGE