Nodes/comfyui-stillfront/SF Qwen Resolution
ComfyUI Node

SF Qwen Resolution

The Qwen aspect-ratio cheat sheet — pick a preset, get real pixels and a preview

By razvanmatei-sf·Created 9 months ago·Updated 7 months ago· 0
SF Qwen Resolution
    • width
    • height
    • resolution
    • preview
    resolution1:1 (Square)

    Qwen-Image workflows have a quirk that bites everyone once: the model expects specific canvas sizes, and if you feed it a resolution it wasn't built for, you get weird crops, smeared text, or silent quality loss. SF Qwen Resolution is the tiny utility that fixes the remembering part. One dropdown, and it hands you the exact width and height Qwen wants - plus a live preview so you can see what you're about to get.

    It's part of comfyui-stillfront, the SF-pack, and it lives under Stillfront/Utils. It's the most boring node in the pack, which is exactly why it's useful.

    What it does

    You pick one of seven presets - 1:1 (Square), the 16:9 and 9:16 widescreen options, and the 4:3, 3:4, 3:2, 2:3 standards. Out the other side you get four things:

    • width and height as INTs - wire these into an empty latent or a Qwen image node's size inputs.
    • resolution as a STRING, formatted like 1328 x 1328, for anything that wants the value as text.
    • preview as an IMAGE - a 1024×1024 grid with a red box drawn to scale and the pixel dimensions stamped on it. It's an output node, so you'll see the preview rendered in the UI.

    The preset pixel values are the genuinely useful part. These aren't arbitrary numbers - they're the native Qwen-Image canvas sizes: 1:1 maps to 1328×1328, 16:9 to 1664×928, 9:16 to 928×1664, 4:3 to 1472×1104, 3:4 to 1104×1472, 3:2 to 1584×1056, and 2:3 to 1056×1584. If you've ever hand-typed 1024x1024 into a Qwen node and wondered why it looked off, this is the fix.

    How it works

    Under the hood it's a plain lookup table plus a drawing routine. Select a preset, it maps it to (width, height), formats the string, and renders the preview with PIL - a dark grid, a scaled red aspect box, and the dimensions drawn in red text. No API calls, no models, no network. It runs locally and instantly.

    Where it fits in a workflow

    The classic setup: SF Qwen Resolution → (width, height) → the Qwen-Image text-to-image or edit node you're driving. If you're using this pack's own SFWaveSpeedQwenTextToImage, note that node has its own size dropdown with the same underlying sizes - this utility is more for when you want the dimensions as values to feed a custom latent, a batch, or a dynamic workflow that computes from them.

    Installing it

    Same as the rest of the pack: ComfyUI Manager, search "comfyui-stillfront", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/razvanmatei-sf/comfyui-stillfront
    cd comfyui-stillfront
    pip install -r requirements.txt
    

    Then restart. No config needed - this node needs no keys and no setup whatsoever.

    Gotchas

    There's genuinely not much to trip over here. The preview uses a system font for the text overlay; on headless Linux boxes with no arial.ttf it falls back to PIL's default font and just renders smaller text - cosmetic only, the outputs stay correct. If your downstream node needs a size it doesn't offer (like a 21:9 ultra-wide), this node can't do it; you'll be back to typing numbers by hand. For everything else, it's the honest answer to "what size does Qwen want again?"

    CategoryStillfront/Utils

    Inputs (1)

    NameTypeDefaultDescription
    resolutionCOMBO1:1 (Square)7 options: 1:1 (Square), 16:9 (Widescreen Landscape), 9:16 (Widescreen Portrait), 4:3 (Standard Landscape), 3:4 (Standard Portrait), 3:2 (Classic Landscape), +1

    Outputs (4)

    NameTypeDescription
    widthINT
    heightINT
    resolutionSTRING
    previewIMAGE