Nodes/ComfyUI-ZML-Image/ZML_XY_采样参数
ComfyUI Node

ZML_XY_采样参数

Steps × CFG sweep, rendered as a labeled grid — ZML_XY_采样参数

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_XY_采样参数
    • 步数(Steps)
    • CFG
    • 图表信息
    步数数量3
    步数起始值20
    步数结束值30
    CFG数量3
    CFG起始值6.0
    CFG结束值8.0
    XY互换false

    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 column
    • CFG - FLOAT list, one per row
    • 图表信息 - the ZML_GRID_INFO payload for ZML_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.

    Categoryimage/ZML_图像/XYZ

    Inputs (7)

    NameTypeDefaultDescription
    步数数量INT3
    步数起始值INT201–10000
    步数结束值INT301–10000
    CFG数量INT3
    CFG起始值FLOAT6.00–100
    CFG结束值FLOAT8.00–100
    XY互换BOOLEANfalse

    Outputs (3)

    NameTypeDescription
    步数(Steps)INT
    CFGFLOAT
    图表信息ZML_GRID_INFO