Z-Image SD.Next Integration and Dynamic Quantization Guide: SDNQ Auto-Quantization
When a WebUI Veteran Meets Z-Image
Stable Diffusion WebUI users are familiar with SD.Next (developed by vladmandic, 7.2k+ GitHub stars) — the modern fork of Automatic1111's WebUI famous for being "all-platform, all-model": it supports all GPUs, iGPUs, CPUs, and even NPUs, ships a built-in model downloader, and integrates the in-house SDNQ quantization engine.
The first 2026 release (January 20, 2026) brought two updates that matter enormously to Z-Image users: native integration of Nunchaku-optimized Z-Image Turbo (INT4 quantized inference), and the SDNQ dynamic quantization method — the system can automatically pick the best quantization scheme for every single layer of a model. This article, based on the SD.Next official release notes, the SDNQ Quantization Wiki (164 revisions), and community practice, is a complete walkthrough of this "one-click quantization" workflow.
Why Quantization Matters for Z-Image
Z-Image is a 6B-parameter S3-DiT diffusion transformer; BF16 weights run ~12GB+, and FP16 inference strains consumer GPUs. Quantization is the core tool for low-VRAM deployment:
| Setup | VRAM Usage | Notes |
|---|---|---|
| BF16 native | 12GB+ | Baseline |
| FP8 | ~6GB | Nearly lossless quality |
| INT8 | ~6GB | SDNQ default; fast, near-baseline quality |
| INT6 | ~4.5GB | Slightly less VRAM, small quality loss |
| UINT4 | ~3.5GB | Least VRAM; some quality/speed loss |
SDNQ's goal: users shouldn't need to understand any of this — tell the engine your VRAM budget and it decides how to quantize each layer automatically.
SDNQ: From Fixed Quantization to Dynamic Quantization
The Problem with Traditional Quantization
Fixed quantization (e.g., INT8 everywhere) applies a one-size-fits-all cut: it wastes precision on layers with high redundancy and loses quality on sensitive layers. Different layers have wildly different quantization tolerance — attention, FFN, and normalization layers each have distinct error budgets.
Dynamic Quantization
The SDNQ dynamic quantization method introduced in the 2026-01-20 release:
SDNQ can dynamically determine the best quantization method for each module layer. Quantizing layer-by-layer on the fly is slower, but yields better quality with minimal resource usage.
How it works:
- Evaluates each layer against a Dynamic loss threshold
- The current
Quantization typeacts as the minimum allowed quantization precision (each layer can only be quantized to "no lower than" that precision) - Tests different quantization types per layer and picks the optimal one meeting the quality threshold
- Cost: slower quantization at model load; benefit: better quality with minimal overall resource footprint
The Quantization Type Library
SDNQ supports 1-bit to 16-bit quantization across four families — integer, unsigned integer, floating point, unsigned floating point — for a total of 176 quantization schemes (33 int-based + 143 float-based). The UI exposes only the common ones for simplicity; the API and scripts can use all of them.
Common types:
| Type | Packing | Range |
|---|---|---|
| int8 | int8 | -128 ~ 127 |
| int6 | 4×int6 → 3×uint8 | -32 ~ 31 |
| int4 | 2×int4 → 1×uint8 | -8 ~ 7 |
| uint4 | unsigned symmetric/asymmetric | 0 ~ 15 |
| float8_e4m3fn | mainstream FP8 format | ~±448 |
Symmetric vs asymmetric: unsigned (asymmetric) quantizations can't store negatives directly and rely on a zero-point, making them slower; symmetric quantizations need no zero-point and are usually faster. Quality differences are minimal at 8–6 bits; use asymmetric below 5 bits.
Installation and Configuration Guide
Install SD.Next
git clone https://github.com/vladmandic/sdnext.git
cd sdnext
./webui.sh # Linux/macOS; use webui.bat on Windows
After first launch, find the SDNQ menu under Settings → Quantization Settings.
Load the Z-Image Model
- Download Z-Image weights from HuggingFace (BF16 safetensors or community pre-quantized variants)
- Place them in
models/Stable-diffusion/(SD.Next auto-detects) - Or pick a Z-Image reference model from the UI's model list to auto-download
Key SDNQ Settings
1. Quantization enabled — default none; recommended Model + TE:
| Option | Target | Notes |
|---|---|---|
Model |
Diffusion models | Main VRAM consumer; enable |
TE |
Text encoders | Recommended |
LLM |
LLMs for Prompt Enhance | As needed |
Control |
ControlNets | As needed |
VAE |
VAE | Not recommended (VAE is precision-sensitive) |
⚠️ If you enable VAE quantization with FP16, VAE Upcast must be false; for black images on SDXL, use the FP16 Fixed VAE.
2. Quantization mode — default auto:
| Mode | Behavior | Suitable For |
|---|---|---|
auto |
Chooses pre/post per model automatically | Recommended |
pre |
Quantizes during load; reduces system RAM | DiT/video models (Flux, Z-Image) |
post |
Quantizes after load into RAM | Older UNet models (SDXL is post-only) |
Z-Image is a DiT architecture, so pre mode is a perfect fit — quantized right at load time with minimal RAM footprint.
3. Quantization type — default int8:
| Type | Quality vs 16-bit | Memory Savings |
|---|---|---|
| INT8 | Very similar | 2× |
| INT6 | Similar | 2.7× |
| UINT4 | Lower | 3.6× |
| FP8 (float8_e4m3fn) | Similar to INT6 | Same as INT8 |
4. Dynamic quantization: enable Dynamic Quantization and set the Dynamic loss threshold — each layer then picks its optimal type automatically, with the current quantization type as the minimum allowed precision.
5. Performance options (strongly recommended):
Dequantize using torch.compile: big performance boost when Triton is available (built-in on NVIDIA/AMD/Intel Linux; manual install on Windows)Use Quantized MatMul: significant speedups on INT8/FP8/FP16-capable hardware
SDNQ vs Fixed Quantization: Comparison
| Dimension | Fixed (INT8 everywhere) | SDNQ Dynamic |
|---|---|---|
| Load time | Fast | Slower (per-layer evaluation) |
| Generation quality | Limited by most sensitive layer | Better (per-layer optimal) |
| VRAM usage | Fixed | Minimized (precision on demand) |
| Ease of use | Manual tuning | One switch |
SD.Next officially claims SDNQ delivers up to 4× VRAM reduction with virtually no quality or performance loss.
Nunchaku Z-Image Turbo: Another Acceleration Path
The 2026-01-20 release also integrated Nunchaku Z-Image Turbo — 4-bit quantized inference via SVDQuant (ICLR 2025 Spotlight), targeting NVIDIA Blackwell and previous-generation hardware. SD.Next ships:
- Nunchaku-optimized Z-Image Turbo (INT4/NVFP4 pre-quantized variants)
- Complementary to SDNQ: Nunchaku focuses on hardware-specific acceleration; SDNQ focuses on universal cross-platform quantization
- Note: Nunchaku models require a pre-release
transformerspackage; launch with--experimental
FAQ
Q1: I changed quantization settings but nothing happened?
Settings only apply to models loaded after they're set — reload the model after changing settings.
Q2: Black images after quantizing SDXL?
SDXL is only compatible with post mode; if issues persist, check the VAE Upcast setting or switch to the FP16 Fixed VAE.
Q3: No performance gain on Windows?
Triton requires manual installation on Windows; once installed, enable Dequantize using torch.compile and Use Quantized MatMul.
Q4: Dynamic quantization loads too slowly?
Per-layer evaluation is indeed slower — if you load large models frequently, start with fixed INT8 and enable dynamic only when you need maximum quality.
Q5: Which quantization type for Z-Image Turbo vs Base?
Turbo: INT8 or FP8 (preserve distillation quality); Base: INT6 or even UINT4 is fine.
Summary
SD.Next's SDNQ dynamic quantization automates the expert-level optimization of "picking the optimal precision per layer": 176 quantization schemes, 1-bit to 16-bit, pre/post dual modes, up to 4× VRAM reduction — and Z-Image, being a DiT-architecture model, happens to enjoy the full benefit of pre mode + dynamic quantization. Combined with Nunchaku Z-Image Turbo integration, SD.Next has become the preferred entry point for Z-Image users in the WebUI ecosystem: just enable dynamic quantization — and let the engine handle the rest.