Nodes/ComfyUI-Apt_Preset/list_MergeList
ComfyUI Node

list_MergeList

Combining multiple lists into one in ComfyUI

By cardenluo·Created 2 years ago·Updated 17 days ago· 309
list_MergeList
    • *

    Once you start splitting and slicing lists in ComfyUI (with this pack's list_ListSlice, say, or by branching a batch into separate processing paths), you eventually need to stitch them back together. list_MergeList is cardenluo's ComfyUI-Apt_Preset node for that - the concatenation counterpart to slicing.

    What it does

    This node lives in the pack's data/list utility group, right alongside list_ListSlice and list_num_range. Its published contract is minimal by design: no fixed required or optional inputs, and a single wildcard (*) output marked as a list. That's the signature of a variadic node - one built to accept however many list inputs you connect, rather than a fixed count baked into the node definition. In practice, expect this to work the way ComfyUI's other merge-style nodes do: you connect your first list, and the node's UI grows an additional input slot (often via a small "+" control on the node) each time you fill one, letting you merge two, three, or more lists in a single node instead of chaining separate two-input merges.

    Because the type is a bare wildcard on both sides, it should merge lists of any matching type - images, floats, strings - as long as everything you feed in is the same underlying type; ComfyUI's type system doesn't stop you from wiring mismatched types into a wildcard slot, but the node's own logic (or whatever consumes the merged output) will.

    Inputs and outputs

    No fixed required/optional inputs are declared - inputs are added dynamically as you connect lists. Output: a single *-typed list, the concatenation of everything you fed in, in the order you connected them.

    Where this fits

    Reach for this after you've branched a batch for different processing (say, running two different upscale settings on two halves of a batch) and need one combined list again before a final save or preview step. It's also the natural partner to list_ListSlice when you're reassembling a list from pieces - slice out the parts you want from two different sources, merge them back into one sequence.

    Installing it

    ComfyUI Manager: search ComfyUI-Apt_Preset. Manual install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git
    

    Run install.bat (Windows) or install requirements.txt by hand, restart ComfyUI. No external models needed - this is a pure data-handling node.

    Troubleshooting

    Check for a clean pack import before anything else. ComfyUI-Apt_Preset bundles a lot of functionality, and there's a real report of the whole pack throwing IMPORT FAILED for a user - if list_MergeList isn't in your node search, look at the ComfyUI console on startup for the actual missing-dependency error rather than assuming your install of this one node is wrong.

    Beyond that, because the node accepts dynamically-added slots rather than fixed named inputs, the most common confusion is simply not knowing how to add a second or third input in the UI - look for a "+" affordance on the node itself, or right-click the node for an "add input" option, rather than expecting extra slots to appear automatically. And since the node doesn't enforce type-matching between merged lists on its own, if your merged output behaves strangely downstream, double-check every list you fed in is actually the same type - a batch of images merged with a list of floats will "work" at the graph-connection level and then break wherever the merged data actually gets used.

    CategoryApt_Preset/data/list|Batch

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    **