Skip to content

Qwen-Image-Edit Instruction-Based Editing: Change Background and Edit Text with One Sentence (incl. 2509/2511) ​

Qwen-Image-Edit is an instruction-based editing model that the Alibaba Qwen team further trained on the Qwen-Image 20B base: upload an image, write one sentence—change the background, edit text, swap materials—and it makes the change directly. This page walks you through the official Qwen-Image-Edit workflow from start to finish: the initial template, 4-step Lightning acceleration, then upgrading all the way to 2509 (multi-image consistency) and 2511 (material replacement, character consistency).

How it divides labor with the Qwen-Image base from the previous lesson: the base generates from scratch, while the editing line performs surgery on existing images. It's also not like img2img's "repaint everything"—the input image is fed simultaneously to Qwen2.5-VL (to understand semantics) and the VAE Encoder (to preserve appearance), so people don't get distorted when changing backgrounds, and font styles are preserved when editing text.

What You'll Be Able to Do After This Lesson ​

  • Load the Qwen-Image-Edit workflow from the official template library, get the model files in place, and run your first one-sentence edit
  • Change backgrounds, edit text in images, and replace objects in images with a single Chinese or English instruction
  • Turn on the enable_turbo_mode switch to switch to the 4-step accelerated preset, and know when the negative prompt takes effect
  • Be able to explain how to choose among the three generations of editing models: the initial version (single-image instructions), 2509 (multi-image reference), and 2511 (material replacement, character consistency)
  • Reproduce the official 2511 material replacement example: two input images, turning a leather sofa into a fur sofa

Your Current Pain Points ​

  • You have an image and only want to change one thing—a cluttered background, a misspelled sign, the wrong sofa color—regenerating the whole image is time-consuming and introduces distortions
  • Using img2img to edit, a low denoise can't make changes while a high one repaints the subject too; with inpainting you first have to draw a mask
  • You've heard Qwen-Image-Edit has several versions—the initial release, 2509, 2511—and don't know which to download or whether the model files are interchangeable

When to Use This Technique ​

When you need to:

  • Make instruction-based edits to existing images: change backgrounds, edit or delete text in images, replace objects, swap materials
  • Keep the subject consistent before and after editing: faces stay undistorted, series images have a unified style
  • Edit Chinese or English text in images while keeping the font, size, and style exactly as they were

And you don't want to:

  • Repeatedly tweak denoise with img2img and gamble on results, where changing one thing changes everything
  • Draw masks manually for inpainting
  • Use two separate models and two workflows for generation and editing, exporting files back and forth

🎒 Preparation Before Starting ​

  • You've completed the previous lesson Qwen-Image Text-to-Image: the four-model set is already in place—the text encoder and VAE are fully shared with this lesson, saving you two large files
  • You know the model directory rules: what goes in diffusion_models, text_encoders, vae, loras (if you forgot, review where models go)
  • Reserve about 20GB of disk space for the editing model (fp8 weights 19.03GB + 4-step LoRA 0.81GB); add about 9GB more if you didn't download the encoder and VAE in the previous lesson
  • VRAM reference: the editing model is in the same 20B class as the base (fp8 weights 19.03GB); you can refer to the base model's official measurements (RTX 4090D 24GB, 86% usage); if it's tight, go to insufficient VRAM for solutions
  • Your network can reach Hugging Face; if the connection is unstable, use the ModelScope domestic mirror (address given in Step 2)
  • If you want to run 2511, first update ComfyUI to a newer version (the official template requires at least 0.4.0)

Core Idea ​

How is instruction editing different from image-to-image? Image-to-image treats the input image as a "draft" and re-denoises it, with denoise determining the extent of changes; Qwen-Image-Edit feeds the input image into two channels at the same time—Qwen2.5-VL is responsible for understanding "what is in the image" (visual semantic control), while the VAE Encoder is responsible for remembering "what the image looks like" (visual appearance control). The prompt is a modification instruction issued to the model, not a description of the picture. That's why it can "change only what should be changed": edit text while preserving the font, swap the background while preserving the person.

How to choose among the three generations (all are 20B-class editing models, upgraded step by step):

