This workflow delivers fast, controllable image edits powered by the Qwen family. With a single prompt, you can inpaint, replace backgrounds, insert or remove objects, and apply cinematic relighting while preserving local details. Qwen Image Edit is ideal for artists and creators who want precise transformations without wrestling with complex node graphs.
The graph is organized into simple steps: load models, upload an image, write prompts, then sample and save. It ships with an optional Lightning LoRA for ultra-fast 4-step edits, so you can iterate quickly and lock in the look you want.
qwen_image_edit_fp8_e4m3fn.safetensors
in .qwen_2.5_vl_7b_fp8_scaled.safetensors
in .qwen_image_vae.safetensors
in .Qwen-Image-Lightning-4steps-V1.0.safetensors
on .The graph loads the edit UNet with UNETLoader
(#37), the text encoder with CLIPLoader
(#38), and the latent codec with VAELoader
(#39). If you want faster iteration, toggle the optional LoraLoaderModelOnly
(#89) to apply the Lightning LoRA on top of the base model. ModelSamplingAuraFlow
(#66) and CFGNorm
(#75) prepare the sampler so the Qwen Image Edit model follows prompts cleanly without overbaking details.
Use LoadImage
(#78) to select the photo you want to modify. The image passes through ImageScaleToTotalPixels
(#93) to keep resolution in a quality-friendly range, which helps Qwen Image Edit avoid artifacts from very large inputs. VAEEncode
(#88) converts pixels to latents for efficient editing while preserving structure.
Write your instruction in TextEncodeQwenImageEdit
(#76) as a positive directive. Examples include “replace the background with a sunset cityscape,” “remove the person in the back,” or “soft golden key light from the left.” Use the second TextEncodeQwenImageEdit
(#77) as a negative guide when you need to avoid changes, for example “do not alter the subject’s face” or “keep the color of the jacket.” Both encoders see your uploaded image and the VAE so the conditioning stays aligned with the content.
KSampler
(#3) executes the edit using the patched model and your conditioning. If the Lightning LoRA is enabled, you can converge with very few steps; otherwise, use more steps for maximal fidelity. The edited latent is decoded by VAEDecode
(#8) and written to disk via SaveImage
(#60).
TextEncodeQwenImageEdit
(#76)Encodes the main instruction that drives the edit. Favor direct verbs like “replace,” “insert,” “remove,” “recolor,” and “relight.” If the change should be local, name the region or object explicitly. Keep prompts concise; long lists of style tags are rarely needed.
TextEncodeQwenImageEdit
(#77)Provides negative or protective guidance. Use it to tell the model what to avoid or to preserve key attributes. Good patterns: “keep skin tone,” “do not change composition,” “ignore background text.”
LoraLoaderModelOnly
(#89)Applies the Qwen-Image-Lightning LoRA for rapid iteration. Turn it on when you need near-instant results. Reduce sampler steps substantially when this LoRA is active to maintain crisp edits.
ImageScaleToTotalPixels
(#93)Downscales oversized inputs to a target megapixel budget to stabilize quality. Use it when source images are very large or contain heavy compression; it often improves edge smoothness and reduces halos.
CFGNorm
(#75)Normalizes classifier-free guidance behavior so the model follows prompts without pushing artifacts. If you see oversaturation or “over-editing,” lower the strength slightly; if edits feel timid, raise it a bit.
KSampler
(#3)Runs the diffusion loop. Start with modest steps for fp8 and increase only if the edit is incomplete. Keep guidance moderate; very high values can wash out preserved regions. When the Lightning LoRA is on, use very few steps to capture its speed benefit.
This workflow implements and builds upon the following works and resources. We gratefully acknowledge QwenLM for Qwen-Image-Edit, QwenLM for Qwen-Image, and ComfyOrg for ComfyUI Native Workflow Example for their contributions and maintenance. For authoritative details, please refer to the original documentation and repositories linked below.
Note: Use of the referenced models, datasets, and code is subject to the respective licenses and terms provided by their authors and maintainers.
RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.