Nodes/ComfyUI 1hewNodes/Image Resize Qwen Image 3.0 Pro
ComfyUI Node

Image Resize Qwen Image 3.0 Pro

Hand the model the shape you want back

By 1hew·Created about a year ago·Updated about 16 hours ago· 33
Image Resize Qwen Image 3.0 Pro
  • image
  • mask
  • image
  • mask
  • native_image
  • native_mask
preset_sizeauto (2k)
fitcrop
pad_color1.0

What it's for

Every hosted image model has a size table, and every one of them is different. Image Resize Qwen Image 3.0 Pro resizes an image (and its mask, in sync) to a size Qwen Image 3.0 Pro will accept without rounding it into something else - 15 aspect ratios across 1k and 2k tiers, plus auto-matching and dynamic scaling.

The reason to care is not pixel-exactness for its own sake. It's that reference-image conditioning is ratio-sensitive: you crop a face region out of a 3:2 photo, feed it to the API, and if the reference is 2:1 the model gets a different composition than you set up. Snapping the reference to a supported ratio first keeps what you framed and what came back in agreement.

There's a second, sneakier use: Qwen Image 3.0 Pro's editing path ignores the size parameter entirely - resolution is decided upstream at roughly 2K. So on the edit path this node can't dictate output size at all; what it can do is shape the reference image's aspect ratio, which does influence the aspect of what comes back. A strange job for a resize node, and the honest reason people add it to an edit workflow.

How the sizing works

preset_size has four flavours, same design as the pack's other resize adapters:

  • auto (the default is auto (2k)) - pick the tier (1k or 2k) whose target area is nearest your input, then the closest-aspect preset in that tier. Ratios are compared in log space with a 2% tolerance, and ties break toward the candidate closest in area to your input.
  • auto (1k) / auto (2k) - same, tier pinned.
  • dynamic / dynamic (1k|2k) - compute from your input's aspect ratio instead of snapping, with 16-pixel alignment, the official 1:8–8:1 aspect clamp, and a 4096 longest-edge cap.
  • An explicit preset - a fixed size, no inference.

The table is 15 ratios, and the 2k entry is exactly double the 1k one in every row:

| Ratio | 1k | 2k | |---|---|---| | 3:1 | 1728×576 | 3456×1152 | | 21:9 | 1344×576 | 2688×1152 | | 2:1 | 1440×720 | 2880×1440 | | 16:9 | 1280×720 | 2560×1440 | | 3:2 | 1248×832 | 2496×1664 | | 4:3 | 1152×864 | 2304×1728 | | 5:4 | 1120×896 | 2240×1792 | | 1:1 | 1024×1024 | 2048×2048 | | 4:5 | 896×1120 | 1792×2240 | | 3:4 | 864×1152 | 1728×2304 | | 2:3 | 832×1248 | 1664×2496 | | 9:16 | 720×1280 | 1440×2560 | | 1:2 | 720×1440 | 1440×2880 | | 9:21 | 576×1344 | 1152×2688 | | 1:3 | 576×1728 | 1152×3456 |

There's deliberately no 4k tier: Qwen's official area ceiling is 2048×2048, so the node stops at 2k rather than offering a tier the model would reject. The 1:8–8:1 aspect range is wider than GPT Image 2.0's 1:3–3:1, which is what makes the extreme 3:1 and 1:3 rows possible.

Inputs and outputs

preset_size, fit (crop, pad, stretch, default crop), pad_color (a STRING - grey value, HEX, RGB, colour name, or the edge/average/extend/mirror fill strategies), plus optional image and mask. Masks are transformed alongside the image with nearest-neighbour interpolation, so a mask doesn't get smeared by a bicubic resize.

Outputs: image, mask, and native_image / native_mask - a same-framing copy of the main output at source scale. Fixed presets are worth favouring over dynamic when you want a predictable canvas; dynamic (2k) with fit=pad is the setting for "keep my framing, hit a suitable tier, fill the rest".

Install

Part of ComfyUI 1hewNodes. Manager → search the pack title, or:

cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
pip install -r ComfyUI-1hewNodes/requirements.txt

Restart ComfyUI when it finishes. This node is pure torch, so no model downloads - the pack's requirements file is heavy for its other node groups. Qwen credentials live on the API node side, not here.

Common issues

Missing node after an update. The non-Pro Image Resize Qwen Image 3.0 was removed in pack v3.27.0 as an exact duplicate, and existing workflows were switched to this Pro node. If a saved workflow now reports a missing node, that's why - swap it for Image Resize Qwen Image 3.0 Pro by hand.

The edit path ignores your size. Expected. Editing decides resolution upstream (~2K), so a preset_size here only nudges the aspect ratio through the reference image. If you need an exact output size from an edit, that isn't available.

dynamic* sizes aren't official. They're computed ratios, not table entries, so downstream tooling that assumes the table (or an API that snaps to it) may land somewhere slightly different. Use an explicit preset when you need reproducibility.

Don't mix it up with the GPT Image 2.0 node. The 1k/2k tables happen to be identical between the two, but the dynamic rules are not - Qwen clamps to 1:8–8:1 with a 4096 cap, GPT to 1:3–3:1 with 3840. Pick by which model is actually receiving the image.

Old ComfyUI, no nodes at all. This pack uses ComfyUI's newer V3 node schema, so update and restart before going bug-hunting.

Category1hewNodes/image/resize

Inputs (5)

NameTypeDefaultDescription
preset_sizeCOMBOauto (2k)36 options: auto, auto (1k), auto (2k), dynamic, dynamic (1k), dynamic (2k), +30
fitCOMBOcrop3 options: crop, pad, stretch
pad_colorSTRING1.0
imageoptIMAGE
maskoptMASK

Outputs (4)

NameTypeDescription
imageIMAGE
maskMASK
native_imageIMAGE
native_maskMASK