TMPDiff: Temporal Mixed-Precision for Diffusion Models
Authors: Basile Lewandowski, Simon Kurz, Aditya Shankar, Robert Birke, Jian-Jia Chen, Lydia Y. Chen
Organizations: University of Neuchâtel, Switzerland · TU Dortmund University, Germany · LAMARR Institute, Germany · TU Delft, Netherlands · University of Turin, Italy
Diffusion models are the go-to method for Text-to-Image generation, but their iterative denoising processes has high inference latency. Quantization reduces compute time by using lower bitwidths, but 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.
Figures & tables
Figure 1: Change in final latent error E(Z) from single-timestep up- and downcasting.
Figure 2: Linear fit between the measured final latent error E(Z) and the schedule scoring functions S↑(Z) and S↓(Z) for upcasting K timesteps for Sana.
Figure 3: Rank deviation per K over the number of sampled timesteps for calibration on the COCO dataset for the Sana model.
Figure 4: Performance metrics over different speedup factors on FLUX W4A4R32.
Model
Method
MJHQ
COCO
sDCI
Speedup
SSIM ↑
PSNR ↑
LPIPS ↓
SSIM ↑
PSNR ↑
LPIPS ↓
SSIM ↑
PSNR ↑
LPIPS ↓
Pixart
FP16 (8 steps)
0.58
15.3
0.41
0.61
15.4
0.40
0.53
15.1
0.41
2.5
W4A4 (25 steps)
0.63
16.8
0.36
0.61
15.6
0.40
0.54
15.4
0.40
–
Ours (15+5 steps)
0.69
19.4
0.27
0.69
18.4
0.30
0.61
17.8
0.31
–
Sana
BF16 (8 steps)
0.54
14.6
0.38
0.53
13.5
0.41
0.45
12.0
0.44
2.5
W4A4 (25 steps)
0.63
17.0
0.26
0.60
15.6
0.31
0.56
15.3
0.30
2.6
Table 1: Comparison across different models and datasets. The reference point for similarity evaluation are the images generated by the unquantized (16 bits) model. To compare models with similar speedups, we scale the number of timesteps depending on the data type.
Method
SSIM ↑
PSNR ↑
LPIPS ↓
Small Sana
0.47
13.0
0.48
DDSM heuristic
0.80
22.7
0.09
Ours
0.82
23.3
0.08
Table 2: Result of mixing models
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7
Figure 7: Final latent error δ0 reduction for single-timestep upcasting, with the upcasting gain Δt↑ computed on 128 samples of the MJHQ, DCI and COCO datasets respectively ( Figure 7a ) and for 64, 128, 256 and 512 samples from the MJHQ dataset ( Figure 7b ) on the Sana model.
Figure 8: Linear fits between MJHQ ground-truth final latent errors δ0 (128 test samples; 20 schedules per K∈{2,6,10,14,18} ) and the scoring function S↑(Z) . Upcasting gains Δt↑ are computed on MJHQ with m∈{64,128,256,512} calibration samples.
Figure 9: Linear fits between DCI ground-truth final latent errors δ0 (128 test samples; 20 schedules per K∈{2,6,10,14,18} ) and the scoring function S↑(Z) . Upcasting gains Δt↑ are computed on MJHQ with m∈{64,128,256,512} calibration samples.
Figure 10: Linear fits between COCO ground-truth final latent errors δ0 (128 test samples; 20 schedules per K∈{2,6,10,14,18} ) and the scoring function S↑(Z) . Upcasting gains Δt↑ are computed on MJHQ with m∈{64,128,256,512} calibration samples.
Model
IR ↑
CLIPS ↑
LPIPS ↓
SSIM ↑
PSNR ↑
PixArt
rp
-0.69
-0.74
0.73
-0.59
-0.92
rs
-0.72
-0.78
0.82
-0.67
-0.93
Sana
rp
-0.67
-0.42
0.84
-0.67
-0.74
rs
-0.72
-0.41
0.90
-0.74
-0.87
Appendix
Table 3: Pearson ( rp ) and Spearman ( rs ) correlation coefficients between image quality metrics and final latent errors.
Figure 11: Sampling speed (seconds) for FLUX on several memory transfer strategies.
Dataset
Metric
Ours
bfloat16
w4a4r32
COCO
IR ( ↑ )
1.0434
0.9476
1.0413
CLIP ( ↑ )
27.021
26.925
26.907
FID ( ↓ )
71.243
71.548
71.839
MJHQ
IR ( ↑ )
1.0438
0.9239
1.0424
CLIP ( ↑ )
27.163
26.971
27.172
FID ( ↓ )
55.990
57.196
55.947
Appendix
Table 4: Comparison of Image Reward, CLIP Score, and FID (w.r.t. ground truth images) across datasets. The model evaluated is Sana, using identical settings to the experiment reported in Tab. 1 .
DeepCache
TMPDiff
SSIM ↑
PSNR ↑
LPIPS ↓
Speedup
✓
✗
0.73
20.5
0.28
2.25
✗
✓
0.85
28.0
0.10
1.42
✓
✓
0.72
20.3
0.29
2.91
Appendix
Table 5: Result of combined DeepCache and TMPDiff sampling
Diffusion model quantization compresses model weights and activations to reduce inference memory and latency while preserving generated image, video, and speech quality.
Diffusion Language Models (DLMs) introduce unique quantization challenges due to their iterative denoising process. In this work, we reveal that quantization sensitivity is both taskand time-dependent, with different downstream tasks exhibiting distinct precision requirements across denoising steps. We further show that these patterns can be predicted without groundtruth labels or task-specific evaluation metrics. Building on these findings, we introduce T 2Quant, a task and time-aware mixedprecision quantization framework that uses a label-free sensitivity signal to optimally allocate activation precision across denoising steps under a fixed bit-width budget. Extensive experiments across three DLMs and six benchmarks demonstrate that T 2Quant consistently improves the average accuracy of existing quantization methods, achieving gains of up to 6.7 percentage points under the same budget.
Ofek Avivi, Eliron Rahimi, Avi Mendelson +1
Technion – Israel Institute of Technology · INSIGHT Lab, Ben-Gurion University of the Negev
Static quantization assigns one weight precision to every denoising step. To preserve quality, that precision must accommodate the most quantization-sensitive step, even though many other steps can tolerate fewer bits. The resulting model may satisfy its memory budget, but it repeatedly pays worst-case arithmetic throughout the denoising trajectory. We introduce Temporal-Adaptive Bit Sparsification Quantization (TASQ) to separate these two costs. TASQ stores one shared maximum-precision weight buffer and learns a Temporal-Spatial LSB Mask that selects a lower effective precision for each layer and denoising stage by truncating least-significant bits. Storage therefore remains fixed by the worst case, while BitOPs decrease at less sensitive stages without per-stage weight copies or runtime search. A Temporal-Precision Engine maps the learned schedule to bit-serial execution, where cycles scale with effective precision and switching precision has no measured cycle overhead. On PixArt-Sigma, SANA-1.6B, and SDXL-Turbo, TASQ achieves quality comparable to static quantization with less computation. Together with the Temporal-Precision Engine, it reduces execution cycles by 25 to 50 percent over static quantization and by 6.1 to 7.5x over a naive static 8-bit bit-serial execution. Code is available at https://github.com/seokho-han/tasq.
Seokho Han, Dongwei Wang, Jinhee Kim +4
Department of Electrical and Computer Engineering, Sungkyunkwan University, Korea · Department of Electrical and Computer Engineering, University of Arizona, USA · Department of Electrical and Computer Engineering, Duke University, USA +1
Diffusion transformers have demonstrated remarkable capabilities in generating videos. However, their practical deployment is severely constrained by high memory usage and computational cost. Post-Training Quantization provides a practical way to reduce memory usage and boost computation speed. Existing quantization methods typically apply a static bit-width allocation, overlooking the quantization difficulty of activations across diffusion timesteps, leading to a suboptimal trade-off between efficiency and quality. In this paper, we propose a inference time NVFP4/INT8 Mixed-Precision Quantization framework. We find a strong linear correlation between a block's input-output difference and the quantization sensitivity of its internal linear layers. Based on this insight, we design a lightweight predictor that dynamically allocates NVFP4 to temporally stable layers to maximize memory compression, while selectively preserving INT8 for volatile layers to ensure robustness. This adaptive precision strategy enables aggressive quantization without compromising generation quality. Beside this, we observe that the residual between the input and output of a Transformer block exhibits high temporal consistency across timesteps. Leveraging this temporal redundancy, we introduce Temporal Delta Cache (TDC) to skip computations for these invariant blocks, further reducing the computational cost. Extensive experiments demonstrate that our method achieves 1.92× end-to-end acceleration and 3.32× memory reduction, setting a new baseline for efficient inference in Video DiTs.
Rundong Su, Jintao Zhang, Zhihang Yuan +3
Fudan University · Tsinghua University · Shanghai Jiao Tong University