Nodes/ComfyUI-iTools/Grid Filler πŸ“²
ComfyUI Node

Grid Filler πŸ“²

Lay a batch of images out into a contact sheet

By MohammadAboulElaΒ·Created 2 years agoΒ·Updated 11 days agoΒ· 237
Grid Filler πŸ“²
  • images
  • images
β—„width1024β–Ί
β—„height1024β–Ί
β—„rows3β–Ί
β—„cols3β–Ί
β—„gaps2.00β–Ί
β—„background_color#000000AAβ–Ί
β—„fill_directionrowsβ–Ί

Feed it a batch of images and a row/column count, and it arranges them into a single grid image - a contact sheet, basically. Useful the moment you're generating more than one variant of something and want to eyeball all of them at once instead of clicking through outputs one at a time: seed comparisons, LoRA strength sweeps, a batch of style variations from Prompt Styler Extra.

How it works

images expects a batch - a single IMAGE tensor holding multiple pictures, not a Python list of separate images. That's a meaningful distinction in ComfyUI: this pack's own Load Images node has an output_mode you'd set to batch (rather than list) specifically to feed this node, and a batch-mode KSampler run produces the same shape naturally. The node then lays those images out into a canvas of the size you specify (width Γ— height), divided into rows Γ— cols cells, with gaps of spacing between them and background_color filling any leftover space. fill_direction decides reading order - rows fills left-to-right then wraps to the next row, cols fills top-to-bottom then wraps to the next column, the same distinction as reading English text versus reading a newspaper column.

The inputs and outputs that matter

  • images - a batched IMAGE input, not a list.
  • width / height - overall canvas size, 256 to 8192, both default 1024.
  • rows / cols - grid shape, 1 to 10 each, both default 3 (a 3Γ—3, nine-cell grid by default).
  • gaps - spacing between cells, default 2, 0 to 50.
  • background_color - hex string, default #000000AA (translucent black - see below).
  • fill_direction - rows or cols, default rows.

Output is a single images - the assembled grid, ready for Save Image or a further pass through Add Text Overlay for a caption.

Installing it

Via ComfyUI Manager: search "iTools" or "ComfyUI-iTools," install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/MohammadAboulEla/ComfyUI-iTools

then restart.

Troubleshooting

Node errors or produces something clearly wrong when you wire in your images. Check that whatever's feeding images is genuinely a batch and not a list - a Load Images node left on list mode, or an image list from a loop, won't necessarily plug in the way you expect. Set the upstream node to batch output, or route through a node that stacks a list into a batch first.

Grid has more empty cells than you expect. If you have fewer images in the batch than rows Γ— cols, the extra cells stay empty (filled with background_color) rather than the grid resizing itself down. Either supply enough images to fill the grid or shrink rows/cols to match your actual batch size.

Background shows through where you expected solid color, or cells look tinted. The default background_color is #000000AA - 8-digit hex with an alpha channel, and AA is roughly two-thirds opacity rather than solid. If you want a genuinely opaque background behind your grid, push the last two hex digits toward FF.

Images look squished or stretched inside their cells. Each image gets fit into a cell sized by your canvas dimensions divided by your row/column count - if your source images don't share the same aspect ratio as that cell shape, expect some distortion or letterboxing rather than a perfect fit. Match your canvas dimensions to your images' aspect ratio times the grid shape if this matters to you.

CategoryiTools

Inputs (8)

NameTypeDefaultDescription
imagesIMAGEβ€”
widthINT1024256–8192β€”
heightINT1024256–8192β€”
rowsINT31–10β€”
colsINT31–10β€”
gapsFLOAT2.000–50β€”
background_colorSTRING#000000AAβ€”
fill_directionCOMBOrows2 options: rows, cols

Outputs (1)

NameTypeDescription
imagesIMAGEβ€”