Nodes/MTB Nodes/Save Image Grid (mtb)
ComfyUI Node Runs on cloud

Save Image Grid (mtb)

Tile a whole batch into one contact sheet

By melMass·Created 3 years ago·Updated about a month ago· 721
Save Image Grid (mtb)
  • images
    filename_prefixComfyUI
    save_intermediatefalse

    Take an image batch - four seeds, nine CFG values, whatever you fanned out for comparison - and instead of saving N separate PNGs you have to click through one by one, this node tiles the whole batch into a single grid image and saves that. It's the contact-sheet node: drop it at the end of a comparison graph so you can eyeball everything at once.

    What it does and why it beats plain Save Image for this job

    Native SaveImage writes each image in a batch as its own file with a shared prefix and an incrementing counter. Fine for a single output, tedious for comparisons - you end up opening half a dozen files in a row to see how a sweep landed. Save Image Grid composites the batch into one image instead, rows and columns worked out from the batch size, and writes that. One file, one glance, done.

    Inputs and outputs

    Three inputs, no outputs - this is a terminal, output-node type of thing, same class as native SaveImage:

    • images - the batch you're gridding. Plug in the output of a KSampler → VAE Decode chain that produced more than one image.
    • filename_prefix - default ComfyUI, same convention as the native save node.
    • save_intermediate - when on, it also saves each individual image in the batch alongside the grid, so you get the overview and the full-res originals from the same run. Leave it off if you only want the grid and don't want the extra files cluttering your output folder.

    Nothing to wire downstream - the grid gets written to your ComfyUI output directory and the chain ends there.

    When you'd actually reach for this

    Seed comparisons, CFG sweeps, LoRA-strength sweeps - anywhere you're batching the same prompt across a range of one variable and want to compare results without leaving the editor. It's also a handy sanity check after changing a workflow: run a batch of four, glance at the grid, confirm nothing broke, move on. If you only ever generate one image at a time, you don't need this node - native SaveImage covers you fine.

    Installing it

    ComfyUI Manager: search "MTB Nodes" and install, or clone by hand:

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

    Restart either way. If any mtb node fails to import afterward, cd into the comfy_mtb folder and run pip install -r requirements.txt - Manager doesn't always catch every dependency this pack needs, and that's the fix a few users landed on for exactly that symptom.

    Common issues

    You'll probably see a startup message that some mtb nodes "could not be loaded" and to check http://127.0.0.1:8188/mtb for details - ignore it unless Save Image Grid itself is missing from your node search. That message covers the pack's optional extras (face-swap, DeepBump), which have their own manual install steps and heavier dependencies; core I/O nodes like this one don't need any of that. One real gotcha specific to this node: layout is driven by batch size, so feeding it a batch of one just returns a single image - nothing wrong, just nothing to grid.

    Categorymtb/IO

    Inputs (3)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGComfyUI
    save_intermediateBOOLEANfalse

    Outputs (0)

    No outputs