Nodes/ComfyUI-UtilsCollection/Adjusted Resolution (Legacy)
ComfyUI Node

Adjusted Resolution (Legacy)

Two resolutions from one set of numbers, so base and hires can't disagree

By silveroxides·Created 3 months ago·Updated a day ago· 36
Adjusted Resolution (Legacy)
    • Width
    • Height
    • Upscaled Width
    • Upscaled Height
    • Batch
    width1024
    height1024
    batch_size1
    scale_by1.00
    multiple16

    You've got a base generation at 1024×1024 and a hi-res fix stage that should run at 1.5× that. Two empty latents, two resolutions, and if you type them in by hand they will drift apart the third time you tweak a number. Adjusted Resolution (Legacy) exists so there's one knob and everything else follows from it.

    It's a pure math node: five integers and floats in, five integers out. Feed it your width, height and batch_size, tell it how much you want to upscale with scale_by, and it hands back the base dimensions, the upscaled dimensions, and the batch count - all rounded to the same pixel multiple (16 by default). Wire the first pair into your base Empty Latent, the upscaled pair into your hires pass, and they can never disagree, because both came from the same calculation.

    The inputs that matter

    • width / height - your base resolution. Anything from 16 up to 16384.
    • scale_by - the multiplier for the larger output. 1.5 is the classic hi-res fix number. This is the one you'll actually touch while iterating.
    • multiple - every output is rounded to this pixel step. 16 is the safe default; 8 is common for SDXL-era models that tolerate it. This is what keeps your latents aligned so the VAE doesn't choke on odd dimensions.
    • batch_size - passed through untouched, so the hires stage gets the same batch as the base stage.

    The outputs

    Width, Height, Upscaled Width, Upscaled Height, and Batch. The first two feed an Empty Latent (or whatever wants the base size); the next two feed your hires latent. Note that "upscaled" here is computed as round(base × scale_by, multiple), not as round(base, multiple) × scale_by - so at multiple: 16 and scale_by: 1.5, 1024×1024 becomes 1536×1536. That's the behavior you want, and it's exactly why the node exists: the rounding happens after the scale, so the hires number is always a clean multiple too.

    Installing it

    This node ships in silveroxides/ComfyUI-UtilsCollection. Easiest path: ComfyUI Manager → "Install Custom Nodes" → search ComfyUI-UtilsCollection → install → restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
    

    Then restart ComfyUI. Its requirements.txt is just opencv-python and typing-extensions - opencv is almost certainly already in your environment from some other pack, so there's usually nothing extra to download. No models, no weights, nothing. The "(Legacy)" suffix means this is a compatibility alias: the pack registers a newer UC_AdjustedResolutionParameters under the hood and keeps this old node id alive so saved workflows still load. If you search the menu and see both, either is fine; new graphs can use either name.

    Where people get burned

    The only real trap is forgetting what multiple is doing when you change scale_by. A hires stage that expects exactly 2048 will get 2048 only if round(1024 × 2, 16) lands there - it will - but at scale_by: 1.7 you'll get 1744, and if your upscaler or sampler cares about exact dimensions, that's the value to check first. Keep the same multiple on both this node and anything downstream that crops or tiles, and you'll be fine.

    Categoryutils

    Inputs (5)

    NameTypeDefaultDescription
    widthINT102416–16384
    heightINT102416–16384
    batch_sizeINT11–4096
    scale_byFLOAT1.000–10Scale used for the larger output resolution.
    multipleINT164–128Round the larger resolution to this pixel multiple.

    Outputs (5)

    NameTypeDescription
    WidthINT
    HeightINT
    Upscaled WidthINT
    Upscaled HeightINT
    BatchINT