Nodes/ComfyUI-PredefinedResolution/Snap to Nearest Aspect Ratio
ComfyUI Node

Snap to Nearest Aspect Ratio

A ComfyUI node in utils with 17 inputs and 4 outputs.

By pipelet-ai·Created 5 months ago·Updated 3 months ago· 0
Snap to Nearest Aspect Ratio
    • width
    • height
    • width_height_ratio
    • height_width_ratio
    width512
    height512
    output_resolution1080p
    enable_21_9true
    custom_21_92560x1080
    enable_16_9true
    custom_16_91920x1080
    enable_1_1true
    custom_1_11080x1080
    enable_9_16true
    custom_9_161080x1920
    enable_9_21true
    custom_9_211080x2560
    enable_4_3true
    custom_4_31440x1080
    enable_3_4true
    custom_3_41080x1440
    Categoryutils

    Inputs (17)

    NameTypeDefaultDescription
    widthINT51264–8192
    heightINT51264–8192
    output_resolutionCOMBO1080p5 options: 720p, 1080p, 2K, 4K, Custom
    enable_21_9optBOOLEANtrue
    custom_21_9optSTRING2560x1080
    enable_16_9optBOOLEANtrue
    custom_16_9optSTRING1920x1080
    enable_1_1optBOOLEANtrue
    custom_1_1optSTRING1080x1080
    enable_9_16optBOOLEANtrue
    custom_9_16optSTRING1080x1920
    enable_9_21optBOOLEANtrue
    custom_9_21optSTRING1080x2560
    enable_4_3optBOOLEANtrue
    custom_4_3optSTRING1440x1080
    enable_3_4optBOOLEANtrue
    custom_3_4optSTRING1080x1440

    Outputs (4)

    NameTypeDescription
    widthINT
    heightINT
    width_height_ratioFLOAT
    height_width_ratioFLOAT