VersionRelease dateKey capabilitiesOfficial template name
Qwen-Image-Edit (initial version)August 2025Precise editing of Chinese and English text, dual semantic/appearance editingQwen Image Editing
Qwen-Image-Edit-2509September 2025Multi-image input (up to 3 images), series image consistency, ControlNet supportQwen Image Edit 2509
Qwen-Image-Edit-2511December 2025Person/multi-person consistency, material replacement, industrial design, built-in community LoRAsQwen Image Edit 2511 - Material Replacement

Workflow skeleton (initial version; same three-loader structure as the base model in the previous lesson, with the "blank canvas" replaced by "your image"):

LoadImage (image to edit) ──→ TextEncodeQwenImageEdit (positive instruction) ────→ KSampler ──→ VAEDecode ──→ SaveImage
                    ├──→ TextEncodeQwenImageEdit (negative, empty by default) ─→ KSampler (negative)
                    └──→ VAEEncode (image to latent) ───────────────→ KSampler
UNETLoader (editing model 20B) ─→ LoraLoaderModelOnly (4-step LoRA, toggle-controlled) ─→ ModelSamplingAuraFlow (shift 3) ─→ CFGNorm ─→ KSampler
CLIPLoader (Qwen2.5-VL 7B, type qwen_image) ─→ TextEncodeQwenImageEdit ×2
VAELoader (VAE) ─→ VAEEncode / VAEDecode

The three generations have different default parameters (the same enable_turbo_mode toggle, with different default positions across the three generations):

VersionToggle defaultParameters actually usedNegative prompt
Initial versionOff20 steps / cfg 2.5, no LoRA attachedEffective
2509On4 steps / cfg 1, with 4-step LoRA attachedIneffective
2511Off40 steps / cfg 4, no LoRA attachedEffective

KSampler reference table in the template sticky note (initial version): official original settings 50 steps / cfg 4.0, Comfy-tuned 20 steps / cfg 2.5, 4-step LoRA accelerated mode 4 steps / cfg 1.0. Default parameters for 2509 / 2511 are in steps 6 and 7. For daily use, just follow the template defaults.

Follow Along ​

Step 1: Load the official Qwen-Image-Edit workflow ​

Why: The official template has node connections, model download links, and the acceleration toggle all preconfigured; building from scratch is time-consuming and prone to missing nodes.

How: Choose either of the two methods.

Method A: One-click load from the template library (recommended) ​

Open the template library from Templates in the left sidebar, search for Qwen Image Edit, and select "Qwen Image Editing" (template name image_qwen_image_edit, released in August 2025). For the full walkthrough of the template library, see Template Library.

Method B: Download the JSON and open it manually ​

Official template file: image_qwen_image_edit.json; after downloading, open it via the menu Workflows → Open.

You should see: In the center of the canvas is a subgraph node named Qwen-Image-Edit, exposing an image input, prompts, a row of model file names, and an enable_turbo_mode acceleration toggle (used in step 5 to switch to the 4-step mode); next to it is a sticky note filled with model sizes and download links. The official documentation has a dedicated page on subgraph usage: docs.comfy.org/interface/features/subgraph.

  • The Qwen-Image-Edit workflow loaded on the canvas, with the subgraph and model sticky note visible

Step 2: Download the four-model set and put them in the correct directories ​

Why: Like the base model, the editing model is installed as separate parts; put a file in the wrong subdirectory and the loader's dropdown won't find it. The good news is that the text encoder and VAE are shared with the previous lesson.

How: The first three are mandatory; download the fourth only if you want acceleration (it runs fine in standard mode without it):

FileSizeWhich subdirectory to put it inDownload
qwen_image_edit_fp8_e4m3fn.safetensors19.03 GBmodels/diffusion_models/Hugging Face
qwen_2.5_vl_7b_fp8_scaled.safetensors8.74 GBmodels/text_encoders/Hugging Face (skip if already downloaded in the previous lesson)
qwen_image_vae.safetensors242 MBmodels/vae/Hugging Face (same as above)
Qwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors (optional)810.2 MBmodels/loras/Hugging Face

