Nodes/ComfyUI-WJNodes/ratio selector
ComfyUI Node

ratio selector

One dropdown, seven aspect ratios, wire it anywhere

By 807502278·Created 2 years ago·Updated 11 months ago· 21
ratio selector
    • ratio
    ratio3:2

    Sometimes you don't need a node to resize anything - you just need a clean, reusable "aspect ratio" value you can plug into whatever else in your graph actually wants one. That's the entire job of this node: a dropdown of common ratios, wired to a generic output that fits into any node expecting a ratio input.

    It's part of ComfyUI-WJNodes, a small personal pack from an author who publishes only under the GitHub handle 807502278 - not a name you'll find discussed anywhere, but a fair number of the nodes in this pack, this one included, solve genuinely mundane and common annoyances.

    What it does

    There's exactly one input: ratio, a dropdown with seven presets - 1:1, 3:4, 4:3, 2:3, 3:2, 9:16, 16:9 - defaulting to 3:2. Pick one, and the node emits it as a value on its single output, also named ratio.

    The output type is deliberately generic (a wildcard type in ComfyUI terms), which is the whole point: this node isn't tied to feeding a specific downstream node the way QwenImage_ratio is tied to resizing images and masks. It's meant to be a reusable ratio source you can wire into anything in your graph that has a ratio-shaped input - including other WJNode utilities, or your own custom logic, without caring what format that consumer expects internally.

    Why you'd pick this over QwenImage ratio

    The pack actually ships both, and they cover different jobs despite sharing the same seven-way preset list. QwenImage_ratio bundles the ratio selection together with an actual image/mask resize step and hands back resolved width/height numbers - reach for that one when you want the resize done for you, especially if you're specifically targeting Qwen-Image's supported dimensions.

    This node does none of that. It's the bare selector - a single, consistent source of truth for "which ratio am I using" that you can reference from multiple places in a graph without duplicating a dropdown five times, or wire into a downstream node's ratio input that expects the raw value rather than a resized image. If your workflow logic just needs to know the ratio to make a decision, or you're feeding a node that computes its own resize from a ratio value, this is the lighter option.

    Installing it

    ComfyUI Manager: search "ComfyUI-WJNodes." Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/807502278/ComfyUI-WJNodes.git
    

    Restart ComfyUI. No models, no heavy dependencies - this is about as minimal as a node gets.

    Where to be careful

    Because the output is a generic wildcard type rather than a strict, labeled type, ComfyUI won't stop you from wiring this into a node that's expecting something completely different in shape - it's on you to confirm the receiving node actually knows what to do with a plain ratio value. If a downstream node throws an unexpected error after you connect this, check that it genuinely accepts a ratio-typed input rather than assuming the wiring itself is broken.

    There's no community discussion anywhere for this specific node - it's from a low-traffic personal pack with essentially no public footprint - so if you're unsure whether a particular downstream node is compatible, the fastest way to find out is to just wire it up and see what ComfyUI does, rather than searching for prior art that doesn't exist.

    CategoryWJNode/ImageEdit/ratio

    Inputs (1)

    NameTypeDefaultDescription
    ratioCOMBO3:27 options: 1:1, 3:4, 4:3, 2:3, 3:2, 9:16, +1

    Outputs (1)

    NameTypeDescription
    ratio*