Nodes/ComfyUI Text Processor/Advanced Resolution Selector
ComfyUI Node

Advanced Resolution Selector

Selects a deterministic, multiple-aligned image resolution from canonical or custom aspect ratios.

By rookiestar28·Created 9 months ago·Updated about 24 hours ago· 16
Advanced Resolution Selector
    • width
    • height
    • resolved_aspect_ratio
    • resolved_direction
    • actual_megapixels
    • pixel_error_percent
    • aspect_error_percent
    output_modefixed
    aspect_ratio1:1
    directionlandscape
    custom_ratio_width1
    custom_ratio_height1
    megapixels1.0
    multiple8
    seed0
    CategoryComfyUI Text Processor/Image

    Inputs (8)

    NameTypeDefaultDescription
    output_modeCOMBOfixedSelect fixed, seeded direction randomization, seeded preset and direction randomization, or seeded ratio randomization with the selected direction.
    aspect_ratioCOMBO1:1Choose one canonical ratio or provide a positive custom ratio pair.
    directionCOMBOlandscapeChoose the resolved orientation; randomize and randomize_all may replace it, while fixed and randomize_ratio preserve it.
    custom_ratio_widthINT11–10000Positive custom ratio width; used when aspect_ratio is custom.
    custom_ratio_heightINT11–10000Positive custom ratio height; used when aspect_ratio is custom.
    megapixelsFLOAT1.00.1–16Binary 1024 squared pixel budget before multiple alignment.
    multipleINT88–128Align both dimensions to this positive multiple.
    seedINT00–4294967295Explicit uint32 seed for deterministic randomized modes.

    Outputs (7)

    NameTypeDescription
    widthINTAligned output width in pixels.
    heightINTAligned output height in pixels.
    resolved_aspect_ratioSTRINGCanonical or reduced custom ratio label before direction is reported separately.
    resolved_directionSTRINGResolved landscape or portrait direction.
    actual_megapixelsFLOATRealized binary megapixels after multiple alignment.
    pixel_error_percentFLOATSigned realized pixel-area error percentage.
    aspect_error_percentFLOATSigned realized aspect-ratio error percentage.