Nodes/world weaver/Qwen Aspect Ratio (World Weaver)
ComfyUI Node

Qwen Aspect Ratio (World Weaver)

The aspect ratio dropdown that gets Qwen's resolutions right

By Creepybits·Created 10 months ago·Updated 2 months ago· 30
Qwen Aspect Ratio (World Weaver)
    • width
    • height
    ratio

    Aspect ratios are the boring thing that ruins otherwise fine images. Pick a random width and height and the model crops your subject's head off or pads the frame with empty space. This node is a tiny fix for that: one dropdown, seven ratios, and it spits out the width and height that the Qwen image models actually like. It exists because World Weaver ships workflows for Qwen and Wan 2.2, and those models behave noticeably better at their native training resolutions.

    That's the entire job, and it does it without any model or API. It's a lookup table with two integer outputs.

    How it works

    Pick a ratio and the node returns the matching width and height:

    | Ratio | Width × Height | |-------|----------------| | 1:1 | 1328 × 1328 | | 16:9 | 1664 × 928 | | 9:16 | 928 × 1664 | | 4:3 | 1472 × 1104 | | 3:4 | 1104 × 1472 | | 3:2 | 1584 × 1056 | | 2:3 | 1056 × 1584 |

    Those aren't round numbers, and that's the point. They're Qwen Image's native bucket sizes - the ones the model was trained on, where it doesn't need to invent or crop content. Wire the two INT outputs into an EmptyLatentImage node (or your model's resolution inputs) and the empty latent starts at the right size. In the pack's Qwen and Wan 2.2 workflows, that's exactly where this node sits.

    Installing it

    It's part of the World Weaver pack, so install that once: ComfyUI Manager, search "world weaver", install, restart. Terminal people:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Creepybits/World_weaver
    

    Restart, let the dependencies (google-genai, numpy, opencv-python, requests, sounddevice) settle in. No downloads beyond that - it's just a dictionary.

    Where people get burned

    Honestly, not much to burn yourself on here. The one trap is the same one that gets every resolution helper: these sizes are Qwen-specific. Feed a 1664×928 "16:9" into an SDXL or Flux latent and you may get letterboxing or cropping, because those models have their own preferred buckets. Use it for what it's named for - Qwen and Wan 2.2 (Wan's native buckets sit in the same family) - and you're fine.

    It's a thin node, the kind you could recreate in thirty seconds with a text-to-int pair and a notebook. But that's almost a recommendation: it encodes the exact resolutions you'd otherwise have to look up, and it makes the workflow readable at a glance. Sometimes the most useful node is the one that stops you from typing 1664 into the wrong box.

    CategoryCreepybits/World_weaver

    Inputs (1)

    NameTypeDefaultDescription
    ratioCOMBO7 options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, +1

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT