Nodes/ComfyUI_Swwan/List Merge
ComfyUI Node

List Merge

Splice any number of lists into one

By aining2022·Created 9 months ago·Updated 11 days ago· 33
List Merge
    • *

    Some ComfyUI nodes want everything at once - a full list of images, prompts, or latents - and getting there means gluing several lists together. list_Merge is the glue. Connect two or more list-typed outputs into it and it returns a single concatenated list. It's the list-world equivalent of the pack's MergeBatch for batches: fewer nodes, one clean output.

    It lives in a category the pack's author clearly didn't put much thought into - Apt_Preset/data/😺backup - which is your first hint that these data-utility nodes were dragged along from an older personal setup rather than designed for public consumption. The interface is equally no-fuss.

    How it works - no fixed inputs

    Here's the unusual part: this node declares no fixed inputs at all. The info_schema shows an empty required and optional set. What actually happens is the node reads the workflow graph at runtime, finds every input you've wired into it, and merges them all as lists. The implementation collects each connected input and concatenates them in order - so list order is preserved, and your first connected input ends up at the front of the merged output.

    Practically: just drag wires in from any list-producing nodes. There's no input to create, no count to configure - the node sees what's connected and merges it. The output is marked as a list, so it plugs straight into anything expecting a list (the pack's list_Slice, batch-to-list converters, and the usual list-aware custom nodes).

    Inputs and outputs

    Invisible inputs - connect whatever lists you have. Output: one merged list. That's the entire contract. The type is Any, so you can merge lists of images, lists of strings, lists of latents, or a mismatched grab-bag if you're feeling chaotic (though downstream nodes will usually want them all the same type).

    Installing it

    It ships in ComfyUI_Swwan:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aining2022/ComfyUI_Swwan
    pip install -r ComfyUI_Swwan/requirements.txt
    

    Or install via ComfyUI Manager, search "ComfyUI_Swwan".

    Where people get burned

    Because the inputs are dynamic, ComfyUI can't always validate connections before execution - a wrong-typed wire may only fail at runtime rather than showing red immediately. And there's a real-world trap that bit a few people: the pack shares code lineage with KJNodes and other big packs, so ComfyUI Manager's conflict detector has occasionally flagged ComfyUI_Swwan when both are installed. If you see a "conflict with ComfyUI_Swwan" warning while updating KJNodes, check whether the actual missing node is really from this pack - one r/comfyui thread turned out to be a red herring, fixed by reinstalling the other pack entirely. If you don't recognize the node name, verify the source before assuming.

    CategoryApt_Preset/data/😺backup

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    **