Qwen Image Edit 2509
Overview
Highlights
- High-fidelity image-to-image transformations with structural consistency
- Apache-2.0 license allows flexible commercial integration
- Optimized for precise object replacement and style editing
- Reduced visual artifacts compared to previous iterations
Usage
# Install Hugging Face transformers
pip install transformers torch
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("Qwen/Qwen-Image-Edit-2509")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen-Image-Edit-2509")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
pip install -U huggingface_hub
CLI Download
Download the full repository
huggingface-cli download Qwen/Qwen-Image-Edit-2509
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download Qwen/Qwen-Image-Edit-2509 config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Qwen/Qwen-Image-Edit-2509')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://huggingface.co/Qwen/Qwen-Image-Edit-2509
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Qwen/Qwen-Image-Edit-2509
Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.
PyTorch / Transformers Usage
Install Transformers
pip install -U transformers torch
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('Qwen/Qwen-Image-Edit-2509')
tokenizer = AutoTokenizer.from_pretrained('Qwen/Qwen-Image-Edit-2509')
Model Download
We recommend downloading the model via the ModelScope CLI or SDK.
Guidance:Before downloading, install ModelScope with:
pip install modelscope
CLI Download
Download the full repository
modelscope download --model Qwen/Qwen-Image-Edit-2509
Download a single file to a local folder (e.g. README.md into ./dir)
modelscope download --model Qwen/Qwen-Image-Edit-2509 README.md --local_dir ./dir
See the docs for more CLI options
SDK Download
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('Qwen/Qwen-Image-Edit-2509')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://www.modelscope.cn/Qwen/Qwen-Image-Edit-2509.git
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/Qwen/Qwen-Image-Edit-2509.git
ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。
Notebook Quickstart
Install the ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html
Load the model and run inference
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
p = pipeline('text-generation', 'Qwen/Qwen-Image-Edit-2509')
Full Documentation
---
license: apache-2.0
language:
- en
- zh
library_name: diffusers
pipeline_tag: image-to-image
---
<p align="center">
<img src="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/qwen_image_edit_logo.png" width="400"/>
<p>
<p align="center">
💜 <a href="https://chat.qwen.ai/"><b>Qwen Chat</b></a>   |   🤗 <a href="https://huggingface.co/Qwen/Qwen-Image-Edit-2509">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/models/Qwen/Qwen-Image-Edit-2509">ModelScope</a>   |    📑 <a href="https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/Qwen_Image.pdf">Tech Report</a>    |    📑 <a href="https://qwenlm.github.io/blog/qwen-image-edit/">Blog</a>   
<br>
🖥️ <a href="https://huggingface.co/spaces/Qwen/Qwen-Image-Edit">Demo</a>   |   💬 <a href="https://github.com/QwenLM/Qwen-Image/blob/main/assets/wechat.png">WeChat (微信)</a>   |   🫨 <a href="https://discord.gg/CV4E9rpNSD">Discord</a>  |    <a href="https://github.com/QwenLM/Qwen-Image">Github</a>  
</p>
<p align="center">
<img src="https://qianwen-res.oss-accelerate-overseas.aliyuncs.com/Qwen-Image/edit2509/edit2509_top.jpg" width="1600"/>
<p>
Introduction
This September, we are pleased to introduce Qwen-Image-Edit-2509, the monthly iteration of Qwen-Image-Edit. To experience the latest model, please visit Qwen Chat and select the "Image Editing" feature. Compared with Qwen-Image-Edit released in August, the main improvements of Qwen-Image-Edit-2509 include:- Multi-image Editing Support: For multi-image inputs, Qwen-Image-Edit-2509 builds upon the Qwen-Image-Edit architecture and is further trained via image concatenation to enable multi-image editing. It supports various combinations such as "person + person," "person + product," and "person + scene." Optimal performance is currently achieved with 1 to 3 input images.
- Enhanced Single-image Consistency: For single-image inputs, Qwen-Image-Edit-2509 significantly improves editing consistency, specifically in the following areas:
- Native Support for ControlNet: Including depth maps, edge maps, keypoint maps, and more.
Quick Start
Install the latest version of diffusers
pip install git+https://github.com/huggingface/diffusersThe following contains a code snippet illustrating how to use Qwen-Image-Edit-2509:
import os
import torch
from PIL import Image
from diffusers import QwenImageEditPlusPipeline
pipeline = QwenImageEditPlusPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2509", torch_dtype=torch.bfloat16)
print("pipeline loaded")
pipeline.to('cuda')
pipeline.set_progress_bar_config(disable=None)
image1 = Image.open("input1.png")
image2 = Image.open("input2.png")
prompt = "The magician bear is on the left, the alchemist bear is on the right, facing each other in the central park square."
inputs = {
"image": [image1, image2],
"prompt": prompt,
"generator": torch.manual_seed(0),
"true_cfg_scale": 4.0,
"negative_prompt": " ",
"num_inference_steps": 40,
"guidance_scale": 1.0,
"num_images_per_prompt": 1,
}
with torch.inference_mode():
output = pipeline(inputs)
output_image = output.images[0]
output_image.save("output_image_edit_plus.png")
print("image saved at", os.path.abspath("output_image_edit_plus.png"))
Showcase
The primary update in Qwen-Image-Edit-2509 is support for multi-image inputs.
Let’s first look at a "person + person" example:
!Person + Person Example
Here is a "person + scene" example:
!Person + Scene Example
Below is a "person + object" example:
!Person + Object Example
In fact, multi-image input also supports commonly used ControlNet keypoint maps—for example, changing a person’s pose:
!ControlNet Keypoint Example
Similarly, the following examples demonstrate results using three input images:
!Three Images Example 1
!Three Images Example 2
!Three Images Example 3
---
Another major update in Qwen-Image-Edit-2509 is enhanced consistency.**
First, regarding person consistency, Qwen-Image-Edit-2509 shows significant improvement over Qwen-Image-Edit. Below are examples generating various portrait styles:
!Portrait Styles Example
For instance, changing a person’s pose while maintaining excellent identity consistency:
!Pose Change with Identity Consistency
Leveraging this improvement along with Qwen-Image’s unique text rendering capability, we find that Qwen-Image-Edit-2509 excels at creating meme images:
!Meme Image Example
Of course, even with longer text, Qwen-Image-Edit-2509 can still render it while preserving the person’s identity:
!Long Text with Identity Preservation
Person consistency is also evident in old photo restoration. Below are two examples:
!Old Photo Restoration 1
!Old Photo Restoration 2
Naturally, besides real people, generating cartoon characters and cultural creations is also possible:
!Cartoon & Cultural Creation
Second, Qwen-Image-Edit-2509 specifically enhances product consistency. We find that the model can naturally generate product posters from plain-background product images:
!Product Poster Example
Or even simple logos:
!Logo Generation Example
Third, Qwen-Image-Edit-2509 specifically enhances text consistency and supports editing font type, font color, and font material:
!Text Font Type
!Text Font Color
![Text Font Material](https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-Image/edit2509/%