💡 For downloads in mainland China, use ModelScope

The edit model has a mirror of the same repository on ModelScope: Comfy-Org/Qwen-Image-Edit_ComfyUI; for the encoder and VAE, use the Comfy-Org/Qwen-Image_ComfyUI mirror from the previous lesson and download the files at the same paths under split_files.

⚠️ The file name of the 4-step LoRA follows the workflow

The official tutorial page says Qwen-Image-Lightning-4steps-V1.0.safetensors (the general base-model version), but the workflow template actually references the edit-specific version Qwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors. The two file names look similar but are not the same; download the wrong one and the acceleration LoRA won't load.

Once placed, press r on the canvas to refresh, then select the corresponding files in the loaders.

You should see: all red missing-model warnings gone, and the subgraph surface showing the correct model file names.

  • All required files are in the correct subdirectories (if you reuse the encoder and VAE from the previous lesson, this lesson only needs two new downloads)

Step 3: Upload an image, write a one-line instruction, and run your first image edit ​

Why: The prompt for Edit is not a description of the image, but an editing instruction given to the model—change what it says, and leave what it doesn't mention untouched as much as possible.

Steps:

  1. Upload the image you want to edit via the image input of the subgraph. To replicate the official example, first download the official input image image_qwen_image_edit_input_image.png (an underwater figure image with UI text)
  2. Write the instruction in the prompt. The example included in the official template (remove all UI text from the image while keeping the underwater atmosphere):
text
Remove all UI text elements from the image. Keep the feeling that the characters and scene are in water. Also, remove the green UI elements at the bottom.
  1. Chinese instructions are also supported (the model was trained for text editing in both Chinese and English). Example phrasing for changing the background:
text
Change the background to a seaside beach at dusk, keeping the person's pose, clothing, and lighting atmosphere unchanged
  1. Don't make the input image too large: the official tutorial warns that extra-large images at the 2048×2048 level will degrade the output, so it's recommended to compress to about 1MP (megapixels) before uploading. The template includes an ImageScaleToTotalPixels scaling node (lanczos, 1.5MP), which is not wired up in the current version—if needed, connect the LoadImage output to it first, then from it into the subgraph
  2. Click Run or press Ctrl+Enter

You should see: the progress bar runs 20 steps (default standard mode), and SaveImage outputs an image—the UI text in the image is gone, while the underwater atmosphere and the figure are preserved.

  • First successful instruction-based edit: changed what needed changing, kept what needed keeping

Step 4: Understand the nodes and the two parameter presets ​

Why: The skeleton of this Qwen-Image-Edit workflow is shared across three generations; understand it once, and every future upgrade is just swapping files.

Steps: Double-click to enter the subgraph and check each node against this table:

NodeWhat it doesKey parameters in the template
UNETLoaderLoads the edit model itself (20B)qwen_image_edit_fp8_e4m3fn.safetensors
CLIPLoaderLoads the Qwen2.5-VL 7B text encoderqwen_2.5_vl_7b_fp8_scaled.safetensors, type qwen_image
VAELoaderLoads the VAEqwen_image_vae.safetensors
LoadImageUploads the image to editOutside the subgraph, output wired into the subgraph
TextEncodeQwenImageEdit ×2Encodes "instruction + image" together into a conditionPositive side connects to positive; negative side left empty by default
VAEEncodeConverts the input image to latentReplaces the base model's empty-canvas node
ModelSamplingAuraFlowNoise schedule patchshift = 3
CFGNormCFG normalizationstrength 1
KSamplerDenoising samplereuler + simple, denoise 1.0; steps and cfg are linked to the switch
LoraLoaderModelOnlyAttaches the 4-step LoRAQwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors, strength 1
Switch nodes ×3 + boolean switchLinks the two parameter presetsOne switch toggles LoRA, steps, and cfg together
VAEDecode / SaveImageDecodes and savesprefix ComfyUI, files land in ComfyUI/output/

Switch logic (the switch is called enable_turbo_mode on the subgraph surface; the boolean node inside the subgraph is called Enable 4steps LoRA):

