Nodes/ComfyUI_StarNodes/⭐ Star Grid Composer
ComfyUI Node

⭐ Star Grid Composer

Turn a pile of images into a caption-ready contact sheet, without the manual labor

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star Grid Composer
  • Grid Image Batch
  • image
max_width2048
max_height2048
cols2
rows2
add_captionfalse
caption_font_size80
main_caption_font_size120
caption_bg_colorblack
caption_text_colorwhite
font_familyarial
font_boldfalse
main_caption_bg_colorblack
main_caption_text_colorwhite
input_caption
Grid Captions Batch

If you've ever hand-arranged a 2x2 of your outputs in an image editor so you could post them somewhere, this is the node that does it on the canvas. Star Grid Composer takes a batch of images, lays them out into a cols x rows grid, and - the part that makes it worth installing a pack for - stamps captions under each cell with real font control. It's the "contact sheet" node of the StarNodes pack, and it's the one you'll keep in a workflow instead of bolting on after the fact.

How it works

You feed it a batch of images (an IMAGE tensor with N frames) and it auto-sizes each cell to preserve the source aspect ratios rather than forcing everything into squares. The max_width and max_height inputs (both default to 2048, step of 8) are caps on the final canvas - the node works out how big each cell can be without exceeding them. cols and rows (1–10) set the layout. Images beyond cols * rows don't vanish; the grid fills row by row and the extras just don't get a cell, so keep your batch smaller than the grid or the layout will feel arbitrary.

The caption side is where this gets opinionated. Flip add_caption on and each image gets a label from the Grid Captions Batch string (the matching ⭐ Star Grid Captions Batcher produces exactly this, one caption per line). You get two independent styling tiers: caption_font_size / caption_bg_color / caption_text_color for per-cell labels, and main_caption_font_size plus its own color pair for a big input_caption header. font_family pulls your installed system fonts (47 of them on a typical machine - DejaVu, C059, the works), and font_bold is there if you need it.

The inputs that actually matter

  • Grid Image Batch - your images. Wire this from ⭐ Star Grid Image Batcher or any batch-producing node.
  • cols / rows - the layout. Start 2x2 and grow.
  • add_caption - the whole point. On, with a Grid Captions Batch connected, you get a labeled sheet.

The single output is image - the finished grid - which you feed into a Save Image / Preview node like any other IMAGE.

Installing

It ships in the StarNodes pack, so it's a one-click deal in ComfyUI Manager (search Starnodes), or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
cd ComfyUI_StarNodes
pip install -r requirements.txt

Restart ComfyUI, then double-click the canvas and search star (or open the ⭐StarNodes category). No extra model files needed - this one is pure Python/Pillow. If a dependency is missing, ComfyUI's console will name the package; only the affected nodes get skipped, not the whole pack.

Common issues

The classic gotcha is caption mismatch: if your Grid Captions Batch has fewer or more lines than images, labels shift out of sync. Keep the two batch counts identical. Grids at the default 2048px cap can also look small if your cells are wide panoramas - bump max_width if your sheet feels cramped, but remember the step is 8, not 1. And if font_family looks wrong, it's matching system font names, so pick from the dropdown rather than typing.

Category⭐StarNodes/Image And Latent

Inputs (16)

NameTypeDefaultDescription
max_widthINT204864–16384
max_heightINT204864–16384
colsINT21–10
rowsINT21–10
Grid Image BatchIMAGE
add_captionBOOLEANfalse
caption_font_sizeINT808–500
main_caption_font_sizeINT12012–500
caption_bg_colorCOMBOblack7 options: black, white, gray, red, green, blue, +1
caption_text_colorCOMBOwhite7 options: white, black, gray, red, green, blue, +1
font_familyCOMBOarial47 options: c059-bdita, c059-bold, c059-italic, c059-roman, d050000l, dejavusans, +41
font_boldBOOLEANfalse
main_caption_bg_colorCOMBOblack7 options: black, white, gray, red, green, blue, +1
main_caption_text_colorCOMBOwhite7 options: white, black, gray, red, green, blue, +1
input_captionoptSTRING
Grid Captions BatchoptSTRING

Outputs (1)

NameTypeDescription
imageIMAGE