Nodes/ComfyUI-SuperNodes/🐧 Image Size Calculator
ComfyUI Node

🐧 Image Size Calculator

Calculates width and height based on an aspect ratio and a target dimension size, rounding to a specific multiple.

By sonnyboxΒ·Created 10 months agoΒ·Updated 26 days agoΒ· 7
🐧 Image Size Calculator
    • width
    • height
    • aspect_w
    • aspect_h
    β—„aspect_w1β–Ί
    β—„aspect_h1β–Ί
    β—„modeβ–Ύβ–Ί
    β—„size1024β–Ί
    β—„megapixels1.00β–Ί
    β—„multiple_of16β–Ί
    CategorySuperNodes/Tools

    Inputs (6)

    NameTypeDefaultDescription
    aspect_wINT11–1024The width ratio of the desired aspect ratio (e.g., 16 for 16:9).
    aspect_hINT11–1024The height ratio of the desired aspect ratio (e.g., 9 for 16:9).
    modeCOMBODetermines if the size applies to max/min dimension, or if target is total megapixels.
    sizeINT10241–32768The target length for the dimension specified by dimension mode.
    megapixelsFLOAT1.000.01–1024The target total megapixels when mode is 'megapixels'.
    multiple_ofINT161–1024The final dimensions will be rounded to the nearest multiple of this value.

    Outputs (4)

    NameTypeDescription
    widthINTThe calculated width.
    heightINTThe calculated height.
    aspect_wINTPassthrough width aspect.
    aspect_hINTPassthrough height aspect.