ComfyUI Node

Image Grid Table

Contact sheets without a grid-node cartel

By wenchengxiang·Created about a month ago·Updated a day ago· 1
Image Grid Table
  • 输入
  • 输出
排列方式最大行数
最大行数_列数2
输出尺寸实际大小
指定宽度2048
间距0
四周边距0
背景值0.00

Every so often you generate a batch and you just want to look at all of it at once - a contact sheet. Image Grid Table is that: it takes a batch of images and lays them into a single grid, with control over rows vs. columns, spacing between cells, outer margin, background color, and final output size. It's the "save my whole run as one picture" node, and it's also handy for eyeballing a mask batch, since it accepts masks too.

The input is wildcard (*) because the node inspects what arrives and figures out the format itself: a 4D tensor is treated as IMAGE, a 3D one as MASK, and either becomes a grid. Layout is chosen with 排列方式 (max rows or max columns) and the 最大行数_列数 limit - set "max rows" to 2 and it makes a 2-row sheet of whatever length the batch needs. Two more controls are worth calling out: 间距 (gap between cells) and 四周边距 (margin around the whole sheet), both in pixels, plus 背景值 for the empty space (0 = black, 1 = white). Output can be at the images' actual size or resized to a fixed width (指定宽度, default 2048) - handy when your frames are all 512px and you want one standardized sheet.

The fixed-width mode is where the code shows real care: it resizes all cells by one uniform scale and distributes the integer-pixel rounding error across columns, so the result lands exactly on your target width with no stray row of leftover pixels. That's the kind of attention to detail that separates a tool from a script.

Inputs and outputs that matter

  • 输入 (in) - an IMAGE or MASK batch.
  • 排列方式 (in) - max rows or max columns. 最大行数_列数 (in) - the limit, default 2.
  • 输出尺寸 / 指定宽度 (in) - actual size or a fixed output width.
  • 间距 / 四周边距 / 背景值 (in) - gap, outer margin, background shade.
  • 输出 (out) - the single grid image.

Installing it

Part of wenchengxiang/ComfyUI-Practical-Tools. ComfyUI Manager → Custom Nodes Manager → search "ComfyUI-Practical-Tools" → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/wenchengxiang/ComfyUI-Practical-Tools

then restart. No pip dependencies, no models - pure Python.

Issues and gotchas

Two things to watch. First, the whole UI is in Chinese (输入, 排列方式, 间距…) - the author never translated this one, so don't panic when the labels don't match the node's English display name; they're the ones listed above. Second, a fixed output width that's too small for the number of columns raises an error rather than silently squishing - if that happens, raise 指定宽度 or use more columns. And the grid tiles left-to-right, top-to-bottom in batch order; if you need a specific arrangement, order the batch before you feed it.

CategoryPractical-Tools/image

Inputs (8)

NameTypeDefaultDescription
输入*
排列方式COMBO最大行数2 options: 最大行数, 最大列数
最大行数_列数INT21–100
输出尺寸COMBO实际大小2 options: 实际大小, 指定宽度
指定宽度INT204864–16384
间距INT00–1000
四周边距INT00–1000
背景值FLOAT0.000–1

Outputs (1)

NameTypeDescription
输出*