Nodes/ComfyUI Warper Nodes/Aspect Ratio Resolution (Warper)
ComfyUI Node

Aspect Ratio Resolution (Warper)

One dropdown to size any generation

By AIWarper·Created about a year ago·Updated 8 months ago· 14
Aspect Ratio Resolution (Warper)
    • width
    • height
    aspect_ratio16:9 (Wide)
    long_edge1920

    The "what resolution do I actually need" question eats more beginner hours than it should. You know you want a 16:9 output, but is that 1280×720 or 1920×1080, and what's the portrait version of that? Aspect Ratio Resolution (Warper) is a two-input node that answers it: pick a ratio from a dropdown, give it a long edge, and out come width and height that are actually even numbers. That last bit matters more than it looks - video encoders and several models quietly reject odd dimensions, and rounding by hand is exactly the kind of thing that silently breaks a queue at frame 300.

    It's one of the resolution utilities in ComfyUI Warper Nodes, the small niche pack from workflow author AIWarper. It's pure math, no model, no downloads, no state - the node you stick in front of an Empty Latent or a resize when you want a clean, reproducible size.

    How it works

    The node holds a hard-coded list of nine ratios - from 21:9 (Ultra-Wide) down through 16:9, 4:3, 3:2, 1:1, and the portrait mirror images to 9:21. You pick one and set long_edge, which is the larger dimension: width for landscape, height for portrait. It computes the other side proportionally, then nudges both to even numbers by adding 1 when needed. Nothing goes through a model, so it's instant and deterministic.

    The two inputs are the whole story:

    • aspect_ratio - dropdown of the nine ratios, default "16:9 (Wide)".
    • long_edge - target size of the longer side, default 1920 (1080p-height territory).

    Outputs are width and height as plain integers, ready to feed an Empty Latent, a resize node, or a resolution-setting node elsewhere in the graph.

    Installing it

    Same as every Warper node. Easiest is ComfyUI Manager → search "ComfyUI-WarperNodes" → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AIWarper/ComfyUI-WarperNodes
    # restart ComfyUI
    

    This node has zero extra dependencies - it's arithmetic on ints. The pack's only real model download (the RAFT checkpoint for Flow Visualizer) is irrelevant here.

    Common issues

    Honestly, this is the most reliable node in the pack, so the trouble is all downstream. long_edge has a floor of 64 and a ceiling of 8192; if a workflow feeding it refuses to accept the output, check that you're not clipping against those bounds. And remember what "long edge" means - with 16:9 and long_edge 1920 you get 1920×1080, but with 9:16 you get 1080×1920. If you set the same number on a portrait ratio expecting landscape dimensions, you'll get a correctly even but possibly surprising size. This node hands you clean integers; it's up to you to hand them to something that uses them.

    CategoryWarper Tools/Resolution

    Inputs (2)

    NameTypeDefaultDescription
    aspect_ratioCOMBO16:9 (Wide)9 options: 21:9 (Ultra-Wide), 16:9 (Wide), 4:3 (Standard), 3:2 (Photo), 1:1 (Square), 2:3 (Portrait Photo), +3
    long_edgeINT192064–8192

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT