Nodes/Mickmumpitz-Nodes/Unpack Image Collection
ComfyUI Node

Unpack Image Collection

Turn a dozen separate generations into one image batch

By mickmumpitz·Created 9 months ago·Updated 4 days ago· 54
Unpack Image Collection
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • input_9
  • input_10
  • input_11
  • input_12
  • input_13
  • input_14
  • input_15
  • input_16
  • input_17
  • input_18
  • input_19
  • input_20
  • input_21
  • input_22
  • input_23
  • input_24
  • input_25
  • input_26
  • input_27
  • input_28
  • input_29
  • input_30
  • input_31
  • input_32
  • input_33
  • input_34
  • input_35
  • input_36
  • input_37
  • input_38
  • input_39
  • input_40
  • input_41
  • input_42
  • input_43
  • input_44
  • input_45
  • input_46
  • input_47
  • input_48
  • input_49
  • input_50
  • input_51
  • input_52
  • input_53
  • input_54
  • input_55
  • input_56
  • input_57
  • input_58
  • input_59
  • input_60
  • input_61
  • input_62
  • input_63
  • input_64
  • input_65
  • input_66
  • input_67
  • input_68
  • input_69
  • input_70
  • input_71
  • input_72
  • input_73
  • input_74
  • input_75
  • input_76
  • input_77
  • input_78
  • input_79
  • input_80
  • input_81
  • input_82
  • input_83
  • input_84
  • input_85
  • input_86
  • input_87
  • input_88
  • input_89
  • input_90
  • input_91
  • input_92
  • input_93
  • input_94
  • input_95
  • input_96
  • input_97
  • input_98
  • input_99
  • input_100
  • input_101
  • input_102
  • input_103
  • input_104
  • input_105
  • input_106
  • input_107
  • input_108
  • input_109
  • input_110
  • input_111
  • input_112
  • input_113
  • input_114
  • input_115
  • input_116
  • input_117
  • input_118
  • input_119
  • input_120
  • input_121
  • input_122
  • input_123
  • input_124
  • input_125
  • input_126
  • input_127
  • input_128
  • images
◄source►
◄target_sizefirst►
◄fitstretch►

Say you generate a character sheet, or four poses, or forty variations, each from its own sampler - and now you want to run them all through one batch operation (upscale, video-feed, color-correct, whatever). The problem is they're scattered across different nodes with different dimensions and different channel counts. Unpack Image Collection is the gather point: it collects every image you've tagged with a shared name and stacks them into a single uniform batch.

