Nodes/comfyui_imgtools/Resolution Selector from Dimensions (rholdorf)
ComfyUI Node

Resolution Selector from Dimensions (rholdorf)

Same math as the built-in Resolution Selector, but the aspect ratio is auto-detected from a reference (width, height) pair instead of being picked from a combo. Output dimensions still honor megapixels and multiple.

By rholdorf·Created 7 months ago·Updated about a month ago· 0
Resolution Selector from Dimensions (rholdorf)
    • width
    • height
    • aspect_ratio
    width1024
    height1024
    megapixels1.0
    multiple8
    Categoryrholdorf/utils

    Inputs (4)

    NameTypeDefaultDescription
    widthINT10241–16384Reference width — only used to detect the closest aspect ratio.
    heightINT10241–16384Reference height — only used to detect the closest aspect ratio.
    megapixelsFLOAT1.00.1–16Target total megapixels. 1.0 MP ≈ 1024x1024 for square.
    multipleINT88–128Nearest multiple to snap the result to.

    Outputs (3)

    NameTypeDescription
    widthINT
    heightINT
    aspect_ratioSTRING