type_AnyListUnpack
Peel a Python list into fixed output slots
- any_list
- 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
ComfyUI loves lists in theory and hates them in practice - a node hands you a list of strings or images, and then you discover most nodes only accept a single value or a tensor batch. type_AnyListUnpack is the bridge: it takes a Python list and spills its elements onto up to 20 fixed output sockets, so each item becomes individually wireable. It's the "unpack" half of the list/batch family in ComfyUI-Apt_Preset's data drawer.
How it works
You feed any_list (any-typed) and set unpack_count (1–20). The node walks the list and assigns element 0 → output_1, element 1 → output_2, and so on, up to the count you asked for. Elements beyond what the list actually contains come out as None.
The distinction from its sibling type_AnyBatchUnpack is worth getting straight: batch unpack splits a tensor batch (image/latent batches, where each element is a sliced tensor), while this one unpacks a Python list - strings, dicts, or any objects that arrived via a LIST-typed wire. Both give you the same fixed-socket outputs, but they eat different shapes. Feed a list of prompt strings here; feed an image batch to the other one.
A few handling details that matter: if the incoming list is nested (a single-element list wrapping another list - a common ComfyUI quirk), it flattens that one level. If the input isn't a list at all, it wraps it as a single-element list rather than crashing. It's defensive where it counts.
Inputs and outputs
- any_list - the list.
- unpack_count - how many of the 20 sockets to fill (default 1).
- output_1 … output_20 - the individual elements, any-type.
The classic use: a text splitter's list_output → unpack → each prompt onto its own branch. Or unpack a list of masks into per-mask wires for independent edits.
Installing it
Same pack, same install. ComfyUI Manager → search ComfyUI-Apt_Preset, or:
cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset
Restart; install.bat on Windows for the pack's requirements. Nothing extra for this node - it's plain Python.
Common issues
None outputs are the whole story: set unpack_count higher than the list length and the tail sockets are None, which downstream nodes usually reject loudly and confusingly. Set count to match what you're feeding. And don't confuse it with the batch unpacker when a tensor shows up - this one expects a list, and while it won't explode on a tensor, you'll get a single-element result and wonder where the rest went. Keep the pair straight and both are dead simple.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| any_list | * | — | |
| 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 | * | — |