AutoencoderKLQwenImage
Qwen-Image's image tokenizer: a Wan-2.1 video VAE whose image decoder was fine-tuned for sharp text.
Diffusion and generative · 840 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 126.9M
- Operations
- 840
- Framework
- PyTorch
- Recurrent
- No
- Published
- 2025
- Cited by
- 1,771 (as of 17 November 2026)
- Authors
- Chenfei Wu, Jiahao Li, Jingren Zhou and others
- Source
- diffusers 0.38.0
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m154
- Graph hash
- 146afab319b68831c4fec20c3544c0ee0392387033830ce1b725c576bf054b7f
- Skeleton hash
- c1570231c7d395aac0cd27331e87851232f19d4341f9675aca81d5e9f7f3b887
- Architecture hash
- c29248917d4d0786f3fdba7e4226f8271bf211e4ff3a2010dd798e3fb852cb89
- Diagram SHA-256
- 9425bee159fe2daf455f00287d024d4165e58b1a375430d851df55cf0a16c0e9
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
diffusers.models.autoencoders.autoencoder_kl_qwenimage.AutoencoderKLQwenImage()
What it is
This graph is the Qwen-Image VAE, the image tokenizer that sits in front of the Qwen-Image generation model: it compresses an input image into a compact latent and decodes it back again. Qwen-Image itself is an image generation foundation model in the Qwen series, built for complex text rendering and precise image editing. What makes this autoencoder unusual is that it is a video VAE rather than an image-only one.
The report starts from Wan-2.1-VAE, a joint image-video autoencoder, and notes that such shared models usually pay for their generality with worse image reconstruction. The fix is a single-encoder, dual-decoder design: one shared encoder for images and videos, with a separate decoder specialised for each modality. Concretely, the team adopted the Wan-2.1-VAE architecture, froze its encoder and fine-tuned only the image decoder. The training set was an in-house corpus of text-rich images, chosen to sharpen small text and fine detail. It mixes real-world documents such as PDFs, PowerPoint slides and posters with synthetic paragraphs, covering alphabetic languages like English and logographic ones like Chinese.
Two observations shaped the recipe. Balancing reconstruction loss against perceptual loss reduced the grid artifacts that show up in repetitive textures like bushes. Once reconstructions got good enough, the adversarial loss stopped helping because the discriminator could no longer provide useful guidance. So the final fine-tuning used only reconstruction and perceptual losses, with their ratio adjusted dynamically during training. Fine-tuning only the decoder turned out to be enough to sharpen details and improve the rendering of small text.
In the report's comparison, all VAEs operate at an 8x8 compression rate with a latent channel dimension of 16. Alongside Wan2.1-VAE and Hunyuan-VAE, Qwen-Image-VAE is classed as a joint image and video tokenizer, while FLUX-VAE, Cosmos-CI-VAE and SD-3.5-VAE are image-only tokenizers. Because the joint model is built from 3D convolutions, the report converts them to equivalent 2D convolutions when counting image parameters. The report says Qwen-Image-VAE achieves state-of-the-art reconstruction performance across all evaluated metrics. When processing images it activates only 19M parameters in the encoder and 25M in the decoder.
Key idea. The Qwen-Image VAE takes the Wan-2.1-VAE architecture, freezes its encoder and exclusively fine-tunes the image decoder. That decoder-only fine-tuning on text-rich images enhances details and improves the rendering of small text, building the foundation for Qwen-Image's text rendering abilities.
- qwen-image
- qwen-image vae
- qwen image vae
- autoencoderklqwenimage
- qwen-image-vae
- wan-2.1-vae
- wan vae
- video vae
- image tokenizer
- latent diffusion vae
- qwen
- image reconstruction
- text rendering
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{wu2025qwenimagetechnicalreport,
title={Qwen-Image Technical Report},
author={Chenfei Wu and Jiahao Li and Jingren Zhou and Junyang Lin and Kaiyuan Gao and Kun Yan and Sheng-ming Yin and Shuai Bai and Xiao Xu and Yilei Chen and Yuxiang Chen and Zecheng Tang and Zekai Zhang and Zhengyi Wang and An Yang and Bowen Yu and Chen Cheng and Dayiheng Liu and Deqing Li and Hang Zhang and Hao Meng and Hu Wei and Jingyuan Ni and Kai Chen and Kuan Cao and Liang Peng and Lin Qu and Minggang Wu and Peng Wang and Shuting Yu and Tingkun Wen and Wensen Feng and Xiaoxiao Xu and Yi Wang and Yichang Zhang and Yongqiang Zhu and Yujia Wu and Yuxuan Cai and Zenan Liu},
year={2025},
eprint={2508.02324},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2508.02324},
}