Nodes/ComfyUI-ZML-Image/ZML_双整数
ComfyUI Node

ZML_双整数

The pack's two-int resolution node — width and height in one box

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_双整数
    • A
    • B
    A1024
    B1024

    Every generation workflow starts the same way: pick a width and a height. That's the entire job of this node - two integer sliders, A and B, defaults of 1024×1024, wired straight into an Empty Latent Image or a latent-size-aware sampler. It's the plainest node in the ZML integer family, and it's the one the author ships as the "basic resolution" starting point before the V2 (preset list) and V3 (judgment) versions get fancy.

    How it works

    Mechanically it's nothing: get_simple_dimensions returns (A, B). The useful part is the config - 0–16384 in steps of 1, which comfortably covers everything from a 512px test render to a 4K latent. Because it's a source node, you wire its outputs into multiple consumers and the resolution is defined in exactly one place: change it once, the Empty Latent Image, the latent-ratio checker, and the save-node filename all follow.

    The inputs

    • A - INT, 0–16384, default 1024.
    • B - INT, 0–16384, default 1024.

    Two INT outputs, A and B. The convention, which the pack leans on hard, is A = width, B = height - but nothing enforces it; it's just integers.

    Installing

    The whole pack installs the same way:

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

    restart, or ComfyUI Manager. No extra downloads. English UI needs the translation patch from https://github.com/zml-w/ZZZ_ZML_English_Patch.

    Common issues

    The most common mistake is treating this like a "real" resolution node when it's really just two numbers - it does not validate aspect ratios, pad to model-friendly multiples, or keep 8-pixel alignment. Plug 1025×513 into an Empty Latent Image and ComfyUI will happily round it, but you'll get non-multiple latents that some models choke on. If you need smart behavior - pick from a preset list, or auto-judge aspect ratio - that's what ZML_双整数V2 and ZML_双整数V3(判断) are for, and they're the nodes you'll actually graduate to. This one is the honest workhorse: two numbers, no surprises, and it's the right node when all you want is a clean 1024×1024 that you can wire everywhere.

    Categoryimage/ZML_图像/整数

    Inputs (2)

    NameTypeDefaultDescription
    AINT10240–16384
    BINT10240–16384

    Outputs (2)

    NameTypeDescription
    AINT
    BINT