Nodes/Comfyui-TOO-Pack/TOO Image Grid from Batch with Alpha
ComfyUI Node

TOO Image Grid from Batch with Alpha

Contact sheets that keep your transparency

By tetsuoo-onlineΒ·Created 9 months agoΒ·Updated about a month agoΒ· 5
TOO Image Grid from Batch with Alpha
  • images
  • grid_image
β—„grid_cols2β–Ί
β—„grid_rows2β–Ί
β—„padding0β–Ί

ComfyUI ships a couple of built-in grid nodes, but they flatten alpha to a background color. If you work with transparent images - layer renders, cutouts, composited elements, anything with an RGBA batch - that's a dealbreaker. TOO Image Grid from Batch exists specifically for that case: it tiles a batch of images into a contact sheet and keeps the alpha channel intact, and it fills any empty cells in the grid with transparency instead of black.

You'd reach for it whenever you want one image to represent a whole batch. Paste your 16 outputs into a 4Γ—4 sheet for a quick review, or assemble a sprite sheet from transparent renders and hand it straight to a compositor without the background fighting you.

How it works. Feed it a IMAGE batch - a tensor of shape [batch, height, width, channels] - and it computes the grid dimensions from grid_cols and grid_rows, then pastes each frame into its cell with padding pixels of space between. It's done with pure torch slicing, not PIL, so it runs on GPU without round-tripping through CPU. If your batch is short of rows Γ— cols, missing cells are filled with transparent black (all zeros), so the sheet is always exactly the size you asked for. The output is a single IMAGE - same channel count as the input, alpha preserved.

The inputs that matter. Four:

  • images - the batch. Must be same-resolution across the batch; the node assumes it.
  • grid_cols - columns, default 2.
  • grid_rows - rows, default 2.
  • padding - pixels between cells, 0–100, default 0.

Only one output, grid_image. Wire it to a Preview or a saver and you're done.

Install.

cd ComfyUI/custom_nodes
git clone https://github.com/tetsuoo-online/Comfyui-TOO-Pack

or ComfyUI Manager β†’ search "Comfyui-TOO-Pack" β†’ restart. No extra dependencies.

Where people trip. Two things. First, if the batch has more images than rows Γ— cols, the extras are silently dropped - you get a full grid, not an overflow. So set grid_cols Γ— grid_rows to cover your batch size, or you'll think images vanished. Second, the padding is applied around every cell, which means the gap between the last column and the sheet edge is also padded - that's normal, just don't expect edge-to-edge contact. And if your images aren't all the same size, the grid comes out wrong rather than erroring. It's a focused little node, and for alpha-safe contact sheets it beats doing the math yourself.

CategoryπŸ”΅TOO-Pack/image

Inputs (4)

NameTypeDefaultDescription
imagesIMAGEβ€”
grid_colsINT2β€”
grid_rowsINT2β€”
paddingINT00–100β€”

Outputs (1)

NameTypeDescription
grid_imageIMAGEβ€”