Nodes/comfyui_qwen_image_edit_adv/QwenImageEditSimpleScale
ComfyUI Node

QwenImageEditSimpleScale

The set-and-forget fix for Qwen edit drift

By lenML·Created 12 months ago·Updated 9 months ago· 38
QwenImageEditSimpleScale
  • image
  • IMAGE
  • width
  • height
resolution1024
alignment32

The name is honest. SimpleScale is the node this pack's author recommends you use most of the time, and it's the one you'll drop in front of every Qwen-Image-Edit workflow. One image in, a properly-sized image out, three settings, done.

Why it exists: Qwen-Image-Edit is trained around 1024×1024 and it's genuinely brittle about input resolution. Feed it an arbitrary photo and the edit comes back geometrically shifted - the offset problem that defined the model's early reputation, and the reason the 2511 revision's own release notes lead with "mitigate image drift." The fix is mostly boring: control the input size. This node does that with no crop, no ratio politics, no thought required.

How it works

The mechanism is straightforward. It takes your image, computes resolution² (default 1024², i.e. about 1M pixels), divides by the input's actual pixel count to get a scale factor, applies it to both dimensions, then rounds each to a multiple of alignment (default 32 - the model's training grid). It resamples with Lanczos. The result: a ~1M-pixel image with your original aspect roughly preserved and dimensions that land on the grid the model expects. No cropping anywhere.

Inputs and outputs

That's all there is:

  • image - your reference.
  • resolution - the size target; default 1024. Range 512–4096 if you need it smaller or want a higher-res edit.
  • alignment - grid step; leave at 32.

Outputs: the resized IMAGE, plus width and height as integers in case anything downstream cares.

That's the whole node. That's the point. When the advanced sibling QwenImageEditScale starts tempting you with aspect-ratio strategies and megapixel budgets, remember: it crops, this one doesn't. If you want your full frame kept, this is the one to reach for.

Install

Standard custom-node install: ComfyUI Manager → Install Custom Nodes → search "comfyui_qwen_image_edit_adv", or clone into custom_nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/lenML/comfyui_qwen_image_edit_adv

Restart ComfyUI and you're done - the pack's requirements.txt is empty and it ships no weights. The 20B Qwen-Image-Edit model itself (practically a Q4 GGUF), the Qwen2.5-VL CLIP, and the VAE all load through ComfyUI's normal Qwen loaders. The repo also ships a demo_simple.json workflow so you can see it wired correctly.

Troubleshooting

Wire it as Load Image → QwenImageEditSimpleScale → TextEncodeQwenImageEditAdv → KSampler, and keep CFG at 1.0–2.5. A couple of honest notes: it rounds each dimension separately, so a very wide panorama can drift a few pixels off exact aspect - irrelevant to the model, which just wants the right pixel budget. It's a scaler, not a fixer - if your source is tiny or mangled, a bigger resolution won't save it. And if the edit still drifts with a clean 1024 input, suspect CFG too high or a chain of stacked edits, since each pass re-emits the whole frame.

CategoryQwenImageEditAdv/Scale

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
resolutionINT1024512–4096
alignmentINT328–256

Outputs (3)

NameTypeDescription
IMAGEIMAGE
widthINT
heightINT