Abstract
Diffusion Transformers (DiTs) have emerged as a powerful architecture for high-quality image and video generation. However, their sequential sampling process is computationally intensive, requiring numerous iterations that hinder real-time application. While feature caching—reusing computations from previous steps—offers a path to acceleration, it typically suffers from "error accumulation," where small discrepancies between steps snowball into significant visual artifacts and quality degradation. This paper presents Error-Optimized Cache (EOC), a novel framework that mitigates these errors by extracting and applying "prior knowledge" of feature evolution. EOC allows models to skip up to 75% of computations while maintaining significantly higher fidelity than standard caching methods, with a negligible latency overhead of less than 0.6%.
Introduction
Modern generative AI relies heavily on Diffusion Transformers to produce high-resolution, photorealistic content. Despite their success, the "quality tax" of inference speed remains a primary bottleneck. To address this, researchers have turned to caching mechanisms that skip redundant calculations in the Attention and MLP layers across adjacent denoising steps.
The fundamental challenge of caching in diffusion models is that features are similar but not identical across steps. These subtle differences, if ignored, act as noise that accumulates over the sampling trajectory. This leads to "caching hallucinations"—missing details, blurry textures, and a sharp rise in the Fréchet Inception Distance (FID). Previous acceleration attempts have focused on identifying which layers to cache, but they largely ignore the mechanism for correcting the errors that caching introduces. EOC fills this gap by treating caching as an optimization problem rather than a simple data-copying task.
Methodology
The EOC framework operates through a three-stage pipeline designed to refine cached features with minimal computational cost.
1. Prior Knowledge Extraction
Before inference, the model undergoes a brief offline phase. By running the model on a small subset of representative prompts, the system records the average outputs of the Attention and MLP layers. From this data, EOC calculates a "trend"—the statistical difference between feature outputs at step $t$ and step $t+1$. This trend serves as a map of how features typically evolve during the denoising process.
2. Cache Optimization Determination (COD)
Not all caching errors are created equal. EOC employs a ranking formula to determine which blocks and steps require the most correction. A key insight of this research is the "Early Bird" error: discrepancies introduced in the early stages of denoising are far more destructive to the final image than those occurring near the end. Consequently, COD prioritizes optimization for the initial sampling steps to prevent error compounding.
3. Cache Optimization (CO)
During the actual generation process, when a block is cached, EOC does not simply reuse the old feature. Instead, it applies a multiplicative correction:
$$Feature_{optimized} = Feature_{cached} \times (1 + \theta \cdot Trend)$$
This multiplicative approach allows the correction to scale naturally with the magnitude of the current features, proving more effective than simple additive adjustments. By "nudging" the cached data toward the expected value of a full calculation, EOC offsets the inherent error of the cache.
Experimental Results
Performance and Quality
The researchers evaluated EOC on ImageNet (class-to-image) and MS-COCO (text-to-image) using DiT and Pixart-\alpha$ models. The results demonstrate a significant recovery of image quality compared to naive caching:
- FID Improvement: At a 75% caching rate (skipping 3 out of 4 blocks), EOC improved the FID score on ImageNet from 30.454 to 21.690, a 28.8% improvement in fidelity.
- Negligible Overhead: Despite the added intelligence of the correction step, the computational cost is minimal. EOC increases latency by only 0.22% to 0.56% compared to standard caching, making it a highly efficient trade-off.
- Visual Integrity: Qualitatively, EOC prevents the loss of fine details—such as background textures or small objects—that often disappear under aggressive caching regimes.
Key Insights
- Holistic Optimization: The study found that Attention and MLP layers must be optimized simultaneously. Correcting only one layer type can disrupt the feature distribution balance, potentially leading to worse results than no optimization at all.
- Robustness: The method proved versatile across different sampling algorithms, including DDIM and DPM-Solver, suggesting that the "trend" of feature evolution is a fundamental property of the diffusion process rather than an artifact of a specific sampler.
Conclusion and Future Work
Error-Optimized Cache (EOC) provides a robust framework for accelerating Diffusion Transformers without the typical sacrifice in image quality. By leveraging the predictable evolution of features during denoising, EOC effectively bridges the gap between high-speed inference and high-fidelity generation.
While EOC significantly improves FID and spatial metrics, a slight reduction in the Inception Score (IS) was observed in some configurations, suggesting a minor trade-off in object distinctness. Future research will explore more sophisticated noise filtering and alternative methods for embedding prior knowledge to further refine the balance between speed and generative variety.
Summary updated