ComfyUI Node

XYZ-GridPlot

The grid node that finally behaves like ComfyUI

By geroldmeisinger·Created 9 months ago·Updated 2 days ago· 184
XYZ-GridPlot
  • images
  • row_labels
  • col_labels
  • image
gap0
font_size50.00
row_label_orientationhorizontal
ordertrue
output_is_listfalse

If you came from Automatic1111, you remember the XYZ plot script: pick two axes, run, get a labeled grid. ComfyUI's equivalent has historically been a mess - most tools force you into a custom KSampler, or make you type labels and images in by hand, or hide examples in a wiki. XyzGridPlot is the OutputLists Combiner's answer, and it's the node that makes the rest of the pack worth having. Feed it a list of images plus row and column labels, and it renders the labeled grid for you. No black magic, no custom sampler.

How it works

It takes your list of images (including batches), flattens everything into one long list, then shapes the grid from three things: the number of row labels, the number of column labels, and however many sub-images are left over. Labels render with skia (the pack ships skia-python for exactly this), with real typography: text shrinks until it fits - down to font_size_min=6 - then clips rather than overflowing. It even sniffs the labels: all-numeric labels right-align, wrapped labels justify, and single-liners center. The author clearly spent the boring hours on the rendering, and it shows.

The inputs that matter

  • images - required; your list of images (including batches).
  • row_labels / col_labels - optional, any type, ideally output lists. Their count decides the grid shape, so label everything you want to compare.
  • gap - spacing between sub-image packings. Default 0.
  • font_size - target label size (default 50, shrinks to fit).
  • order - outside-in (default) vs inside-out. Only relevant when you have batched sub-images; flip it to control whether batches are labeled as units or interleaved.
  • output_is_list - the advanced switch. True makes each grid cell one image and emits a list of whole grids, which you can feed into a second XyzGridPlot to build super-grids (grids of grids).

Output is a single image output list. Wire it to a Save Image or Rebatch Images.

Installing

Search "OutputLists Combiner" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/ComfyUI-outputlists-combiner
cd ComfyUI-outputlists-combiner
uv pip install -r requirements.txt

Restart after. Note that skia-python is one of the heavier wheels in the requirements file - it's the one real install-time cost in this pack, and it exists so labels render properly.

Gotchas

  • The count must divide evenly. The total images (including batched ones) have to be a multiple of rows × columns, or the packing math breaks. Different-sized batches get padded with empty images, which is forgiving but not magic.
  • batch_size=1 by default. This node flattens everything to single images first. If you set batch_size=4 you get sub-grids per batch; combine that with output_is_list=True to get four separate labeled grids instead of one big one.
  • Big grids stall. All intermediate images must finish before the grid renders (the author's "execution stalling problem"). For long sweeps, run with --cache-ram or pair it with the pack's KSampler Immediate Save beta node so you don't lose everything on a cancel.
CategoryUtility

Inputs (8)

NameTypeDefaultDescription
imagesIMAGEA list of images (including batches)
gapINT00–1024Gap between the sub-image packings. Note that within the sub-images themselves uses no gap. If you want a gap between the sub-images connect another XyzGridPlot node.
font_sizeFLOAT50.006–1000Target font size. The text will be shrunk down until it fits (down to `font_size_min=6`).
row_label_orientationCOMBOhorizontalText orientation of the row labels. Useful if you want to save space.
orderBOOLEANtrueDefines in which order the images should be processed. This is only relevant if you have sub-images. Useful if `batch_size>1` and you want to plot the batches.
output_is_listBOOLEANfalseThis is only relevant if you have sub-images or you want to create super-grids.
row_labelsopt*Row label texts at the left side ideally connected to a node with `is_output_list=True` indicated by the symbol `𝌠`.
col_labelsopt*Column label texts at the top ideally connected to a node with `is_output_list=True` indicated by the symbol `𝌠`.

Outputs (1)

NameTypeDescription
imageIMAGEThe XYZ-GridPlot image. If `output_is_list=True` creates a list of images which you can connect to another XYZ-GridPlot node to create super-grids.