Nodes/Y7Nodes for ComfyUI/Y7 Aspect Ratio Picker
ComfyUI Node

Y7 Aspect Ratio Picker

Stop doing aspect-ratio math in your head — drag it instead

By yushan777·Created about a year ago·Updated 4 days ago· 8
Y7 Aspect Ratio Picker
    • X
    • Y
    Xi512
    Yi512

    The Y7 Aspect Ratio Picker from the Y7Nodes pack is one of those nodes that feels gimmicky for about ten seconds and then you never want to go back. Instead of typing 1024x576 into an Empty Latent Image and squinting to remember whether that's 16:9, you get an actual 2D canvas. Drag to the proportions you want, and the node hands you the width and height.

    It's a pure quality-of-life utility - the author's own read on the whole pack is "probably only useful to me," and for this one the pitch is basically: don't do the math, point at the shape.

    How it works

    The canvas is the node. The X axis is width (left→right), the Y axis is height (bottom→top), and a filled rectangle shows the proportions you've selected with a dot marking the current position. As you drag, the simplified ratio - 16:9, 4:3, 1:1 - updates at the bottom of the canvas, and the right panel shows width, height, and total megapixels. That megapixel readout is quietly the most useful part: it's why you can drag to "about 1MP" without doing multiplication.

    A few interaction details worth knowing:

    • Snapping is on by default. Drags snap to step increments; hold Shift to disable snapping for fine control.
    • Double-click either value in the right panel to type a number directly.
    • The Swap button flips portrait ↔ landscape, which is handy when you've found the right proportions but wrong orientation.

    The range and snapping live in the node's properties (right-click → Properties): minX/maxX/minY/maxY set the range per axis (defaults go up to 8192), stepX/stepY set the snap increment, valueX/valueY hold the current selection, and snap/dots toggle behavior and the grid-dot display.

    The inputs and outputs that matter

    The node takes two INT inputs, Xi and Yi (both default to 512, range 0–8192) - these are just the starting position when the workflow loads. The outputs are X and Y as INT, i.e. the selected width and height. Wire those into any node that wants integer dimensions - an Empty Latent Image via a size-node, a conditioning-size control, whatever. Note the output names are X/Y, not width/height; that matters only if you're looking at a connection error and wondering where the socket names came from.

    Because the position is stored in node properties, it saves with the workflow - your chosen composition stays put when you share the JSON.

    Installing it

    It's part of Y7Nodes, so:

    cd ComfyUI/custom_nodes
    git clone https://github.com/yushan777/ComfyUI-Y7Nodes
    cd ComfyUI-Y7Nodes
    pip install -r requirements.txt
    

    Restart ComfyUI, and it'll be under the Y7Nodes → Utils menu. Or grab it through ComfyUI Manager by searching "Y7Nodes."

    Verdict

    If you spend any time at all fiddling with canvas sizes - especially if you juggle portrait, landscape, and square outputs in the same workflow - this is a genuinely pleasant little node. If you never think about aspect ratios, you've found nothing. The one thing I'd watch: it outputs plain integers, so you're still on the hook for wiring them into whatever consumes dimensions. No magic, just a nicer way to pick.

    CategoryY7Nodes/Utils

    Inputs (2)

    NameTypeDefaultDescription
    XiINT5120–8192
    YiINT5120–8192

    Outputs (2)

    NameTypeDescription
    XINT
    YINT