ZML_XY_采样参数
Steps × CFG sweep, rendered as a labeled grid — ZML_XY_采样参数
- 步数(Steps)
- CFG
- 图表信息
ZML_XY_采样参数 is the sampler-calibration node of the pack: it sweeps steps on one axis and CFG on the other, outputs the values as lists, and hands the grid drawer the labels. It's the fastest way to find your checkpoint's "good enough" step count and CFG sweet spot without manually running a dozen queues.
The mechanism is simple and exactly what you'd hope. 步数数量, 步数起始值, 步数结束值 build a linearly-spaced list of step counts (rounded to ints), and CFG数量, CFG起始值, CFG结束值 do the same for CFG (2 decimals). Defaults are 20→30 steps × 6→8 CFG across 3 each - a sensible starting sweep for SDXL-lineage models. XY互换 flips axes (default is X=steps, Y=CFG).
Outputs are the two value lists and the grid info:
步数(Steps)- INT list, one value per columnCFG- FLOAT list, one per row图表信息- theZML_GRID_INFOpayload forZML_XY_图表拼接
Wiring: connect the steps list and CFG list to a sampler that accepts per-run values (the pack's own sampler nodes consume lists natively - the README notes this XYZ family was built alongside a batch of list-output nodes in late 2025). Each combination renders once, and the grid drawer produces the labeled table. This is the ComfyUI-native equivalent of the old A1111 "X/Y/Z plot" scripts, done the node-graph way.
A note on what you're actually calibrating: the KB's cfg-scale doc covers the deep version, but the short version is that CFG sensitivity changed across model generations - SDXL-lineage anime checkpoints still respond to CFG 4–9 the classic way, while distilled/guidance models basically ignore it above 1. If your sweep comes back "everything identical," the model is telling you CFG isn't a dial it uses. The steps axis still works; the CFG axis may not mean much.
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. Pure numpy value generation - no downloads, no models. Chinese UI; English patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
Common issues
The main thing that bites: list outputs only drive iteration if the node between them and the sampler actually loops. If you plug 步数(Steps) into a plain KSampler and it renders once, check you're using a list-aware sampler - the pack's own sampler nodes and the "bridge preview" family were written to consume these lists (the README's changelog mentions the XYZ category shipped alongside list-processing sampler work).
Second, watch the range math: with 步数数量 3 and start/end 20/30, you get 20/25/30 (linspace, rounded). If you expected all integers in between, that's not what this does - count = 步数数量, spacing is automatic. Setting 数量 to 11 with 20→30 gives 20..30 step-by-step. Same for CFG. And remember grids multiply: 3×3 is nine renders per prompt; 11×11 is 121. Keep the count sane until you know the sweep is right.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| 步数数量 | INT | 3 | — |
| 步数起始值 | INT | 201–10000 | — |
| 步数结束值 | INT | 301–10000 | — |
| CFG数量 | INT | 3 | — |
| CFG起始值 | FLOAT | 6.00–100 | — |
| CFG结束值 | FLOAT | 8.00–100 | — |
| XY互换 | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 步数(Steps) | INT | — |
| CFG | FLOAT | — |
| 图表信息 | ZML_GRID_INFO | — |