Nodes/MTB Nodes/Concat Images (mtb)
ComfyUI Node Runs on cloud

Concat Images (mtb)

Merge image batches, with size mismatches handled

By melMass·Created 3 years ago·Updated about a month ago· 721
Concat Images (mtb)
    • IMAGE
    reversefalse
    on_mismatchSmallest

    Concat Images does one plain job - add images to a batch - but it does the one thing its plainer sibling Batch Sequence doesn't: it copes when the inputs aren't the same size. That's a small difference on paper and a real time-saver in practice, because "combine these image batches" is a constant need across ComfyUI workflows and mismatched dimensions are the single most common reason that fails.

    What it does

    You wire in multiple image batches - this node uses the same "dynamic inputs" pattern a few other mtb nodes rely on (the pack's own Debug node calls this out directly): rather than a fixed number of declared sockets, ComfyUI grows a new input slot on the node as you connect more wires. The result is everything concatenated into one combined batch, in the order you wired them, or reversed if you flip the toggle.

    The inputs and output that matter

    • reverse (default false) - flips the join order of whatever you've wired in.
    • on_mismatch (optional, default Smallest) - what to do when the incoming batches aren't the same resolution: Error stops the workflow outright so you notice and fix it upstream, Smallest downsizes everything to match the smallest input, Largest upsizes everything to match the largest. Smallest as the default means this node will silently resize your images if you don't override it - worth knowing before you wonder why an output looks softer than expected.

    Output is a single IMAGE - the merged batch.

    Installing it

    ComfyUI Manager: search MTB Nodes, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/melMass/comfy_mtb
    

    then restart ComfyUI. No models, no heavy dependencies.

    Common issues

    The default on_mismatch: Smallest is convenient but it's a quality trade you might not want without knowing it's happening - if one of your input batches is meaningfully lower-resolution than the others, this node will quietly downscale everything to match it rather than erroring. Set on_mismatch to Error while you're building a workflow so mismatches surface immediately, then relax it back to Smallest or Largest once you trust your pipeline produces consistent sizes.

    The dynamic-inputs mechanic can also be confusing the first time you see it - you won't find an "images" list in the node's own settings panel, because the batches themselves are attached by wiring, not configured as a widget. That's expected behavior for this node, not a missing feature.

    And the pack-wide note: MTB logs [comfy_mtb] Some nodes (N) could not be loaded at startup instead of crashing when one node fails to import, with a pointer to http://127.0.0.1:8188/mtb for the real cause - confirmed by other users' actual install logs. Check that line first if Concat Images doesn't appear after installing the pack.

    Categorymtb/image

    Inputs (2)

    NameTypeDefaultDescription
    reverseBOOLEANfalse
    on_mismatchoptCOMBOSmallest3 options: Error, Smallest, Largest

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE