List Any (Append)
Two Lists, One Wire, No Type Arguments
- any_1
- any_2
- list
Sooner or later your workflow has two branches that produce the same kind of thing and one consumer that should see both. Four images from a batch split, six from a loop. Boxes from a face detector, boxes from a hand detector. The merge is one concatenation. The reason it needs a node is that ComfyUI's list semantics get in the way: wire two lists into a node with ordinary inputs and it runs once per pair, so you get the concatenation of item 0 with item 0, item 1 with item 1, and so on - not the union you meant.
This node is the trick done properly. Both inputs are declared as list inputs and both are *, so it receives the whole of each container in one execution and hands back one bigger list.
How it works
Both any_1 and any_2 arrive as containers. The node checks they really are lists or tuples, and then:
- if the first is empty - or is a single
None, which is how an unconnected socket shows up - it returns the second one unchanged; - otherwise it returns first items followed by second items.
That is all. It never inspects what is inside an item, never counts, never dedupes, never sorts, and never converts. Which is exactly why it works for every type in the graph: images, masks, latents, conditionings, SEGS, boxes, strings.
The fallback branch is the quietly useful part. Because an unwired input reads as empty, you can build an "either this branch or that branch" merge by leaving one side unconnected, or by feeding a branch that produces nothing under some condition. That gives you a fallback without a switch node and without a selector widget.
Inputs and outputs
any_1, any_2 in; list out, flagged as a list so downstream nodes run per item again.
Order is fixed - anything from the first input comes before anything from the second. If you need the merge to happen in the other order, swap the wires; there is no ordering parameter, and that is fine because there is nothing to get wrong.
Typical shapes: merging a collection you split into a list with a list you accumulated in a loop, so one save node handles everything; combining boxes from two detectors before a per-box crop pass; stacking per-image results from two different samplers into one interleaved batch when you are comparing settings.
Install
Part of ComfyUI-Utility-Suite. ComfyUI Manager → search ComfyUI-Utility-Suite → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/tom-m-2020/ComfyUI-Utility-Suite
Restart ComfyUI. No models, no downloads, no extra dependencies beyond the pack's declared opencv-python-headless. It is written against the newer V3 node API, so keep ComfyUI reasonably current - and note the pack's README is empty, so the info panel is the only field documentation you will find.
Traps
Nothing type-checks the merge. Both sockets are *, which is the entire reason the node is type-agnostic and also the reason you can concatenate latents with images and only discover it two nodes later. The failure message will come from whatever consumed the mess, not from here - so when something downstream complains about a mixed list, look upstream at the merge.
Mixing lengths is the interesting case, not an error. Feeding a three-item list and a five-item list gives you eight items. Nothing pairs them; if you were expecting per-pair behaviour you wanted a different node, and the reason the graph "only used the first three" is that a node downstream iterated only as far as something else allowed.
A single value is a one-item list. If one of the inputs is not a list at all, the engine wraps what it sends and you get a one-item list, so the merge still works - it just contributes one thing. That is usually what you want and occasionally why an output has an unexpected extra item.
It will not flatten a list of lists. Merge a list of batches with another list of batches and you get more batches, not one long batch. Convert to a flat list first (or split items individually) if that is what you meant.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| any_1 | * | — | |
| any_2 | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| list | * | — |