Abstract
Diffusion models are the go-to method for Text-to-Image generation, but their iterative denoising processes have high inference latency. Quantization reduces compute time by using lower bitwidths, but typically applies a fixed precision across all denoising timesteps, leaving an entire optimization axis unexplored. We propose TMPDiff, a temporal mixed-precision framework for diffusion models that assigns different numeric precision to different denoising timesteps. We hypothesize that quantization errors accumulate additively across timesteps, which we then validate experimentally. Based on our observations, we develop an adaptive bisectioning-based algorithm, which assigns per-step precisions with linear evaluation complexity, reducing an otherwise exponential search problem. Across four state-of-the-art diffusion models and three datasets, TMPDiff consistently outperforms uniform-precision baselines at matched speedup, achieving 10 to 20% improvement in perceptual quality. On FLUX.1-dev, TMPDiff achieves 90% SSIM relative to the full-precision model at a speedup of 2.5x over 16-bit inference.
The Challenge of Diffusion Latency
Diffusion models like Stable Diffusion or FLUX have revolutionized text-to-image generation, but they are notoriously slow. Because they generate images through an iterative process—often requiring 20 to 50 sequential passes through a multi-billion parameter neural network—inference latency is a major bottleneck.
Standard acceleration methods often use quantization (reducing the precision of numbers from 16-bit to 4-bit or 8-bit). However, these methods typically apply the same "fixed" precision to every single step in the process. This ignores a crucial fact: not all timesteps are created equal. Some steps are highly sensitive to noise and require high precision to maintain image structure, while others are more robust. Finding the perfect "schedule" of when to use high vs. low precision is normally an exponential search problem ($2^T$ combinations for $T$ steps), making it impractical for large models.
Methodology: TMPDiff
The authors propose TMPDiff, a framework built on three core pillars:
1. The Additive Error Model
The researchers hypothesize and experimentally validate that the local quantization errors introduced at each timestep accumulate in a predictable, additive way in the final image. This discovery allows the optimization of a complex 20-step process to be treated as a simple ranking problem: identifying which specific steps provide the most quality gain when run in high precision.
2. Temporal Sensitivity Scoring
Because errors are additive, each timestep can be "scored" by measuring the quality gain of "upcasting" just that specific step to full precision. Experimental results confirm that early denoising steps—which establish the global layout and structure of the image—are far more sensitive to quantization than the final "refinement" steps.
3. Adaptive Bisectioning Algorithm
To avoid running a full calibration for every single timestep, TMPDiff uses a bisection strategy. By sampling a few "anchor" timesteps and identifying regions with high sensitivity, the algorithm interpolates the rest. This turns an exponential search into a linear one, making it feasible for 12B parameter models.
Key Results
The researchers evaluated TMPDiff across four state-of-the-art models (FLUX.1-dev, PixArt-Σ, Sana, and SDXL) using benchmarks like COCO, DCI, and MJHQ.
- Superior Trade-offs: TMPDiff consistently outperformed uniform-precision baselines. At matched speeds, it provided a 10% to 20% improvement in perceptual quality metrics (SSIM and LPIPS).
- FLUX.1-dev Performance: On the massive 12B parameter FLUX model, TMPDiff achieved 90% SSIM (relative to the full-precision version) while running 2.5x faster than standard 16-bit inference.
- Compatibility: The method is orthogonal to other acceleration tricks. When combined with DeepCache, it achieved a 2.91x speedup on SDXL.
Limitations and Future Work
While TMPDiff offers significant speedups, it currently requires keeping both quantized and full-precision models in GPU memory. Future work may explore "weight offloading" or "nested quantization" to reduce VRAM usage. Additionally, optimizing precision switching at the hardware kernel level remains an open engineering challenge to further minimize overhead.
Summary updated