ComfyUI Node

Qwen Edit Resolution

Stop guessing what resolution Qwen-Image-Edit wants

By Ltamann·Created about a year ago·Updated 19 days ago· 156
Qwen Edit Resolution
    • width
    • height
    resolution1328x1328 • 1:1 (≈1.76MP) (square)

    Qwen-Image-Edit is the Apache-2.0 instruction editor that ate a huge chunk of the mask-and-adapter workflow - hand it a picture and a sentence ("make the jacket leather", "remove the watermark") and the change just happens. It's also, like most image models, opinionated about resolution. Qwen-Image's family trains at a ~1328px-native square, and the edit variants want inputs that land on that grid. That's where Qwen Edit Resolution comes in: it's a dropdown of the sensible resolutions, and it hands you the width and height integers so you don't hand-type them.

    What it is

    A one-trick helper. You pick from a dropdown of Qwen-Image-Edit-friendly resolutions - the default is 1328x1328 • 1:1 (~1.76MP) (square), and there are other ratios in the same spirit - and it outputs the two dimensions as INTs. From there you feed them into an EmptyLatentImage, an ImageScale/resize, or an ETUR refiner node set to Qwen model type. That's the whole job, and it does it without a single computation of its own: it just parses the label you chose.

    • resolution (dropdown) - pick the shape. The label carries the pixel size, the ratio, and the megapixel count, so "1:1" at 1328² is right there in the name.
    • width / height (INT outputs) - the numbers, ready to wire.

    No optional inputs, no hidden settings. If you've ever fed Qwen-Image-Edit an oddly-shaped latent and watched it squish or crop your subject, this is the node that keeps that from being a typo.

    Why you'd reach for it

    Two reasons, and they're both lazy in the good way. First: in the ETUR refiner, model_type has a Qwen Image Edit entry, and PiD (PixelDiT) upscaling has Qwen 1K→4K variants too - that whole family wants its native resolutions respected. Second: the Qwen-Edit-plus-SeedVR2 pairing has become the standing photo-restoration recipe in the upscaling world, and any of those pipelines benefits from locking the edit pass to a native resolution instead of letting it drift.

    Installing it

    It ships in the TBG ETUR pack, so the install is the pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Ltamann/ComfyUI-TBG-ETUR
    cd ComfyUI-TBG-ETUR
    pip install -r requirements.txt
    

    Or ComfyUI Manager → Install Custom Nodes → search "TBG" → TBG_Enhanced Tiled Upscaler & Refiner FLUX PRO, then restart. The pack drags in a hefty requirements list (triton, transformers, diffusers, bitsandbytes, opencv-contrib…), so give pip a minute and don't panic at the install log.

    Notes and gotchas

    The dropdown's first entry is the default, and it's a square - if you pick without looking, you'll be generating square. Also note the pack ships a sibling, Flux Kontext Resolution, doing the same job for the Kontext model; don't cross them up, since Qwen and Kontext have different native grids and swapping the helpers is how you end up with a squished edit.

    One more: "resolution helper" nodes like this exist because editing models re-emit the whole frame - they don't just paint inside your mask - so a badly-shaped input costs you on every pass. Picking a native resolution before the pass is the difference between an edit that looks like the same photo and one that looks like a crop. This node just makes the "right" answer a single click instead of a search.

    CategoryTBG/Helpers

    Inputs (1)

    NameTypeDefaultDescription
    resolutionCOMBO1328x1328 • 1:1 (≈1.76MP) (square)18 options: 1328x1328 • 1:1 (≈1.76MP) (square), 1088x1632 • 2:3 (≈1.78MP), 1632x1088 • 3:2 (≈1.78MP), 1152x1536 • 3:4 (≈1.77MP), 1536x1152 • 4:3 (≈1.77MP), 1008x1792 • 9:16 (≈1.81MP), +12

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT