Abstract
Diffusion Probabilistic Models (DPMs) achieve state-of-the-art image generation but suffer from slow sampling speeds. Fast samplers like DDIM and DPM-Solver reduce the number of steps but introduce significant truncation errors that degrade image quality. We present TimeTuner, a lightweight plug-in approach that optimizes the timestep values used to condition the noise-prediction network. By aligning the fast-sampled direction with the ground-truth integral, TimeTuner reduces accumulative truncation error without retraining model weights. Our experiments across various datasets and samplers demonstrate substantial improvements in FID with minimal computational overhead.
1. Introduction
Diffusion Probabilistic Models (DPMs) have revolutionized generative modeling by reversing a gradual noise-addition process. However, the standard sampling procedure involves thousands of steps, making real-time application difficult. To accelerate this, "fast samplers" such as DDIM or DPM-Solver are employed to skip steps.
The primary challenge in fast sampling is the "truncation error." When taking large discrete steps, the direction predicted by the neural network—trained on infinitesimal steps—becomes inaccurate. As shown in Figure 1, these errors accumulate over the sampling trajectory, leading to a drift from the true data distribution and resulting in visual artifacts or loss of detail in few-step regimes (e.g., 5–20 steps).
2. Methodology: TimeTuner
TimeTuner addresses truncation error by treating the sampling process as a discretized integral. Inspired by the Mean Value Theorem, the authors posit that for any large interval, there exists an intermediate "optimal" point that provides a more accurate direction for the entire jump than the starting point.
2.1 Timestep Alignment
Instead of conditioning the noise-prediction network $f_\theta$ on the standard timestep $t_i$, TimeTuner introduces an optimized timestep $\tau_i$. This parameter is tuned to minimize the discrepancy between the fast-sampled direction and the "ground truth" direction obtained from a high-fidelity 1000-step run.
2.2 Sequential Training Strategy
The optimization of $\tau$ values is performed sequentially, moving from high-noise states (end of the schedule) toward clean images. This ensures that the correction at each step $i$ accounts for the cumulative errors corrected in previous steps. The process is highly efficient, requiring only about an hour on a single A100 GPU to optimize a 10-step trajectory, as it only involves tuning a few dozen scalar parameters rather than the entire U-Net.
3. Experimental Evaluation
The effectiveness of TimeTuner was validated across diverse benchmarks, including CIFAR10, CelebA, LSUN Bedroom, FFHQ, and ImageNet.
3.1 Error Reduction
A key metric for TimeTuner is the reduction of accumulative truncation error. Figure 2 illustrates how the proposed method consistently maintains lower error levels compared to baseline samplers across different trajectories (quadratic, uniform, log-SNR).
3.2 Performance Gains
TimeTuner yields significant improvements in Fréchet Inception Distance (FID):
- LSUN Bedroom (10 steps): DDIM FID improved from 9.46 to 5.85.
- FFHQ (10 steps): FID improved from 23.58 to 14.80.
- Consistency Models: Even for models already optimized for few-step sampling, TimeTuner further reduced FID (e.g., from 8.14 to 7.14 at 1 step).
The method is robust across different Classifier-Free Guidance (CFG) scales and high-order solvers like EDM, demonstrating its versatility as a plug-in enhancement.
4. Discussion and Limitations
While TimeTuner provides a significant "quality-for-free" boost, it has some limitations. The optimized $\tau$ values are specific to a particular sampling trajectory (defined by the number of function evaluations and noise schedule). Changing the number of steps requires re-running the tuning process. Future research could explore generalizing these optimized timesteps across different schedules or models to eliminate the need for per-trajectory tuning.
5. Conclusion
TimeTuner offers a simple yet powerful solution to the truncation error problem in accelerated diffusion sampling. By decoupling the conditioning timestep from the noise level and treating it as a tunable parameter, it achieves superior image fidelity with zero changes to pre-trained model weights.
Summary updated