Merge PyList
Concatenate raw Python lists without waking up List processing
- PYLIST
The PyList counterpart to Merge List. If you've got two PYLIST values floating around your graph - say, file lists from two separate List Dir calls pointed at different folders, or arrays you built by hand with Create PyList - and you want them combined into one array without triggering any per-item execution, this is the node.
How it works
Dynamic sockets again, same mechanic as the rest of the pack's bundling nodes: connect a PYLIST to the last empty input and another appears. Every PyList you wire in gets concatenated, in connection order, into one output PYLIST. Because a PyList is just a raw Python list under the hood, this behaves exactly like Python's list_a + list_b - order preserved, duplicates preserved, nothing deduplicated or sorted for you.
The reason this exists as a separate node from Merge List is the same reason the whole pack splits List and PyList everywhere: merging two PYLISTs doesn't touch ComfyUI's execution model at all. Nothing runs per-item. You get one array value out, the same shape of thing you put in, just longer.
The inputs and outputs that matter
No fixed inputs - sockets are added dynamically as you connect PYLIST values. The output is a single PYLIST containing everything from every connected input, concatenated in the order you wired them. From there it behaves like any other PyList in the pack: index into it with PyList: Get By Index, slice it with PyList: Slice, count it with Get Length, or run it through PyList To List if you decide you want List-processing after all.
How to install it
ComfyUI Manager: search "ComfyUI-List-Utils," install, restart. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/godmt/ComfyUI-List-Utils.git
Restart afterward. No models to fetch, no non-standard dependencies - it's list concatenation on plain Python values, as lightweight as this pack gets.
Common issues & troubleshooting
Connection refused when wiring a List into this node. Expected - Merge PyList wants PYLIST inputs specifically, not ComfyUI's native List-processing values. If what you have is a List, run it through List To PyList first to collect it into one array value, then merge.
Combined list is way longer than expected and downstream processing takes forever once you convert it to a real List. Same trap as Merge List: merging is concatenation, not a zip or a set union, so two 500-item PyLists become one 1000-item PyList. That's usually fine while it stays a PyList (it's just one value sitting in memory), but if you then run it through PyList To List to actually process every item, you've just doubled your per-item run count. Worth double-checking with Get Length before you commit a big merged list to a real per-item pipeline.
You need the merged result to trigger a per-item run. A PYLIST, merged or not, never triggers List processing by itself. Feed the output of this node into PyList To List when you're ready to actually loop over it.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| PYLIST | PYLIST | The concatenated PyList. |