Painter Qwen Image Edit Plus
Painter Qwen Image Edit Plus
- clip
- vae
- image1_mask
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- positive
- negative
- latent
First, the name is a lie. Painter Qwen Image Edit Plus does not edit anything. It's an encoder/conditioning node - it takes your reference images, your instruction, and a CLIP and VAE, and hands you the CONDITIONING + LATENT that a KSampler still has to do the actual work on. The "edit" happens downstream in the Qwen-Image-Edit model, which this node just feeds properly. Once you know that, the node is genuinely nice, because it solves the two complaints everyone has about Qwen-Image-Edit: the geometric offset and the fact that a sentence can't leave unedited pixels alone.
Why you'd reach for it
Qwen-Image-Edit is the open instruction editor - you hand it a picture and "make the car red, keep everything else," and it does it. Its one structural flaw is that it re-emits the whole frame, so pixels you never asked about shift, and faces drift on a chain of edits. The standard community fix is to bolt a mask back on around it, and that's precisely what this node automates: feed image1_mask and it encodes your first image as the base latent with a noise_mask attached, so the KSampler only regenerates the white regions. White = edited, black = untouched. That's masked inpainting on top of an edit model - the recipe the KB describes as the current best practice.
It's from a Chinese ComfyUI creator (a Douyin blogger who posts as 绘画小子, "painting kid"), and it's one of those tiny packs that does one encoding job and does it well. Note the README promises a second node, but the shipped repo registers only this one - don't go hunting for the other.
How it works
The mode dropdown (1_image through 10_image) selects how many of the ten image1–image10 inputs get used - the only way to tell the node which images you're actually feeding. Each used image is downscaled to ~384px and injected into the Qwen llama_template system prompt as vision tokens, alongside your prompt. If you connect the VAE, the images are also resized to the output resolution and encoded into reference_latents, which get attached to both the positive and negative conditioning - that's the standard Qwen image-edit encoding trick.
The pixel-perfect part is real and worth understanding. When image1's aspect ratio matches your width/height within 1%, the node pads the reference onto a canvas at its native aspect ratio instead of squashing or cropping it - so geometry is preserved and the output lines up with the input, which is exactly the offset bug the community kept hitting with 2509. Mismatch the ratio and it center-crops instead, and you're back to offset risk.
The outputs: positive and negative conditioning (negative is just the empty prompt, still carrying the reference latents) go straight into a KSampler, and latent is image1 encoded at your target size, with the mask riding along when you provided one. batch_size tiles everything if you're sampling multiple images at once - usually leave it at 1.
Wiring it up
cd ComfyUI/custom_nodes/
git clone https://github.com/princepainter/ComfyUI-PainterQwenImageEdit.git
Or just search PainterQwenImageEdit in ComfyUI Manager, then restart. There's no requirements.txt and no Python deps - it only uses ComfyUI's own internals, so install is painless. The heavy lifting is the models, which the README assumes you already have:
diffusion_models/qwen_image_edit_2511_FP8.safetensors(or any 2511 GGUF)text_encoders/qwen_2.5_vl_7b.safetensors, loaded via CLIPLoader with typeqwen_imagevae/qwen_image_vae.safetensors- optional: the
Qwen-Image-Edit-2511-Lightning-4stepsLoRA, which makes the 20B model actually affordable on consumer VRAM
The author's bundled workflow also chains the model through ModelSamplingAuraFlow (shift 3) and CFGNorm (0.95), then samples at 4 steps, cfg ~1, euler/simple. Forget those and Qwen sampling quality falls apart - copy them from the bundled qwen_image_edit-2511.json if you're unsure.
What trips people up
- It won't generate. No sampler, no image out. You still need UNETLoader, KSampler, VAEDecode, the works. Beginners install this expecting a single edit node and get confused.
- Cropped or shifted output - your
width/heightdidn't match image1's aspect ratio, so no-offset mode didn't trigger. Match the ratio. width/heightmust be multiples of 8 (512–4096); a non-multiple silently misbehaves.- Mask shape warnings - feed a 2D
[H,W]or 3D[B,H,W]mask; anything else just gets skipped with a console warning. - Unmasked regions will still drift a little - that's the model's whole-frame re-emission, not a bug you can fix here. For bit-identical edges, mask everything you care about.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| mode | COMBO | 10 options: 1_image, 2_image, 3_image, 4_image, 5_image, 6_image, +4 | |
| batch_size | INT | 11–64 | — |
| vaeopt | VAE | — | |
| image1_maskopt | MASK | — | |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| image5opt | IMAGE | — | |
| image6opt | IMAGE | — | |
| image7opt | IMAGE | — | |
| image8opt | IMAGE | — | |
| image9opt | IMAGE | — | |
| image10opt | IMAGE | — | |
| widthopt | INT | 1024512–4096 | — |
| heightopt | INT | 1024512–4096 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |