type_AnyBatchUnpack
One batch in, up to 20 single items out
- any_batch
- output_1
- output_2
- output_3
- output_4
- output_5
- output_6
- output_7
- output_8
- output_9
- output_10
- output_11
- output_12
- output_13
- output_14
- output_15
- output_16
- output_17
- output_18
- output_19
- output_20
Sometimes you need to get at one thing inside a batch, and ComfyUI doesn't make that easy. type_AnyBatchUnpack is the sledgehammer: it takes a batch of anything - an image batch, a latent batch, a list of prompts - and hands you individual items on separate output wires. Up to 20 of them. If you've ever wanted "give me frame 3 of this image batch as its own image," this is the node.
It's part of ComfyUI-Apt_Preset's data utility drawer, a pack that leans heavily on "any" types to move data around without you caring what it actually is. That flexibility is the whole point here.
How it works
Feed any_batch anything with a batch dimension and pick an unpack_count. The node slices:
- a torch tensor along its batch axis (so an IMAGE of shape
[B, H, W, 3]becomes B single images, each[1, H, W, 3]), - or a Python list/tuple item by item.
unpack_count (1–20) says how many of the 20 output sockets actually fill up. Slots beyond the count - or beyond what the batch actually contains - come out as None. So if you set count to 6 but only feed 3 items, outputs 4–6 are None, and it's on you to not wire None into something that chokes on it.
The outputs are all any-type (output_1 through output_20), which is the feature and the hazard at once: the node doesn't tell ComfyUI what it's passing, so the wiring is up to you. Put an image batch in, get single images out; put a list of strings in, get strings out.
Inputs and outputs
- any_batch - the batch to split.
- unpack_count - how many outputs to populate (default 1).
- output_1 … output_20 - individual items, any-type.
The natural pairing: any node that produces a batch (a Load Image Batch, a KSampler's latent, a wildcard list) → unpack → fan out into per-item branches.
Installing it
Same pack, one install. ComfyUI Manager → search ComfyUI-Apt_Preset, or:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
Restart ComfyUI; on Windows run install.bat for the pack's requirements. This node itself needs nothing beyond core ComfyUI.
Common issues
The two traps: None outputs. If unpack_count is bigger than the batch, you get Nones and downstream nodes fail with type errors that can be baffling because the error points at the consumer, not this node. Set unpack_count to what you actually feed. Second: because outputs are any-type, ComfyUI won't catch a mismatch - wiring an unpacked latent into an image input will fail at runtime with a cryptic message. Check your assumptions once and this node is boring in the best way.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| any_batch | * | — | |
| unpack_count | INT | 11–20 | — |
Outputs (20)
| Name | Type | Description |
|---|---|---|
| output_1 | * | — |
| output_2 | * | — |
| output_3 | * | — |
| output_4 | * | — |
| output_5 | * | — |
| output_6 | * | — |
| output_7 | * | — |
| output_8 | * | — |
| output_9 | * | — |
| output_10 | * | — |
| output_11 | * | — |
| output_12 | * | — |
| output_13 | * | — |
| output_14 | * | — |
| output_15 | * | — |
| output_16 | * | — |
| output_17 | * | — |
| output_18 | * | — |
| output_19 | * | — |
| output_20 | * | — |