Nodes/comfyui-plugins/NativeImageSizes
ComfyUI Node

NativeImageSizes

The exact resolutions Qwen-Image was trained at, as a node

By HDembinski·Created 4 months ago·Updated 4 months ago· 0
NativeImageSizes
    • width
    • height
    preset
    scale1

    This node is a glorified lookup table, and it earns its keep anyway. Pick an aspect ratio, get a width and height, wire them into an EmptyLatentImage - done. What you're getting is the seven resolutions the Qwen-Image family was actually trained at: 16:9 (1664×928), 3:2 (1584×1056), 4:3 (1472×1104), 1:1 (1328×1328), and the flipped portrait versions (1104×1472, 1056×1584, 928×1664).

    Why does that matter? Diffusion models are happiest at resolutions they saw in training, and Qwen-Image is pickier than most. The community learned the hard way that this family's output quality and geometry track its input resolution - the Qwen-Image-Edit "offset" problem people kept hitting was at heart an input-resolution problem. Feed it a 1024×1024 latent and you're working outside its comfort zone; feed it 1328×1328 and the model behaves like it knows the shape. The scale dropdown (0.5, 1, 2) just multiplies both dimensions, so you can drop to a smaller size for quick tests or push to 2× for a big frame and stay on the same native grid.

    The mechanism is trivial by design: a hardcoded dict of presets, a multiply, a round(). No model, no network, no VRAM. That's not a criticism - half the value is that you can't typo your way into a non-native resolution, and the other half is that it reads better in a shared workflow than a magic 1328 sitting in an empty-latent node. If you already type these numbers from memory, you don't need it. If you've ever wondered why your Qwen generations looked slightly off, this is the node that removes the guesswork.

    The two outputs are plain INTs (width, height), so they plug straight into EmptyLatentImage for Qwen-Image or into the latent side of a Qwen-Image-Edit workflow. Keep them for Qwen-family models - feeding SDXL these exact numbers gets you nothing special.

    Installing it is the lightest install in the pack. Via ComfyUI Manager, search for comfyui-plugins (repo HDembinski/comfyui_plugins); or from the command line:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HDembinski/comfyui_plugins
    

    Restart ComfyUI. That's the whole dependency story - pyproject.toml declares no runtime dependencies, and nothing downloads any model file. The one real gotcha is that this pack is built on ComfyUI's new plugin API (comfy_api.latest), so it needs a fairly recent ComfyUI. If the node doesn't show up after install, that's the cause: update ComfyUI itself, not the pack.

    Where people get tripped up: the scale options are fixed strings, so you can't type 1.5 - you get half, whole, or double. And both outputs are always emitted, so if you only need the width, the extra wire is harmless but can clutter a busy graph. Neither is a bug, just the price of a node that's deliberately one job only.

    Categoryimage/resolution

    Inputs (2)

    NameTypeDefaultDescription
    presetCOMBO7 options: 16:9, 3:2, 4:3, 1:1, 3:4, 2:3, +1
    scaleCOMBO13 options: 0.5, 1, 2

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT