Nodes/comfy-easy-grids/Save Image Grid
ComfyUI Node

Save Image Grid

The save node that waits for a full grid

By shockz0rz·Created 3 years ago·Updated 2 years ago· 27
Save Image Grid
  • images
  • column_labels
  • row_labels
  • images_grid_annotation
    x_size1
    y_size1
    filename_prefixComfyUI

    A plain Save Image node writes every image the moment it arrives. That's fine for single generations and useless for a grid - you'd end up with a folder of loose PNGs and a spreadsheet to remember which was which. Save Image Grid is the accumulator half of comfy-easy-grids: it silently collects images until it has a full x_size by y_size grid, then stitches them together, labels them, and saves one PNG. If the workflow name "Create Image Grid" is the for loop, this node is where the loop's results land.

    How it works

    Every time the graph executes, the incoming images get appended to an internal buffer. Once the buffer holds x_size × y_size images, the node assembles them into a grid on a white canvas, writes the file, and clears itself. The index state lives on the node instance, so wiring x_size and y_size from the pack's Create Image Grid node keeps the accumulator in lockstep with the loop.

    The labeling is the nice part. Feed it a STRING_LIST into row_labels or column_labels - the ones this pack's String List and String List from Text Field nodes produce - and it draws black text at the top of each column and down the left of each row, using a Roboto font that ships inside the pack. Or skip both and pass an images_grid_annotation from the Grid Annotations node in the ImagesGrid extension; the pack's README explicitly guarantees compatibility, and it's the smoother path if you already run that plugin.

    The inputs that matter

    • images - your output IMAGE, same as any save node
    • x_size, y_size - grid dimensions (INT, min 1). Wire these from Create Image Grid's outputs
    • filename_prefix - file name base; gets a counter suffix like _00001_.png
    • row_labels, column_labels - optional STRING_LIST labels
    • images_grid_annotation - optional GRID_ANNOTATION from ImagesGrid

    It's an output node with no outputs, so it sits at the end of the graph like Save Image does. Saved files land in ComfyUI's output folder with the usual prompt/workflow metadata baked into the PNG.

    Where people get burned

    If the grid never fills, nothing gets saved. Less than x_size × y_size images and the node returns an empty result - your renders exist only in memory, and they vanish on restart. The author's own guidance is to also attach a regular Save Image node if you want the individual cells saved. Do that.

    Two smaller gotchas: changing x_size or y_size resets the buffer mid-run, and older copies of this node show the sizes as widgets rather than input sockets. If yours does, right-click and pick "Convert x_size to input" and "Convert y_size to input" - the current build exposes them as plain INT inputs, but the README's warning still applies to workflows saved on earlier versions.

    Installing it

    Same pack, same install. Via ComfyUI Manager, search "comfy-easy-grids"; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/shockz0rz/comfy-easy-grids
    

    Restart after either. No extra Python dependencies and no model downloads - the only thing it needs beyond stock ComfyUI is the bundled font, which is in the repo. There's also a "Clear Stored Images" button on the node that hits the pack's /easygrids/reset endpoint when you want to flush the buffer manually.

    Troubleshooting

    Grid looks misaligned or one cell short? Check that the count of images you actually produced matches x_size × y_size - a skipped frame in the loop means the buffer fills with leftovers and the last assembled sheet shifts. And if you're running a saved workflow from someone else, note this node is stateful: it starts empty, so the first run after loading won't produce a grid until the loop completes a full pass.

    CategoryEasyGrids

    Inputs (7)

    NameTypeDefaultDescription
    imagesIMAGE
    x_sizeINT1
    y_sizeINT1
    filename_prefixSTRINGComfyUI
    column_labelsoptSTRING_LIST
    row_labelsoptSTRING_LIST
    images_grid_annotationoptGRID_ANNOTATION

    Outputs (0)

    No outputs