ZML_复制到列表
One input, N copies — the cheapest batch hack in the pack
- 输入
- 列表
This is a one-trick node: take any single value, duplicate it N times, and hand you back a list. It looks almost too dumb to exist, but it's one of those plumbing nodes that makes list-aware workflows click. ComfyUI's execution engine treats a list output as a signal to run the downstream nodes once per item - so this node is how you turn "process this one thing" into "process this one thing N times" without adding a loop node.
How it works
The mechanism is a single flag. The node marks its output OUTPUT_IS_LIST = True, and ComfyUI's execution engine then expands the graph: every node downstream of this one runs once per list item, with the item fed in. The input socket accepts anything (*), so you can copy images, prompts, seeds, models - whatever you're wiring.
In the README's own words, the author discovered ComfyUI can auto-process lists "like n8n" and went on a list-node spree. This is one of the simpler results. For example: copy a prompt 4 times, feed the list to a batch-image node, and get four images with the same prompt wired from a single string.
The inputs
- 输入 - the value to duplicate. Any type.
- 复制次数 - 1 to 100 copies. That's the whole config.
Output is a single 列表 (list) socket, and it's flagged as a list. Downstream nodes that accept single values will still work - the engine unwraps the list for them - so in practice you rarely have to think about the flag unless something starts misbehaving with batching.
Installing
Standard ZML pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
Restart ComfyUI, or install via ComfyUI Manager (search "ComfyUI-ZML-Image"). English users should grab the translation patch from https://github.com/zml-w/ZZZ_ZML_English_Patch since the pack's labels are Chinese. This node drags in nothing extra beyond the pack's base dependencies.
Common issues
The realistic gotchas here are ComfyUI list semantics, not this node. First, an index-driven "sequential" workflow wants a counter, not copies - if you need item 1, then item 2, then item 3, ZML_Get_Item_From_List is the node you want instead. Second, if you copy an image batch expecting N distinct images, you get N identical images - copies are identical by definition. And third, the engine expands lists on every execution path, so a copied value feeding two different branches can double the work. For batch-parallel jobs this is exactly the point; just don't be surprised when "I duplicated my seed list" turns a 30-second run into a 2-minute one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| 输入 | * | — | |
| 复制次数 | INT | 11–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 列表 | * | — |