XYZ-GridPlot
The grid node that finally behaves like ComfyUI
- images
- row_labels
- col_labels
- image
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) vsinside-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.
Truemakes 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=1by default. This node flattens everything to single images first. If you setbatch_size=4you get sub-grids per batch; combine that withoutput_is_list=Trueto 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-ramor pair it with the pack's KSampler Immediate Save beta node so you don't lose everything on a cancel.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | A list of images (including batches) | |
| gap | INT | 00–1024 | Gap 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_size | FLOAT | 50.006–1000 | Target font size. The text will be shrunk down until it fits (down to `font_size_min=6`). |
| row_label_orientation | COMBO | horizontal | Text orientation of the row labels. Useful if you want to save space. |
| order | BOOLEAN | true | Defines 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_list | BOOLEAN | false | This 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)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The 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. |