Nodes/ComfyUI-ZML-Image/ZML_预设分辨率V2
ComfyUI Node

ZML_预设分辨率V2

The resolution preset that also lets you type your own

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_预设分辨率V2
    • latent
    预设自定义
    互换宽高false
    随机模式false
    自定义宽1024
    自定义高1024
    批次数量1

    The V2 of ZML_预设分辨率 adds exactly one thing to the original, and it's the thing you were missing: a "自定义" (custom) preset plus explicit width and height fields. V1 gives you a dropdown of baked-in SDXL sizes and nothing else. V2 gives you the dropdown and the freedom to type 1344x768 because your model wants it and it's not in the list.

    Everything else is inherited from V1. Same text-file preset source (zml_w/txt/Preset integer/Preset integer.txt, W,H or Name_W,H per line, # for comments), same latent generation - a zero-filled [batch, 4, H//8, W//8] tensor sized to the chosen resolution - same swap/random/batch options, same three outputs. The practical difference: when you select 自定义, the two new fields define the size; when you pick a named preset, they're ignored. You get both worlds in one node.

    The controls that matter

    • 预设 - dropdown, 24 options: 自定义 plus the SDXL spread.
    • 自定义宽 / 自定义高 - INT, 64–16384, step 8, default 1024 each. Only used when 自定义 is selected. The step-8 constraint keeps you on the multiples diffusion models actually want - don't fight it, just live in the 8s.
    • 互换宽高 / 随机模式 / 批次数量 - same as V1. Note random mode draws from the named presets; the custom values participate via the swap toggle, not the random picker.

    Outputs: , , latent (LATENT).

    When V2 beats V1

    If your daily driver is SDXL or Wan at the stock sizes, V1 is fine. The moment you're on a model with an odd native resolution - or you're testing "does my model like 1000x1312 or 992x1312" - V2 is the one you want, because 自定义 makes it a proper resolution primitive you can drive from other nodes. The step-8 lock is actually doing you a favor; the KB's plumbing essay notes the whole value-node genre exists to stop you retyping the same number in five places, and this node is that idea with a dropdown bolted on.

    The familiar caveats apply: the UI is Chinese-first (grab the README's translation patch), the pack is one person maintaining 160+ nodes so anything odd goes on the GitHub issues page, and if your custom values don't "stick," check you actually selected 自定义 in the dropdown - it's a two-step thing that people miss once.

    Install

    Same pack as everything else here. ComfyUI Manager → search ComfyUI-ZML-Image, or:

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

    restart. No model downloads, no new dependencies - this node rides on the base torch/Pillow stack ComfyUI already has.

    Categoryimage/ZML_图像/整数

    Inputs (6)

    NameTypeDefaultDescription
    预设COMBO自定义24 options: 自定义, SDXL_768x1344, SDXL_768x1280, SDXL_832x1216, SDXL_832x1152, SDXL_896x1152, +18
    互换宽高optBOOLEANfalse
    随机模式optBOOLEANfalse
    自定义宽optINT102464–16384
    自定义高optINT102464–16384
    批次数量optINT11–100

    Outputs (3)

    NameTypeDescription
    INT
    INT
    latentLATENT