enable_turbo_modeLoRAstepscfgnegative prompt
Off (default)Not attached202.5effective
onattach it, strength 141.0no effect

The biggest structural difference from the previous lesson is TextEncodeQwenImageEdit: the base CLIPTextEncode only takes text, while this node feeds "instruction text + input image" together into the encoder — this is the node-level implementation of "instruction editing". Keep the CLIPLoader type as the template default qwen_image, and don't change it to anything else.

You should see: you can state each node's responsibility from left to right; you know that by default (switch off) it actually runs 20 steps, cfg 2.5, with the negative prompt left empty by default.

  • You can explain the difference between TextEncodeQwenImageEdit and the previous lesson's CLIPTextEncode (the former takes an image + text)

Step 5: Speed up on demand — 4-step Lightning LoRA ​

Why: you can't afford repeatedly rolling at the standard 20-step setting; the 4-step LoRA cuts the wait down to a fraction.

Steps:

  1. Confirm that the Qwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors from step 2 is already in models/loras/
  2. Flip the enable_turbo_mode switch on the subgraph surface to on — LoRA, steps, and cfg all link automatically: LoRA attached, 4 steps, cfg 1
  3. Click Run

Note that cfg 1 means sampling does no positive-vs-negative conditioning comparison, so the negative prompt has no effect (same principle as Lightning in the previous lesson); put all your effort into the positive instruction. The accelerated setting trades a little quality for speed — use the 4-step setting when rolling to pick a plan, and before the final render you can turn off the switch, go back to the standard setting, and run it once more.

You should see: the progress bar only runs 4 steps, and image generation is noticeably faster.

  • The accelerated setting runs successfully, with the progress bar only taking 4 steps

Step 6: Upgrade to 2509 — multi-image reference and series consistency ​

Why: things a single image can't express — wanting to reference elements from another image, wanting a consistent style across a series — 2509 was upgraded for exactly these scenarios.

Steps:

  1. Search the template library for Qwen Image Edit 2509, and pick "Qwen Image Edit 2509" (released in September 2025, tagged with ControlNet and image editing); or download image_qwen_image_edit_2509.json and open it manually
  2. Swap the model: place qwen_image_edit_2509_fp8_e4m3fn.safetensors (19.03 GB) in models/diffusion_models/; the text encoder and VAE are shared with the initial version, no need to re-download
  3. If you want the 4-step accelerated setting, also download the 2509-dedicated LoRA: Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors (810.2 MB) in models/loras/ — not interchangeable with the initial version's 4-step LoRA, each uses its own
  4. The subgraph (named Image Edit (Qwen 2509)) surface has two extra optional inputs image2 and image3: connect the reference image via another LoadImage, and refer to it in the instruction as image 1 or image 2
  5. The official example instruction for single-image editing (replace the cat with a spotted dog, keep the environment consistent):
text
Replace the cat with a dalmatian, keeping the environment and scene consistent
  1. Note that the 2509 switch is on by default: running it directly gives the 4-step / cfg 1 accelerated setting (provided the LoRA from sub-step 3 is in place); to run the standard setting, turn off enable_turbo_mode (20 steps / cfg 4)
  2. Click Run

The upgrade points of 2509 (per the official notes): multi-image input, higher consistency across series edits, and ControlNet support — the official template demonstrates multi-image input; the ControlNet nodes aren't included in the template and need to be set up yourself (see ControlNet Getting Started).

You should see: SaveImageAdvanced outputs the image with the filename prefix Qwen_Image_2509; the spotted-dog image keeps the same environment and scene as the original.

  • 2509 runs successfully; try connecting a second reference image into image2

Step 7: Upgrade to 2511 — material replacement and character consistency ​

Why: 2511 is an enhanced version of 2509, with consistency as the official highlight — faces don't distort during editing, multiple character images can be merged into a group photo, and it also supports material replacement for industrial-design scenarios.

