Read our How to Run Qwen-Image-2.1 Guide! 💜
42
14 commits
2 linked in READMEs
updated Oct 5, 2026
This is an FP8 / INT8 quantized version of Qwen-Image-2.1, plus a pre-cast FP8 copy of its Qwen3-VL text encoder.
| file | size | replaces |
|---|---|---|
Qwen-Image-2.1-INT8.safetensors | 7.26 GB | the 14.23 GB bf16 transformer |
Qwen-Image-2.1-FP8.safetensors | 7.12 GB | the 14.23 GB bf16 transformer |
Qwen-Image-2.1-text_encoder-FP8.safetensors | 9.39 GB | the 17.5 GB bf16 text_encoder |
vae/qwen_image_2.1_vae_bf16.safetensors | 0.63 GB | the fp32 vae, for unsloth/Qwen-Image-2.1-GGUF |
Everything here is safetensors rather than a pickle, so loading runs no arbitrary code. Needs a diffusers main build: Qwen-Image-2.1 support postdates the 0.40 release.
| INT8 | INT8 |
![]() | ![]() |
| FP8 | FP8 |
![]() | ![]() |
🤖 ModelScope | 🤗 HuggingFace | 📑 Blog | 🖥️ Demo | 🫨 Discord | 💬 WeChat
We are excited to open-source Qwen-Image-2.1, a unified text-to-image generation and image editing model in the Qwen family. With just 7B parameters in its visual generation component (32 Single-Stream DiT layers), Qwen-Image-2.1 balances generation quality, inference efficiency, and versatility.
Four key improvements define this release:
For more details, see the GitHub repo and Blog.
pip install torch>=2.4.0
pip install transformers>=5.17
pip install git+https://github.com/huggingface/diffusers
pip install accelerate pillow
import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
).to("cuda")
image = pipe(
prompt="A neon shop sign that reads \"QWEN IMAGE 2.1\", rainy night, reflections on wet pavement",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("t2i_example.png")
import torch
from PIL import Image
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
).to("cuda")
input_image = Image.open("input.png")
image = pipe(
prompt="Change the background to a sunset beach",
image=input_image,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("edit_example.png")
Use the recommended prompt format for transparent images:
image = pipe(
prompt="This is an RGBA image with transparency. A cute cartoon dragon sticker. The image has alpha channel and the background is transparent.",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("transparent_example.png")
aspect_ratios = {
"1:1": (2048, 2048),
"4:3": (2400, 1792),
"3:4": (1792, 2400),
"3:2": (2528, 1696),
"2:3": (1696, 2528),
"16:9": (2752, 1536),
"9:16": (1536, 2752),
}
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
Native transparent image generation
Group photograph generated from six portrait references
Text rendering
This model is licensed under the Qwen Research License Agreement.
Read our How to Run Qwen-Image-2.1 Guide! 💜
42
14 commits
2 linked in READMEs
updated Oct 5, 2026
This is an FP8 / INT8 quantized version of Qwen-Image-2.1, plus a pre-cast FP8 copy of its Qwen3-VL text encoder.
| file | size | replaces |
|---|---|---|
Qwen-Image-2.1-INT8.safetensors | 7.26 GB | the 14.23 GB bf16 transformer |
Qwen-Image-2.1-FP8.safetensors | 7.12 GB | the 14.23 GB bf16 transformer |
Qwen-Image-2.1-text_encoder-FP8.safetensors | 9.39 GB | the 17.5 GB bf16 text_encoder |
vae/qwen_image_2.1_vae_bf16.safetensors | 0.63 GB | the fp32 vae, for unsloth/Qwen-Image-2.1-GGUF |
Everything here is safetensors rather than a pickle, so loading runs no arbitrary code. Needs a diffusers main build: Qwen-Image-2.1 support postdates the 0.40 release.
| INT8 | INT8 |
![]() | ![]() |
| FP8 | FP8 |
![]() | ![]() |
🤖 ModelScope | 🤗 HuggingFace | 📑 Blog | 🖥️ Demo | 🫨 Discord | 💬 WeChat
We are excited to open-source Qwen-Image-2.1, a unified text-to-image generation and image editing model in the Qwen family. With just 7B parameters in its visual generation component (32 Single-Stream DiT layers), Qwen-Image-2.1 balances generation quality, inference efficiency, and versatility.
Four key improvements define this release:
For more details, see the GitHub repo and Blog.
pip install torch>=2.4.0
pip install transformers>=5.17
pip install git+https://github.com/huggingface/diffusers
pip install accelerate pillow
import torch
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
).to("cuda")
image = pipe(
prompt="A neon shop sign that reads \"QWEN IMAGE 2.1\", rainy night, reflections on wet pavement",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("t2i_example.png")
import torch
from PIL import Image
from diffusers import QwenImage21Pipeline
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
).to("cuda")
input_image = Image.open("input.png")
image = pipe(
prompt="Change the background to a sunset beach",
image=input_image,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("edit_example.png")
Use the recommended prompt format for transparent images:
image = pipe(
prompt="This is an RGBA image with transparency. A cute cartoon dragon sticker. The image has alpha channel and the background is transparent.",
width=2048, height=2048,
num_inference_steps=40,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("transparent_example.png")
aspect_ratios = {
"1:1": (2048, 2048),
"4:3": (2400, 1792),
"3:4": (1792, 2400),
"3:2": (2528, 1696),
"2:3": (1696, 2528),
"16:9": (2752, 1536),
"9:16": (1536, 2752),
}
pipe = QwenImage21Pipeline.from_pretrained(
"Qwen/Qwen-Image-2.1", torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
Native transparent image generation
Group photograph generated from six portrait references
Text rendering
This model is licensed under the Qwen Research License Agreement.