Instructions to use pushkarmoi/Kwen-Image-2.1-Turbo-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use pushkarmoi/Kwen-Image-2.1-Turbo-INT8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("pushkarmoi/Kwen-Image-2.1-Turbo-INT8", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Kwen-Image-2.1-Turbo-INT8
INT8 (W8A16) quantization of Qwen-Image 2.1 Turbo. Unofficial; not affiliated with Qwen or Alibaba. Built with Qwen.
Contents
Qwen-Image 2.1 Turbo (8 steps) for text-to-image, with the transformer weights in INT8 (W8A16). Every component keeps its original (diffusers / transformers) key names.
| Path | Component | Format | Original |
|---|---|---|---|
transformer/kwen-image-2.1-turbo-int8.safetensors |
transformer | block linears <name>.weight int8 (out, in) + <name>.weight_scale fp16 (out,); every other tensor fp16 |
Qwen/Qwen-Image-2.1-Turbo/transformer/diffusion_pytorch_model-00001-of-00002.safetensors, Qwen/Qwen-Image-2.1-Turbo/transformer/diffusion_pytorch_model-00002-of-00002.safetensors |
vae/diffusion_pytorch_model.safetensors |
VAE | diffusers keys, fp16, time_conv removed |
Qwen/Qwen-Image-2.1/vae/diffusion_pytorch_model.safetensors |
text_encoder/ |
text encoder | Qwen3-VL-8B-Instruct-FP8 as published (fp8 e4m3, 128x128 block scales), without visual.* and lm_head; Qwen-Image's tokenizer and chat template |
Qwen/Qwen3-VL-8B-Instruct-FP8 |
Processing
- Transformer: the bf16 shards merged into one file, keys unchanged. The 224 linears of the 32 blocks (
attn.to_q/to_k/to_v/to_out.0,img_mlp.proj/gate_layer/out): symmetric int8 in [-127, 127], one fp16 scale per output channel (scale = absmax / 127, rounded to fp16 before the weights are quantized), round to nearest, no calibration (torchaochoose_qparams_affine/quantize_affine). Dequantize asW = weight * weight_scale[:, None]; activations stay fp16.img_in,txt_in(with its norm), the timestep embedder, the sharedmodulation,norm_out,proj_outand the QK-norm scales are cast to fp16 (exact but for values below fp16's subnormal step). In the file eachweight_scaledirectly precedes its weight. - VAE: the F32 VAE of
Qwen/Qwen-Image-2.1(the Turbo repo's is the same, rounded to bf16), cast to fp16; the temporaltime_convlayers, which never run on a single image, are removed. - Text encoder: Qwen-Image's text encoder is Qwen3-VL-8B-Instruct; this is the official FP8 release of it, its tensors unchanged. The vision tower and
lm_headare removed: Qwen-Image reads the last decoder layer's hidden states before the final norm.config.jsonis as published (it still describes the vision tower).
Licenses
Qwen-Image 2.1 Turbo (transformer, VAE, tokenizer): Qwen Research License, LICENSE; non-commercial (research and evaluation) use only. Attribution notice and the list of changes in NOTICE. Qwen3-VL-8B-Instruct-FP8 (text encoder): Apache-2.0, text_encoder/LICENSE.
Sources
Qwen/Qwen-Image-2.1-Turboatfc13ba1986fcb905854dc8de2f52eee395f49b5b(Qwen Research License)transformer/config.jsonprocessor/tokenizer.jsonprocessor/tokenizer_config.jsonprocessor/chat_template.jinjaprocessor/processor_config.jsonLICENSE
Qwen/Qwen-Image-2.1-Turboatfc13ba1986fcb905854dc8de2f52eee395f49b5b(Qwen Research License)transformer/diffusion_pytorch_model-00001-of-00002.safetensorstransformer/diffusion_pytorch_model-00002-of-00002.safetensors
Qwen/Qwen-Image-2.1atd26bb61231c349cf6b7896fa83353113880e1ba3(Qwen Research License)vae/diffusion_pytorch_model.safetensorsvae/config.json
Qwen/Qwen3-VL-8B-Instruct-FP8at9cdc6310a8cb770ce18efaf4e9935334512aee45(Apache-2.0)config.jsongeneration_config.jsonmodel.safetensors.index.jsonmodel-00001-of-00002.safetensorsmodel-00002-of-00002.safetensors
- Downloads last month
- -