Skip to content

v3.4.1 - HSWQ Z Image / ZIT Hybrid ConvRot NVFP4 Quantization & Model Release

Choose a tag to compare

@ussoewwin ussoewwin released this 17 Aug 20:24
· 82 commits to main since this release
EN 中文

1. Overview

v3.4.1 publishes the HSWQ Z Image / ZIT Hybrid ConvRot NVFP4 quantization line and its first public model pack. It is a high-fidelity hybrid quantization for Z-Image-Turbo diffusion UNets: Linear layers → NVFP4 (Tensor Core scaled_mm_nvfp4), while the sensitivity-selected remainder stays as native ConvRot INT8 protection.

  • Image fidelity: decoded SSIM 0.97–0.99 (per-seed, measured on real pixels with the VAE attached)
  • VRAM: ~53–58% savings vs FP16
  • File size: ~40% smaller than FP16 (≈60% of FP16, mixed)
  • Runtime: loaded via HSWQ ConvRot INT8/ConvRot NVFP4 UNet Loader on the bench-matched Comfy parity path (stock GEMM + online act rotate) — a fully separated path from the SDXL Tensor Core product stack

2. Quantization Method — Reverse Hybrid NVFP4

This method is fundamentally different from the conventional "protect the top-important layers" approach (histogram MSE / cosine / SVD saliency). It is a reverse method:

Start from a complete ConvRot INT8 model (error ≈ 0) and convert layers to NVFP4 in ascending order of per-layer trajectory impact.

The conventional method ignores inter-layer interactions and is not sufficient for this hybrid. The reverse method stays in the low-error regime where additivity holds, so single-layer ranking is valid. Pass only if every seed meets decoded SSIM ≥ 0.95.

2.1 Step 1 — Per-layer impact measurement (Z_Image/diag_impact.py, ~12 min)

Inject NVFP4 error (e4m3, group-256 reconstruction) into one layer at a time, run a fixed-seed 4-step denoising trajectory, and measure how far the final latent drifts (relative MSE). That value is the layer's true importance under real trajectory propagation. This writes impact_<unet>.json (all 208 layers).

Typical ranking tendencies (always re-measure per checkpoint; ranking is not transferable):

  • Smallest / safest to convert: noise_refiner.*.attention.qkv-class layers
  • Largest / must protect: t_embedder.mlp.2, final_layer.linear, final_layer.adaLN_modulation.1

2.2 Step 2 — Reverse conversion (Z_Image/gen_reverse_nvfp4.py, ~1 min)

Rank layers ascending (lowest impact first), then convert the K lowest-impact layers from INT8 to NVFP4:

  • INT8 dequant (q × scale → rotated W@H^T)
  • Re-quantize with Kitchen TensorCoreNVFP4Layout (format: nvfp4, convrot: true, groupsize: 256)
  • without re-rotating — the INT8 weights are already stored rotated

Result: (208 − K) INT8 + K NVFP4 layers.

2.3 On-disk format of converted layers

Key Layout
.weight U8 packed [out, in/2]
.weight_scale F8_E4M3 [out, in/16]
.weight_scale_2 F32
.comfy_quant U8 tensor {"format": "nvfp4", "convrot": true, "convrot_groupsize": 256}

Weights are stored rotated (W@H^T); a large dequant-vs-FP16 deviation is expected.

2.4 Step 3 — Quality gate (bench)

Bench with the ComfyUI standard pipeline (ModelPatcher → KSampler → VAEDecode), all 5 seeds, --steps 12 --native-dtype --vae. Pass only if every seed's decoded SSIM ≥ 0.95 (the latent-view SSIM is blind to scale/shift collapse — always judge with --vae).

K is checkpoint-specific and searched, not a fixed number. The quality surface is often not a single cliff: failing seeds can change with K, and quality can recover then fail again (error cancellation). Treat "islands" as the default search assumption.

3. Published Models

Filename Base Model Version License
moodyProMix_zitV13_hswq_hybrid_nv80_convrot_nvfp4.safetensors Moody Pro Mix zit v1.3 (nv80) CreativeML Open RAIL++-M
moodyProMix_collectorsEdition_hswq_hybrid_nv90_convrot_nvfp4.safetensors Moody Pro Mix Collector's Edition (nv90) CreativeML Open RAIL++-M
moodyRealMix_zitV7_hswq_hybrid_nv100_convrot_nvfp4.safetensors Moody Real Mix zit v7.0 (nv100) CreativeML Open RAIL++-M
moodyRealMix_xhsEdition_hswq_hybrid_nv110_convrot_nvfp4.safetensors Moody Real Mix XHS Edition (nv110) CreativeML Open RAIL++-M
darkBeast30BF16INT8_dbzit9DIMRclaw_hswq_hybrid_nv100_convrot_nvfp4.safetensors DarkBeast (nv100)

Base models: Moody Pro Mix / Moody Real Mix by catlover1937. All packs are derivatives of their respective original creators; see the HF model card for full credits and licensing.

4. Links