ZML_合并到列表
Twenty arbitrary inputs, one list output — the pack's batch plumbing
- 输入1
- 输入2
- 输入3
- 输入4
- 输入5
- 输入6
- 输入7
- 输入8
- 输入9
- 输入10
- 输入11
- 输入12
- 输入13
- 输入14
- 输入15
- 输入16
- 输入17
- 输入18
- 输入19
- 输入20
- 列表
A node that does one thing: takes up to twenty inputs of any type and hands them back as a list. ZML_MergeToList is pure plumbing - the kind of node the KB's node-plumbing doc calls the 70% of every workflow - and its entire reason to exist is that ComfyUI treats lists as something special.
What's special: when a node's output is marked as a list, downstream nodes that accept that type will run once per item, iterating the whole list. That's how you turn a fixed set of inputs into a batch operation - collect five images, emit them as a list, and the next node processes each one. The README's 2025.12 update spells out the author's discovery: "发现ComfyUI也可以像n8n那样自动处理多个item(ComfyUI里是列表),所以做了很多输出列表的节点." This node is that discovery in its purest form.
How it behaves
- 输入1 through 输入20, all optional, all
*(any type). Connect what you have; unused inputs are skipped. Like the rest of the pack's dynamic-input nodes, the visible ports adapt to what you plug in. - 列表 output - a list of everything connected.
One guardrail worth knowing: the node checks that later inputs are the same type as the first one. If input 1 is an image and you wire in a string, the string is ignored with a console warning rather than poisoning the list. The check is loose (isinstance on the concrete type), so don't expect it to be airtight - it's there to stop obvious downstream crashes, not to be a type system.
If nothing is connected at all, it returns an empty list rather than erroring - which will then just error whatever consumes it, but at least the failure is downstream where you can see it.
When you'd reach for it
Three patterns cover most uses:
- Turn parallel inputs into a batch. Five images from five loader paths → one list → one processing node runs five times.
- Feed the pack's own list machinery. The ZML text nodes, merge nodes, and the multi-threaded sub-workflow container all speak lists; this is the adapter that connects a fixed set of values to them.
- Combine a fixed number of prompt fragments into a list for list-iterating encoders.
It's also the node to pair with ZML_MergeText when you want the list version of merged text rather than the joined-string version.
Install
One of 160+ nodes in ComfyUI-ZML-Image:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
# restart ComfyUI
or ComfyUI Manager → search "ComfyUI-ZML-Image". Zero dependencies beyond the pack baseline - it's a few lines of Python. Chinese-first UI; translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
The honest assessment: it's a tiny utility node, and the "type consistency is loosely enforced" behavior is the only trap. If your downstream node gets a weird error, check whether you accidentally mixed types into the list. Otherwise it just works - which is exactly what plumbing should do.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| 输入1opt | * | — | |
| 输入2opt | * | — | |
| 输入3opt | * | — | |
| 输入4opt | * | — | |
| 输入5opt | * | — | |
| 输入6opt | * | — | |
| 输入7opt | * | — | |
| 输入8opt | * | — | |
| 输入9opt | * | — | |
| 输入10opt | * | — | |
| 输入11opt | * | — | |
| 输入12opt | * | — | |
| 输入13opt | * | — | |
| 输入14opt | * | — | |
| 输入15opt | * | — | |
| 输入16opt | * | — | |
| 输入17opt | * | — | |
| 输入18opt | * | — | |
| 输入19opt | * | — | |
| 输入20opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 列表 | * | — |