Steps:

  1. First update ComfyUI (the template note explicitly says to update first; the template requires a minimum of 0.4.0; Desktop / Cloud will have to wait for a stable release to catch up)
  2. Search the template library for Qwen-Image-Edit-2511, and pick "Qwen Image Edit 2511 - Material Replacement" (released in December 2025); or download image_qwen_image_edit_2511.json and open it manually
  3. Model: the workflow loads qwen_image_edit_2511_fp8mixed.safetensors by default, placed in models/diffusion_models/. The official tutorial page lists the bf16 full version qwen_image_edit_2511_bf16.safetensors (38.05 GB) — two precision splits of the same model; follow the workflow template and use fp8mixed, which saves VRAM and disk space compared to bf16
  4. Optional 4-step LoRA: Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors (810.2 MB) — another dedicated build, don't mix it with the initial version's or 2509's. The text encoder and VAE continue to reuse the ones from the previous two generations (the template note points the encoder link to the same file under the Comfy-Org/HunyuanVideo_1.5_repackaged repository; if you've already downloaded it, no action needed)
  5. Dual-image input: on LoadImage node 41, upload the object image (official example leather_sofa.png, a leather sofa); on node 83, upload the material reference image (texture_fur.png, a fur texture)
  6. Refer to both images in the instruction; official example:
text
Change the furniture leather difference in image 1 to the fur material in image 2.
  1. The 2511 toggle is off by default: by default it runs the quality tier of 40 steps / cfg 4, with negative prompts effective (the subgraph surface has a negative_prompt input, left empty by default); if it feels slow, turn on the toggle to switch to 4 steps / cfg 1
  2. Click Run

Upgrade highlights of 2511 (official notes): mitigates image drift, improves character consistency, better multi-person group-photo blending, built-in popular community LoRAs, enhanced industrial design and material replacement, geometric reasoning (can directly generate auxiliary construction lines). Official pages: GitHub QwenLM/Qwen-Image · Qwen/Qwen-Image-Edit-2511 (Hugging Face) · Qwen/Qwen-Image-Edit-2511 (ModelScope) · official blog

You should see: SaveImage produces the image with filename prefix Qwen_Edit_2511 — the leather sofa becomes a fur sofa, while the sofa's shape and the scene are preserved.

  • 2511 material replacement working: two input images + one instruction

Checkpoint ✅ ​

  • Qwen-Image-Edit workflow running: template loaded → models in place → one-sentence image editing succeeded
  • Edit text while preserving the font, and replace the background while preserving the person — tried each at least once
  • Tried both tiers of the acceleration toggle, and know that negative prompts are ineffective at cfg 1
  • Can clearly explain the three-generation version selection: initial version (single-image instructions), 2509 (multi-image reference), 2511 (material replacement, character consistency)
  • 2511 official material replacement example successfully reproduced: leather sofa swapped to fur

Pitfall reminders ​

❌ Downloaded the old LoRA filename from the docs ​

Cause: the official tutorial page lists Qwen-Image-Lightning-4steps-V1.0.safetensors (the base-model general build), while the workflow template actually references Qwen-Image-Edit-Lightning-4steps-V1.0-bf16.safetensors (the edit-specific build). Correct approach: go by the workflow template; moreover, the 4-step LoRAs of the three edit-model generations are each dedicated builds (initial version / -2509- / -2511-) and not interchangeable — when switching versions, the LoRA must be switched too.

❌ Writing lots of negative prompts while in the acceleration tier ​

Cause: in the acceleration tier, cfg is 1, so sampling does not compare positive and negative conditions and negative prompts have no effect. Correct approach: in the acceleration tier, put all your effort into the positive instruction; if you truly need negative guidance, turn off the toggle and return to the standard tier — the initial version's 20 steps at cfg 2.5 and 2511's default 40 steps at cfg 4 both have effective negative prompts.

❌ Uploading a 2048×2048 large image and running it directly ​

Cause: the official tutorial states explicitly that overly large input images degrade output quality. Correct approach: compress the input image to roughly the 1-MP (megapixel) level before uploading; or wire up the ready-made ImageScaleToTotalPixels node in the template (LoadImage → scale node → subgraph) and let it scale automatically.

❌ 2511 fails to load, or fp8mixed can't be found in the model list ​

