Only the attention projections (to_qkv, to_out) are FP8; FFN stays in BF16.
★ The overall best practical choice in our benchmark is online_fp8 (5.937 s/image, -24.2% vs BF16, peak GPU 13.34 GB — 38.4% less than BF16). It runs straight from the upstream Tongyi-MAI/Z-Image-Turbo checkpoint with --quantization-config '{"method":"fp8"}' — no separate download. The pre-quantized variants in this family are useful when you want deterministic static scales (calibrated offline, frozen on disk) or when online quantization is not desired.
This variant (attn-only) → mean latency 7.055 s/image (-9.9% vs BF16), peak GPU 19.74 GB (8.8% less than BF16's 21.66 GB), image quality PSNR 22.92 dB / SSIM 0.8413 vs the BF16 reference at identical (prompt, seed).
This is one of 7 FP8 quantization policies of Tongyi-MAI/Z-Image-Turbo prepared for vLLM-Omni serving. Each variant differs only in which transformer submodules are quantized to FP8 (E4M3 with per-tensor static scales); everything else stays in BF16.
In the tables below, ★ marks the overall best choice (online_fp8) and ← marks the row that corresponds to this repo.
1curl -s http://127.0.0.1:18002/v1/images/generations \2 -H "Content-Type: application/json"\3 -d '{
4 "model": "bahadirakdemir/Z-Image-Turbo-FP8-attn-only",
5 "prompt": "a cinematic photograph of an old fisherman standing on a foggy pier at sunrise",
6 "size": "1024x512",
7 "num_inference_steps": 8,
8 "guidance_scale": 0.0,
9 "n": 1,
10 "response_format": "b64_json"
11 }'
Benchmark — all 7 FP8 policies at 8 steps, 1024×512 on NVIDIA GB10
Same hardware, same (prompt, seed) tuples, same Docker image, fresh container per variant.
Pass A — DIFFUSION_ATTENTION_BACKEND=SAGE_ATTN
Variant
Mean latency (s)
Steps/s
Peak GPU (GB)
Δ latency vs BF16
Mem savings
PSNR vs BF16 (dB)
SSIM vs BF16
bf16_base
7.831
1.02
21.66
+0.0%
+0.0%
ref
ref
★
online_fp8
5.937
1.35
13.34
-24.2%
+38.4%
21.05
0.7942
full
6.163
1.30
16.02
-21.3%
+26.0%
20.58
0.7645
ffn-attn-qkv
6.007
1.33
16.48
-23.3%
+23.9%
20.99
0.7766
ffn-attn-out
6.400
1.25
17.41
-18.3%
+19.6%
19.76
0.7634
ffn-only
6.821
1.17
17.88
-12.9%
+17.5%
20.66
0.7789
←
attn-only
7.055
1.13
19.74
-9.9%
+8.8%
22.92
0.8413
attn-qkv-only
7.344
1.09
20.21
-6.2%
+6.7%
24.41
0.8423
attn-out-only
7.623
1.05
21.18
-2.7%
+2.2%
26.93
0.9027
PSNR / SSIM are computed against the BF16 reference image at the same prompt and seed. Higher is better; BF16 is ref (it's the reference).
Pass B — top variants at DIFFUSION_ATTENTION_BACKEND=TORCH_SDPA
On NVIDIA GB10 (compute capability SM 12.1), FLASH_ATTN is platform-gated and silently falls back to TORCH_SDPA. SageAttention has a small but consistent overhead vs TORCH_SDPA on Blackwell, so the production recommendation is TORCH_SDPA.
Variant
Mean latency (s)
Steps/s
Peak GPU (GB)
Δ latency vs BF16
bf16_base
7.145
1.12
21.66
+0.0%
★
online_fp8
5.637
1.42
13.32
-21.1%
full
5.706
1.40
16.03
-20.1%
ffn-attn-qkv
5.208
1.54
16.48
-27.1%
Image comparisons
Same 3 prompts rendered across every variant with identical seeds. Click for full resolution.
Prompt 0 — "a cinematic photograph of an old fisherman standing on a foggy pier at sunrise"
comparison_prompt0
Prompt 1 — "a detailed watercolor painting of a mountain village beside a clear blue lake"
comparison_prompt1
Prompt 2 — "a futuristic city street at night with neon reflections on wet pavement"