ZML_XY_图表拼接
The labeled grid finisher for every XY loader — ZML_XY_图表拼接
- 图像
- 图表信息
- XYZ图表
ZML_XY_图表拼接 is the last node in every ZML XY grid: it takes the batch of rendered cells and the ZML_GRID_INFO metadata from any of the pack's loaders (LoRA V1/V2/V3, prompt loader, sampler params) and draws the final labeled table - column headers on top, row labels on the side, corner title included. It's the "make it look like a real comparison" node.
The mechanism is a two-pass layout engine, which is why the labels actually fit. The 图表信息 input is the ZML_GRID_INFO object from upstream - it carries x_labels, y_labels, x_title, y_title, count_x, count_y, and per-cell cell_image_counts. The drawer first measures every cell (it even handles cells holding multiple images, like the 无LoRA对比 baseline that reuses a copied image, or when a cell contains several frames), wraps long labels across lines in the header, then assembles the grid with 网格间距 gaps on a chosen 背景颜色, 文字颜色, and one of the bundled fonts at 字体大小.
The 单元格图片排布 dropdown (横向排列/竖向排列) decides how multiple images inside one cell are arranged - that's the knob that keeps a grid with repeated-baseline cells looking sane. Output is a single XYZ图表 IMAGE. It takes the image batch as a list input (INPUT_IS_LIST), so it lines up cells with the metadata by index - the loaders emit their model/conditioning lists in exactly the order this node expects.
This is the payoff node of the whole XY family, and it works with every one of them because they all speak the same ZML_GRID_INFO contract. There's also a standalone sibling (ZML_XY_自定义图表) that labels arbitrary batches without the metadata - use that one when your images didn't come from a ZML loader.
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. Pillow-only rendering, fonts bundled. Chinese UI; English patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
Common issues
Nearly every problem here is a contract problem, not a rendering one. If the drawer shows a grid with no headers, or the wrong number of cells, the 图表信息 came from a node that isn't a ZML XY loader - the count fields (count_x/count_y) are read from the metadata, not inferred from the image batch. If you hand it a plain batch without metadata, it falls back to 1×1 and looks broken; run images through a loader first, or use ZML_XY_自定义图表 instead.
The cell_image_counts handling matters for the 无LoRA对比 case: cells marked 0 are filled by reusing the first image's size, and if a cell has multiple images the 单元格图片排布 direction is the only thing controlling their layout. Mismatched cell sizes inside a row can make the grid uneven - the loader renders at a consistent resolution, so keep that pipeline stable and the drawer behaves.
One more honest note: this is the pack's own glue, so it's only as good as the metadata contract, and the author's style is to change contracts between versions. If an update to the pack makes a saved workflow render wrong grids, that's the known churn of a solo dev's weekly release cadence - worth checking the changelog before assuming your workflow broke.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| 图像 | IMAGE | — | |
| 图表信息 | ZML_GRID_INFO | — | |
| 字体 | COMBO | 8 options: 可商用/英文/Facon.ttf, 可商用/英文/thats___.ttf, 可商用/中文/nfdcsCN24.ttf, 可商用/中文/爱点风雅黑长体.ttf, 可商用/中文/平方追风体.ttf, 可商用/中文/鸿雷行书简体.otf, +2 | |
| 字体大小 | INT | 96 | — |
| 网格间距 | INT | 30 | — |
| 背景颜色 | COMBO | 白色 | 8 options: 白色, 黑色, 红色, 绿色, 蓝色, 黄色, +2 |
| 文字颜色 | COMBO | 黑色 | 8 options: 白色, 黑色, 红色, 绿色, 蓝色, 黄色, +2 |
| 单元格图片排布 | COMBO | 横向排列 | 一个单元格内有多张图时,它们的排列方向 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| XYZ图表 | IMAGE | — |