Nodes/ComfyUI-Info-Prompt-Toolkit/Aspect Ratio to Size (Trim Margin)
ComfyUI Node

Aspect Ratio to Size (Trim Margin)

A ComfyUI node in Info-Prompt-Toolkit/ImageInfo with 12 inputs and 4 outputs.

By kinorax·Created 4 months ago·Updated 2 months ago· 1
Aspect Ratio to Size (Trim Margin)
    • width x height
    • width
    • height
    • margin
    width_ratio10
    height_ratio16
    min_unit32
    margin_top0
    margin_right0
    margin_bottom0
    margin_left0
    width864
    height1376
    actual_width864
    actual_height1376
    actual_ratio
    CategoryInfo-Prompt-Toolkit/ImageInfo

    Inputs (12)

    NameTypeDefaultDescription
    width_ratioINT101–4096Aspect ratio width after trimming margins
    height_ratioINT161–4096Aspect ratio height after trimming margins
    min_unitCOMBO32Minimum size step for the sampling size including margins
    margin_topINT00–16376Linked with margin_bottom; their total is 0 or min_unit
    margin_rightINT00–16376Linked with margin_left; their total is 0 or min_unit
    margin_bottomINT00–16376Linked with margin_top; their total is 0 or min_unit
    margin_leftINT00–16376Linked with margin_right; their total is 0 or min_unit
    widthINT8648–16384Sampling width including margins (display only)
    heightINT13768–16384Sampling height including margins (display only)
    actual_widthINT8648–16384Width remaining after trimming margins
    actual_heightINT13768–16384Height remaining after trimming margins
    actual_ratioSTRINGActual ratio after trimming margins (display only)

    Outputs (4)

    NameTypeDescription
    width x heightIPT-Size
    widthINT
    heightINT
    marginIPT-Margin