This is the receiver half of a two-node pair in Mickmumpitz-Nodes. The sender is Image Collect, which sits on an image output and just tags it (it's a pure pass-through - the image goes through unchanged). Give several Image Collect nodes the same name, then this node selects that name and every matching image arrives as one images batch, resized to a common size.

How it works

The mechanism is the pack's favorite trick: a queue-time prompt handler. When you submit, the handler finds every Image Collect node with the matching name and injects its image into one of the 128 hidden input_N slots this node declares. No wiring needed on your part - you just set source to the shared name and connect the output.

Because images land from different generators, they need unifying. That's what the two enum settings do:

  • target_size - whose dimensions win: first (the first image collected), largest, or smallest.
  • fit - how each image is squeezed into that size: stretch (ignores aspect ratio), pad (fits inside, black bars), or crop (covers, center-cropped).

Channels are padded too - if one input is RGB and another is RGBA, everything becomes RGBA so the stack is valid.

Inputs and outputs

The only things you'll actually touch:

  • source (STRING) - the shared name, must match the Image Collect tags you want to gather. This is the one to get right; a typo and you collect nothing.
  • target_size and fit - set once for your workflow; first + stretch is the fastest default if all your outputs are already the same size.

Output is a single images IMAGE tensor (a batch), which wires straight into whatever batch-processing node you were pointing at one image before.

Where it fits

This shines in the iterative/consistent-character workflows this pack is known for - Mickmumpitz is a YouTuber whose character-sheet and video setups generate lots of parallel branches that need recombining. Collect-then-unpack is also handy for feeding a video model a stack of context frames you built in several separate runs.

Installing

One pack, one install: ComfyUI Manager → search "Mickmumpitz" → install → restart. Or:

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

Just numpy, Pillow, opencv-python under the hood. There's a companion JS file (collect.js) that the pack loads automatically, so the tag widgets work out of the box.

Gotchas

If nothing shows up, you almost certainly have a name mismatch between the Collect and Unpack nodes, or the Collect nodes were created after the workflow was last queued - re-queue and it should appear. If resolutions differ wildly, pad and crop behave very differently from stretch, so pick deliberately. And there's a ceiling: up to 128 tagged images can be gathered, which is generous, but a runaway loop of Collects can hit it.

CategoryMickmumpitz/Utils

Inputs (131)

NameTypeDefaultDescription
sourceSTRING—
target_sizeCOMBOfirst3 options: first, largest, smallest
fitCOMBOstretch3 options: stretch, pad, crop
input_1optIMAGE—
input_2optIMAGE—
input_3optIMAGE—
input_4optIMAGE—
input_5optIMAGE—
input_6optIMAGE—
input_7optIMAGE—
input_8optIMAGE—
input_9optIMAGE—
input_10optIMAGE—
input_11optIMAGE—
input_12optIMAGE—
input_13optIMAGE—
input_14optIMAGE—
input_15optIMAGE—
input_16optIMAGE—
input_17optIMAGE—
input_18optIMAGE—
input_19optIMAGE—
input_20optIMAGE—
input_21optIMAGE—
input_22optIMAGE—
input_23optIMAGE—
input_24optIMAGE—
input_25optIMAGE—
input_26optIMAGE—
input_27optIMAGE—
input_28optIMAGE—
input_29optIMAGE—
input_30optIMAGE—
input_31optIMAGE—
input_32optIMAGE—
input_33optIMAGE—
input_34optIMAGE—
input_35optIMAGE—
input_36optIMAGE—
input_37optIMAGE—
input_38optIMAGE—
input_39optIMAGE—
input_40optIMAGE—
input_41optIMAGE—
input_42optIMAGE—
input_43optIMAGE—
input_44optIMAGE—
input_45optIMAGE—
input_46optIMAGE—
input_47optIMAGE—
input_48optIMAGE—
input_49optIMAGE—
input_50optIMAGE—
input_51optIMAGE—
input_52optIMAGE—
input_53optIMAGE—
input_54optIMAGE—
input_55optIMAGE—
input_56optIMAGE—
input_57optIMAGE—
input_58optIMAGE—
input_59optIMAGE—
input_60optIMAGE—
input_61optIMAGE—
input_62optIMAGE—
input_63optIMAGE—
input_64optIMAGE—
input_65optIMAGE—
input_66optIMAGE—
input_67optIMAGE—
input_68optIMAGE—
input_69optIMAGE—
input_70optIMAGE—
input_71optIMAGE—
input_72optIMAGE—
input_73optIMAGE—
input_74optIMAGE—
input_75optIMAGE—
input_76optIMAGE—
input_77optIMAGE—
input_78optIMAGE—
input_79optIMAGE—
input_80optIMAGE—
input_81optIMAGE—
input_82optIMAGE—
input_83optIMAGE—
input_84optIMAGE—
input_85optIMAGE—
input_86optIMAGE—
input_87optIMAGE—
input_88optIMAGE—
input_89optIMAGE—
input_90optIMAGE—
input_91optIMAGE—
input_92optIMAGE—
input_93optIMAGE—
input_94optIMAGE—
input_95optIMAGE—
input_96optIMAGE—
input_97optIMAGE—
input_98optIMAGE—
input_99optIMAGE—
input_100optIMAGE—
input_101optIMAGE—
input_102optIMAGE—
input_103optIMAGE—
input_104optIMAGE—
input_105optIMAGE—
input_106optIMAGE—
input_107optIMAGE—
input_108optIMAGE—
input_109optIMAGE—
input_110optIMAGE—
input_111optIMAGE—
input_112optIMAGE—
input_113optIMAGE—
input_114optIMAGE—
input_115optIMAGE—
input_116optIMAGE—
input_117optIMAGE—
input_118optIMAGE—
input_119optIMAGE—
input_120optIMAGE—
input_121optIMAGE—
input_122optIMAGE—
input_123optIMAGE—
input_124optIMAGE—
input_125optIMAGE—
input_126optIMAGE—
input_127optIMAGE—
input_128optIMAGE—

Outputs (1)

NameTypeDescription
imagesIMAGE—