Nodes/ComfyUI-Aaalice-Nodes/📐 Resolution Preset
ComfyUI Node

📐 Resolution Preset

Exact aligned dimensions without the mental math — and no megapixel sermon

By Aaalice233·Created 2 months ago·Updated 9 days ago· 25
📐 Resolution Preset
    • Width
    • Height

    Every ComfyUI user has typo'd a resolution into an Empty Latent node and ended up with a 1023×1025 latent that the VAE quietly hates. ResolutionPreset is the node that makes that impossible: it outputs an exact width and height, guaranteed divisible by the alignment you choose, picked from presets, direct input, or a draggable canvas widget.

    That's the whole job, and it does it without lecturing you. It has no classic inputs - everything lives in the widget - and its two outputs are simply Width (INT) and Height (INT), which you wire into an Empty Latent Image or a loader's width/height ports.

    The alignment bit

    Dimensions snap to an alignment you pick: 8, 16, 32, or 64 pixels. Multiples of 8 is the baseline that samplers and VAE decode are happiest with, and it's the convention every workflow assumes; 16/32/64 are for when you're being strict about patch sizes. The clever fallback: if you choose a built-in preset that can't satisfy the current alignment, the node falls back to that preset's 8px alignment so the output is still exact - you never get a "1, the preset didn't fit" empty state.

    How you pick dimensions

    • Eleven built-in presets, deliberately model-agnostic - including the portrait/landscape pair 1080×1920 and 1920×1080 that anime checkpoints and video tools keep wanting.
    • Personal presets you save yourself, each keeping its own alignment, stored in the current ComfyUI user directory (per user, not baked into the workflow).
    • Direct width/height entry, which still snaps to alignment.
    • A draggable canvas with corner handles, so you can eyeball an aspect ratio and get a clean number out.

    The honest limits

    The README says it better than I can paraphrase: this node doesn't compute a target resolution from megapixels, doesn't recommend a model, and performs no image operations. If you want "0.5MP portrait" style math that derives dimensions from a pixel budget, use ComfyUI's own ResolutionSelector instead - that's its lane, not this node's. ResolutionPreset is for "I want exactly 1024×1024, exactly divisible by 8, and I don't want to catch myself typing 1042."

    Install

    Same pack as the rest of Aaalice's nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Aaalice233/ComfyUI-Aaalice-Nodes.git
    cd ComfyUI-Aaalice-Nodes
    pip install -r requirements.txt
    

    or search ComfyUI-Aaalice-Nodes in ComfyUI Manager, then restart. No models, certifi is the only extra dependency. It's a V3-node pack, so it wants a recent ComfyUI - classic canvas and Nodes 2.0 work, App Mode doesn't.

    It's a small node with a small, exact job. If you've ever fought a latent whose side length wasn't divisible by 8, you'll appreciate it exactly once per session - which, over a year of sessions, is a lot of saved annoyance.

    CategoryAaalice/tools

    Inputs (0)

    No inputs

    Outputs (2)

    NameTypeDescription
    WidthINTSelected width in pixels.
    HeightINTSelected height in pixels.