Nodes/ComfyUI-ZML-Image/ZML_XY_自定义图表
ComfyUI Node

ZML_XY_自定义图表

Tile your own images into a labeled grid, any direction — ZML_XY_自定义图表

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_XY_自定义图表
  • 图像
  • 自定义图表
类型字符串
多行文本
拼接方向
单行上限0
数字起始数0.0
数字步长1.0
字体
字体大小96
字体颜色#000000
背景颜色#FFFFFF
内边框大小30
内边框颜色#FFFFFF
外边框大小30
外边框颜色#000000

ZML_XY_自定义图表 is the grid drawer that doesn't care where your images came from. The other XY nodes feed it structured grid info; this one just takes a batch of images and tiles them into a labeled grid with whatever labels you hand it. It's the general-purpose "make me a contact sheet" node, and it's genuinely handy for any batch of renders, not just XYZ sweeps.

The label input is where the flexibility lives. 类型 has three modes:

  • 字符串 - one label per image, one per line of 多行文本
  • 数字 - auto-generate numeric labels from 数字起始数 stepping by 数字步长 (works with floats, so 0, 0.5, 1.0… is fine)
  • - no labels at all, just the tiled grid

拼接方向 (左/右/上/下) controls which way the batch flows, and 单行上限 caps images per row/column (0 = unlimited) so you can force a clean 3-across layout. Labels render with a choice of the pack's bundled fonts at 字体大小, in 字体颜色 (blank = transparent, ZML = random - the pack's color convention).

The rest is presentation, and it's thoughtfully exposed: 背景颜色 (per-cell), 内边框大小/内边框颜色 (gaps between images), 外边框大小/外边框颜色 (the whole grid's frame). Same colors-as-strings convention, same blank/ZML escapes. The 图像 input is list-capable (INPUT_IS_LIST on that socket), so it eats a whole batch and outputs one assembled 自定义图表 IMAGE.

Where does this shine? It pairs beautifully with the list-based workflow pattern the KB's node-plumbing doc describes: a ZML_文本列表 loop generates N images with labels, and this node tiles them into a single labeled sheet in one step - no grid-drawer contract required. It's also the node to reach for when you want a numbered contact sheet of a folder or a batch that has nothing to do with LoRA sweeps.

Installing it

Ships in ComfyUI-ZML-Image. ComfyUI Manager → ComfyUI-ZML-Image, or:

cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image

Restart. Fonts bundled; Pillow-only rendering. Chinese UI; English patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.

Common issues

Label/image count mismatch is the classic gotcha: with 类型 = 字符串, 多行文本 needs exactly as many lines as you have images, or labels run out and the tail of the grid is unlabeled (the code doesn't pad). With 数字 mode the count comes from 数字起始数/数字步长 arithmetically, so that's less error-prone for numbered sheets.

The 单行上限 behaves differently depending on 拼接方向 - it caps the horizontal count in right/left layouts and the vertical count in up/down layouts. It's easy to set "3" and wonder why a downward-flowing grid has five across. And the color convention trips people once: labels are text colors, and leaving a color blank means transparent, not black - so if your labels "disappeared," check 字体颜色 isn't empty. Chinese labels render with the bundled Chinese fonts; if you type Chinese into a label and get boxes, pick one of the 可商用/中文/* fonts in the dropdown rather than the English ones.

Categoryimage/ZML_图像/XYZ

Inputs (15)

NameTypeDefaultDescription
类型COMBO字符串3 options: 字符串, 数字, 无
多行文本STRING
拼接方向COMBO4 options: 左, 右, 上, 下
单行上限INT00–1000表示不限制
数字起始数FLOAT0.0-10000–10000
数字步长FLOAT1.0-10000–1000
字体COMBO8 options: 可商用/英文/Facon.ttf, 可商用/英文/thats___.ttf, 可商用/中文/nfdcsCN24.ttf, 可商用/中文/爱点风雅黑长体.ttf, 可商用/中文/平方追风体.ttf, 可商用/中文/鸿雷行书简体.otf, +2
字体大小INT96
字体颜色STRING#000000留空=透明, ZML=随机
背景颜色STRING#FFFFFF单元格背景。留空=透明, ZML=随机
内边框大小INT30
内边框颜色STRING#FFFFFF图片间隙颜色。留空=透明, ZML=随机
外边框大小INT30
外边框颜色STRING#000000整体外框颜色。留空=透明, ZML=随机
图像IMAGE

Outputs (1)

NameTypeDescription
自定义图表IMAGE