Nodes/ComfyUI-SimpleChat/XY Plot (Labels)
ComfyUI Node

XY Plot (Labels)

A labelled grid for your XY tests — stop squinting at the raw batch

By Moeblack·Created 9 months ago·Updated 7 months ago· 8
XY Plot (Labels)
  • images
  • image
columns4
x_labels
y_labels
padding8
label_padding8
bg_colorblack
text_colorwhite
title

Run an artist × background sweep and you don't end up with six images, you end up with sixty floating in a batch tensor. SimpleChatXYPlot is the part of that pipeline that makes the results legible: it takes an IMAGE batch, stitches it into a grid, and draws the axis labels so you can tell cell 37 from cell 38. It's the presentation half of an XY test, and honestly the half people forget to budget for.

What it actually does

The node lays your batch out row-major - left to right, top to bottom - and pastes it onto a single canvas with optional labels on the top and left edges. It uses PIL under the hood (ImageFont.load_default() for text), so no heavy deps. It's the same stitcher as the pack's Image Grid (Batch) node, plus the label layer and a bit of smarts about grid shape.

That last bit is worth knowing. When you feed it x_labels and y_labels, the labels define the grid: columns gets overridden by the number of x labels, and the row count by the y labels. It even auto-detects triangular layouts - if your batch is exactly N(N+1)/2 images it renders as an upper-triangle matrix, and if it's exactly N it renders the diagonal. Those are precisely the two shapes the pack's Anima XY Matrix (JSON List) can emit, so they're designed to be wired together.

The inputs that matter

The only required input is images. The ones you'll actually touch:

  • columns - images across (default 4), ignored once you provide x labels.
  • x_labels / y_labels - newline-separated plain text. One line per cell in that direction.
  • title - an optional header line, nice for "artist sweep, seed 42".
  • padding / label_padding - gap between cells, and gap around the label gutters.
  • bg_color / text_color - black/white pair, that's all you get.

Output is a single image, ready for SaveImage or a second pass downstream.

Wiring it in

In an LLM-assisted sweep, the chain is: SimpleChatAnimaPromptXYMatrix emits a list of JSON prompts plus x_labels/y_labels → each JSON goes through Prompt JSON Unpack into the sampler → your images land in a batch → this node pastes them into the labelled grid, and you SaveImage. The labels come from the matrix node, so everything stays in sync - that's the intended flow, not a hack.

Installing and gotchas

ComfyUI Manager, search "ComfyUI-SimpleChat", install, restart. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/Moeblack/ComfyUI-SimpleChat

Then restart ComfyUI. The only Python dependency is aiohttp; nothing else gets pulled in.

Two things will bite you. First, the font is PIL's built-in bitmap font, which has no glyphs for CJK or most non-Latin scripts - if your labels are in Chinese (and the author's defaults are), they'll render as boxes. Keep labels in ASCII. Second, if your batch is smaller than the label grid, empty cells just stay background-colored - you get a shorter row with no warning, so double-check the count when a corner looks empty.

CategorySimpleChat/Utils

Inputs (9)

NameTypeDefaultDescription
imagesIMAGE
columnsoptINT41–64
x_labelsoptSTRING
y_labelsoptSTRING
paddingoptINT80–256
label_paddingoptINT80–256
bg_coloroptCOMBOblack2 options: black, white
text_coloroptCOMBOwhite2 options: white, black
titleoptSTRING

Outputs (1)

NameTypeDescription
imageIMAGE