Qwen-Image 2.1 Fast: INT8 text encoder (text only)
The text encoder used by qwen-image-2.1-fast, an engine that renders Qwen-Image 2.1 at the full 2048Γ2048 (4 MP) in ~54 s on a 12 GB RTX 3080 Ti, ~3Γ faster than ComfyUI with the BF16 model (160 s), at 32.9 dB PSNR vs the BF16 render.
qwen3vl_8b_textonly_int8_convrot.safetensors (7.6 GB) is Qwen3-VL-8B-Instruct's language model quantized to INT8
(ConvRot, comfy_kitchen format) from the BF16 text encoder, with the vision tower and lm_head removed (17.5 GB β
7.6 GB). The engine runs it weight-only: the INT8 weights are dequantized to BF16 on the GPU and the math stays in
BF16, streamed from RAM two layers at a time next to the resident DiT (0.3 s per new prompt).
| text encoder | relative L2 of the conditioning vs BF16 | image PSNR vs BF16 |
|---|---|---|
| this file, weight-only (engine) | 0.051 | 33.4 dB (no step cache) |
| ComfyUI INT8 text encoder | 0.064 | β |
| same weights, INT8 activations too (W8A8) | 0.080 | 30.3 dB |
Use
Put it in models\text_encoders\ next to the other files and run the engine (setup in the
GitHub README):
| file | from |
|---|---|
text_encoders\qwen3vl_8b_textonly_int8_convrot.safetensors |
this repo |
diffusion_models\qwen_image_2.1_int8_convrot.safetensors |
Comfy-Org/Qwen-Image-2.1 |
vae\qwen_image_2.1_vae_bf16.safetensors |
Comfy-Org/Qwen-Image-2.1 |
text_encoders\qwen3vl_8b_int8_convrot.safetensors (editing only, for its vision tower) |
Comfy-Org/Qwen-Image-2.1 |
start-webui.bat
python engine\cli.py "a red fox in fresh snow" -W 2048 -H 2048 -o fox.png
Built with tools\quantize.py in the GitHub repo.
How the full speedup was made
- DiT in VRAM as INT8 W8A8 (ConvRot): 7.3 GB instead of 14.2 GB, INT8 tensor-core GEMMs, β2Γ.
- SageAttention (INT8 QK, FP16 PV with FP32 accumulation) for the 16k image tokens.
- Text K/V cached per prompt: the text half of each joint-attention block runs once, not 25 times.
- This text encoder, streamed from pinned RAM, weight-only INT8 (W8A8 cost 3 dB).
- No VRAM spill: buffers freed between phases, VAE decoded in 256-row tiles (bit-identical).
- Step cache: 7 of 25 DiT evaluations reuse the previous velocity (β24% time, β0.5 dB).
- Edits: reference-image K/V cached in RAM, exact-size page-locked buffers (4 MP edit in 59 s, 44.8 dB vs BF16).
License
Apache-2.0, like Qwen3-VL-8B-Instruct, which it is built from. Qwen-Image 2.1 itself (the DiT and VAE you download separately) is under the Qwen research license.
Model tree for nahcmon/Qwen-Image-2.1-Fast
Base model
Qwen/Qwen3-VL-8B-Instruct