Q-Drift: Quantization-Aware Drift Correction for Diffusion Model Sampling

Sooyoung Ryu, Mathieu Salzmann, Saqib JavedarXiv 2026

TL;DR

Q-Drift is a "plug-and-play" sampler-side correction that mitigates the quality loss caused by quantizing diffusion models. By treating quantization error as implicit stochastic noise and analytically adjusting the sampling drift to preserve the model's original probability distributions, it recovers significant generation fidelity with negligible inference overhead and as few as five calibration runs.

What Problem Does This Paper Address?

Diffusion models (like Stable Diffusion or FLUX) are state-of-the-art for image generation but are computationally expensive and memory-intensive. Post-training quantization (PTQ) is the standard way to compress these models by reducing the precision of weights and activations (e.g., from 16-bit to 4-bit).

However, diffusion models are iterative. A small quantization error at one denoising step doesn't just stay local; it feeds into the next step, causing errors to accumulate along the sampling trajectory. This "drift" shifts the final image away from the intended data distribution, leading to artifacts and lower image quality. Most existing PTQ methods try to minimize error at the layer level, but they often ignore how these errors interact with the sampling process itself.

Methods

The authors introduce Quantization-Aware Drift Correction (Q-Drift). Instead of trying to "fix" the quantized weights, they modify the sampler to account for the noise those weights introduce.

  1. Stochastic Modeling: They treat quantization error as an implicit Gaussian perturbation injected at each step.
  2. SDE Principles: Using the framework of Stochastic Differential Equations (SDEs), they derive a first-order drift correction. Essentially, if quantization adds unwanted "noise" (diffusion), you can mathematically adjust the "direction" (drift) of the sampling step to ensure the marginal probability distribution remains correct.
  3. Lightweight Calibration: To implement this, the method needs to know the variance of the quantization noise at each timestep. Q-Drift estimates this by running a few paired samples through both the full-precision and quantized models.
  4. Channel-wise Scaling: The correction is applied as a simple scaling factor $(1 + c_i)$ to the model's output. The authors found that applying this correction per latent channel (rather than one global scalar) is much more robust.

Crucially, Q-Drift is orthogonal to other PTQ methods. You can use it on top of existing techniques like SVDQuant or MixDQ without retraining the model.

Datasets

The researchers evaluated Q-Drift using:

  • MJHQ-30K: A high-quality subset of the Midjourney dataset. They used 5,000 prompts for calibration and a separate 5,000 prompts for evaluation to ensure fair reporting.
  • Diverse Architectures: They tested across six models, including U-Net based models (SDXL, SDXL-Turbo) and Transformer-based "DiT" models (FLUX.1-dev, FLUX.1-schnell, PixArt-Σ, Sana).

Key Insights and Ideas

  • Quantization as Noise: The core "aha" moment is viewing quantization not just as a loss of precision, but as a specific type of noise injection that can be countered using the same math used to build diffusion models in the first place.
  • Distribution over Fidelity: The authors argue that preserving the marginal distribution (the overall "look" and statistics of the images) is more important for generation quality than minimizing the per-pixel error (PSNR) relative to a full-precision version.
  • Extreme Sample Efficiency: While many calibration methods require hundreds or thousands of samples, Q-Drift remains effective with as few as 5 paired calibration runs. This makes it incredibly practical for developers who want to optimize a model quickly.
  • Sampler Agnostic: The math holds up (or can be adapted as a heuristic) across different sampling schemes, including Euler, Flow-matching, and DPM-Solver++.

Key Results

  • FID Improvement: Q-Drift consistently improved Fréchet Inception Distance (FID) across all tested settings. For example, on PixArt-Σ using W3A4 quantization, it reduced FID from 48.85 to 44.26.
  • Gap Recovery: In models like Sana, Q-Drift recovered roughly 60% of the quality gap between the quantized model and the full-precision original.
  • Preserving Alignment: CLIP scores (which measure how well an image matches a text prompt) remained stable, meaning the correction improves image quality without breaking the model's ability to follow instructions.
  • Zero Overhead: Because the correction is just a pre-computed scaling factor applied during sampling, it adds virtually no extra time to the inference process.

Limitations and Future Work

  • Simplified Covariance: To keep calibration fast and stable, the authors assumed a diagonal/isotropic covariance structure for the noise. They acknowledge that a richer, more adaptive noise model might yield even better results but would be harder to estimate.
  • Flow-Matching Heuristic: While the math for SDE-based samplers is rigorous, the extension to Flow-matching is currently treated as a heuristic. The authors suggest that formalizing this connection is a path for future research.
  • Similarity Metrics: Because Q-Drift changes the sampling trajectory to favor better distributions, it can actually decrease similarity metrics like PSNR or SSIM when compared to the full-precision output, even though the resulting images look better to humans.

Summary updated

BibTeX
@misc{ryu2026q,
  author = {Sooyoung Ryu and Mathieu Salzmann and Saqib Javed},
  title = {{Q-Drift: Quantization-Aware Drift Correction for Diffusion Model Sampling}},
  year = {2026},
  eprint = {2603.18095},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.18095},
}
Figure