Cause: 2511 is fairly new, and the official template requires ComfyUI 0.4.0 as a minimum; Desktop / Cloud must wait for the stable version to catch up. Correct approach: first update ComfyUI to the latest version; if it still doesn't work, troubleshoot via model loading failures.

Advanced tips (optional) ​

🔧 2511 Int8 quantized edition: the template library also has "Qwen Image Edit 2511 Int8: Image Editing" (image_qwen_image_edit_2511_int8, released in July 2026) — the quantized model runs inference faster, and the official description says it suits character-consistent portrait editing, multi-person group-photo blending, and industrial design modifications. Try it if VRAM is tight or you're chasing speed.

🔧 Generate first, then edit: the base line and the edit line are a natural pair — use the previous lesson's Qwen-Image to generate a poster with text, and this lesson's Edit to fix typos and swap backgrounds; use 2511's multi-image input to keep characters consistent across an image series. The two workflows share the encoder and VAE, so switching costs nothing.

🔧 Just want to remove the background? If your goal is only to cut out the subject onto a solid-color or transparent background, BiRefNet or the Qwen-2.1 transparent-background option from product cutout and background replacement is more direct; only use this page's instruction-based editing when you want to "swap in a finished background with content".

🔧 The edit line can also mount style LoRAs: the LoraLoaderModelOnly in the workflow is a ready-made mount point (the 4-step Lightning is mounted via it); for the systematic approach to LoRAs, see LoRA usage.

Lesson summary ​

✅ Qwen-Image-Edit workflow up and running: template loaded → the four components in place (encoder and VAE reused from the base line) → one-sentence image editing; this skeleton works across all three generations — upgrading only means swapping the diffusion model and its matching LoRA.

✅ Instruction-based editing mastered: the prompt states "what to change" rather than "what to draw"; TextEncodeQwenImageEdit encodes the instruction together with the image, which is why editing text preserves the font and swapping backgrounds preserves the person.

✅ Acceleration tier used correctly: the single enable_turbo_mode toggle drives the LoRA, step count, and cfg together; at cfg 1, negative prompts are ineffective. Note that the default toggle position differs across the three generations — off for the initial version, on for 2509, off for 2511.

✅ Three-generation selection memorized: use the initial version for single-image instructions, 2509 for multi-image reference and series consistency, 2511 for material replacement and character consistency; each generation's 4-step LoRA is used on its own, never mixed.

Key configuration recap:

ConfigurationRecommended valueNotes
Edit modelInitial version qwen_image_edit_fp8_e4m3fn.safetensors; 2509 / 2511 swap the corresponding file (2511 template defaults to fp8mixed)place in models/diffusion_models/, fp8 is the template default
Text encoder / VAEqwen_2.5_vl_7b_fp8_scaled.safetensors / qwen_image_vae.safetensorsshared with the Qwen-Image base; CLIPLoader type qwen_image
4-step LoRAdedicated to each generation: Qwen-Image-Edit-Lightning-4steps-V1.0-bf16 (initial version) / -2509- / -2511-place in models/loras/, strength 1, do not mix
KSamplereuler + simple, denoise 1.0initial version defaults to 20 steps cfg 2.5; 2509 defaults to 4 steps cfg 1; 2511 defaults to 40 steps cfg 4
Noise scheduleModelSamplingAuraFlow shift 3 (initial version / 2509), 3.1 (2511)follow the template
Input imagearound 1MP levelcompress oversized images first to prevent quality loss in output

Next lesson preview ​

Up to 2511, the edit line remains "an independent model dedicated to image editing"; the next generation merges generation and editing into a single model. Next lesson: Qwen-Image-2.1.

You will learn:

  • Qwen-Image-2.1 uses a single model for both text-to-image and image editing, no longer requiring two separate lines
  • Native 2K resolution and true transparent-background output
  • Advanced usage with up to 16 reference images
  • When to keep using the edit line and when to switch to 2.1
gaodong.aiAboutPrivacyTermsContact

Created and maintained by Haorui Li, co-author of the KiT candlestick foundation model.

Independent tutorials, not affiliated with any product mentioned. Product names and trademarks belong to their owners. Check official pages for prices and policies.