Nodes/ComfyUI-PainterNodes/Painter Qwen Image Edit
ComfyUI Node

Painter Qwen Image Edit

Instruction editing, pixel-perfect

By princepainter·Created 7 months ago·Updated 5 days ago· 194
Painter Qwen Image Edit
  • clip
  • vae
  • image0_mask
  • images
  • positive
  • negative
  • latent
prompt
batch_size1
width1024
height1024

Instruction-based editing is the "Photoshop by telling it what to do" workflow, and Qwen-Image-Edit is the open standard for it - the model that made "replace the jacket, keep everything else" a one-line prompt instead of a mask-and-inpaint ordeal. PainterQwenImageEdit is the PainterNodes conditioning node for that model: it takes a prompt, up to ten images, and an optional mask, and builds the conditioning and latent for a Qwen-Edit sampling pass. The author's claims, in the changelog, are worth taking seriously: pixel-perfect editing with no pixel offset, mask editing support, and batch support.

What it is

An advanced/conditioning node. Required: clip (your Qwen-Image-Edit model), prompt, batch_size, width, height. Optional: vae, image0_mask, and an autogrow images list. Outputs: positive, negative, and latent - the standard triple for feeding a sampler.

How it works

Qwen-Image-Edit is a 20B MMDiT that understands images and text together, so editing is a dialogue: you hand it images and a prompt like "make the person in image_1 hold an umbrella," and it regenerates with the instruction applied. This node encodes that into conditioning. The autogrow images input takes up to ten images - the changelog upgraded it from fixed slots, so you add as many as the edit needs. image0_mask applies a mask to the first input image, which is the mask-edit path: restrict the change to a region and the rest of the frame stays untouched.

The "no pixel offset" claim matters. A recurring complaint with older edit approaches is the model shifting the whole image a few pixels on regen - the edited region doesn't line up with the original. Qwen-Edit (especially with the later 2509/2511 revisions) largely fixed that, and this node is built around it. For compositing workflows that's the difference between "edited" and "ruined."

width/height (defaults 1024×1024, stepped by 8) and batch_size control the output canvas and how many edits you run at once.

The inputs that matter

  • prompt - the instruction. Reference images by position in the prompt; Qwen understands image indices.
  • images - the source images (up to 10).
  • image0_mask - optional region-restricting mask for the first image.
  • batch_size / width / height - output canvas and batch.
  • Outputs: positive/negative/latent → sampler.

Install

Part of the PainterNodes pack. ComfyUI Manager → search "PainterNodes" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/princepainter/ComfyUI-PainterNodes
cd ComfyUI-PainterNodes
pip install -r requirements.txt

The Qwen-Image-Edit checkpoint itself loads through your normal model loader; the pack's workflows/qwen_image_edit-2026-6-19.json is the reference graph.

Common issues

  • Edit not applying to the right image - Qwen indexes images in prompt order; describe "image_1," "image_2," etc. and check which slot the autogrow list assigned.
  • Mask doing nothing - the mask applies to the first input image only. For other slots you'd need to reorder inputs.
  • Nothing changed at all - this node builds conditioning; the sampler still has to run the edit pass. If your graph just encodes and never samples, no edit happens.
  • Blurry or offset output - check that the Qwen-Edit checkpoint revision you loaded is current; the older 2508-era weights are the ones people reported drift on.

If you're still reaching for masks and inpainting for every "change this one thing" job, Qwen-Edit (and this node) will feel like cheating. That's the point.

Categoryadvanced/conditioning

Inputs (8)

NameTypeDefaultDescription
clipCLIP
promptSTRING
batch_sizeINT11–64
widthINT1024512–4096
heightINT1024512–4096
vaeoptVAE
image0_maskoptMASKMask applied to the first input image (image_0)
imagesoptCOMFY_AUTOGROW_V3

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT