Source-linked AI summary
EpaCache: Error-Propagation-Aware Caching for Accelerating Diffusion-Based Visual Generation
Yuhan Liu, Zongwei Hong, Jinglun Li, Linze Li, Shen Zhang, Yao Tang
TL;DR
Sequential denoising makes diffusion-based visual generation expensive, while existing cache controllers largely overlook how reuse errors propagate along the trajectory. EpaCache is a training-free policy that calibrates timestep-specific downstream impact and reallocates reuse tolerance accordingly, consistently improving latency–fidelity trade-offs across image and video models. Its scope includes reporting discrete timestep indices for both diffusion and flow-matching trajectories.
Problem
Existing cache controllers rely mainly on local temporal variation and do not explicitly account for timestep-dependent propagation of approximation errors through the remaining sampling trajectory.
Method
EpaCache uses isolated cache-reuse perturbations to calibrate downstream impact, then redistributes a global mean tolerance across timesteps.
Results
EpaCache consistently improves latency–quality trade-offs over existing caching baselines across FLUX.1-dev, Wan2.1, and HunyuanVideo under comparable realized computation budgets.
Takeaways & Limitations
Error-propagation-aware cache allocation provides an effective strategy for assigning conservative refreshes to sensitive timesteps and aggressive reuse elsewhere.
Takeaways & Limitations
The paper reports discrete timestep indices along the sampling trajectory for ease of interpretation across diffusion and flow-matching parameterizations.
Abstract
from arXiv · showhide
Diffusion-based visual generative models deliver strong image and video synthesis quality but incur high inference costs because sequential samplers repeatedly evaluate large networks. Caching-based methods reduce inference latency by reusing intermediate computations across adjacent timesteps. However, existing cache controllers rely primarily on local temporal variation and overlook the trajectory-level consequences of cache reuse. We introduce Error-Propagation-Aware Cache (EpaCache), a training-free caching policy that adaptively allocates the reuse budget on timesteps with lower downstream impact. Experiments on image and video synthesis models demonstrate that EpaCache consistently improves the latency--fidelity trade-off over existing caching methods. On FLUX.1-dev, EpaCache outperforms the prior state-of-the-art caching method in both latency and fidelity, reducing inference time from $11.7$ s to $11.3$ s while improving PSNR from $21.4$ to $22.8$. On HunyuanVideo, EpaCache achieves a $2.63\times$ speedup over uncached inference and improves SSIM from $0.891$ to $0.905$ over the prior state-of-the-art method at matched latency.
Introduction
Diffusion generation quality has improved, but sequential denoising makes high-resolution image and video synthesis costly. EpaCache addresses cache-reuse errors by allocating reuse tolerance according to timestep-dependent downstream impact.
- Sequential multi-step sampling repeatedly evaluates large networks, making latency, memory use, and computation costly for high-resolution generation.
- Caching reduces inference cost by reusing outputs or intermediate computations across adjacent timesteps without modifying model weights.
- Cache errors can propagate through later denoising steps, with earlier or particularly sensitive timesteps producing larger final deviations.
- EpaCache calibrates each timestep’s downstream impact using isolated reuse perturbations, then assigns smaller tolerances to high-impact steps and larger tolerances to low-impact steps.
- Experiments show improved latency–fidelity trade-offs across acceleration budgets and generative models compared with prior caching baselines.
Related Work
Diffusion acceleration methods reduce sampling steps, evaluation cost, or redundant computation. Cache-based approaches increasingly use lightweight temporal proxies, but differ in representation and granularity.
- Solver-based methods redesign sampling trajectories, while distillation and quantization reduce evaluation count or per-evaluation cost.
- Cache-based acceleration reuses outputs or intermediate features across nearby timesteps to exploit temporal redundancy.
- Adaptive methods schedule refreshes or approximate skipped features using online probes, Taylor forecasts, or evolving input–output relationships.
- Proxy-based methods estimate temporal variation with timestep-modulated inputs, accumulated residual-error ratios, spectrally aligned representations, or block-feature comparisons.
Methods
EpaCache combines timestep-specific error-propagation-aware thresholds with a lightweight local-variation proxy for online residual reuse. It calibrates downstream impact, allocates a fixed mean tolerance across timesteps, and refreshes computations when accumulated variation exceeds the applicable threshold.
- Error-Propagation-Aware Cache Budget Allocation: EpaCache calibrates each cacheable timestep’s downstream impact by injecting residual reuse and measuring final-state deviation against a full-computation reference.The calibration replaces one timestep’s computation while retaining later full computations, then averages relative L1 deviation over prompts.
- Error-Propagation-Aware Cache Budget Allocation: The first sampling step is excluded because no preceding residual exists, and the last is fully computed to prevent severe quality degradation.
- Error-Propagation-Aware Cache Budget Allocation: High-impact timesteps receive smaller reuse thresholds, while low-impact timesteps receive larger thresholds under the same global mean threshold.The inverse-normalized allocation weights preserve the mean reuse threshold and discriminate more finely among low-deviation timesteps.
- Online Cache Decision: During online inference, EpaCache reuses the cached residual when accumulated local variation satisfies the timestep-specific threshold; otherwise, it recomputes the transformer and refreshes the residual.
- Local Variation Proxy and Residual Reuse: The timestep-modulated proxy represents the noisy transformer input and estimates local temporal variation with relative ℓ1 distance.This inexpensive signal measures how much the model state changes between consecutive diffusion iterations.
Experiments
Experiments across image and video models show that EpaCache improves the efficiency–fidelity trade-off over caching baselines, while ablations confirm the value of propagation-aware allocation and local variation signals.
- Text-to-image generation: EpaCache achieves the lowest latency while maintaining the best overall fidelity on FLUX.1-dev at approximately 70% skip rate.At approximately 50% skip rate, it attains the best PSNR, tied-best SSIM, and comparable LPIPS with latency comparable to SeaCache.
- Text-to-video generation: 30.47 PSNR at 212.88 s demonstrates EpaCache’s strong Wan2.1-1.3B efficiency–fidelity trade-off.It outperforms SeaCache in fidelity at similar latency and NaviCache in PSNR despite slightly lower latency.
- Text-to-video generation: 286.11 s versus 290.69 s shows EpaCache is faster than SeaCache on HunyuanVideo while improving PSNR, SSIM, and LPIPS.The overall comparison covers both Wan2.1-1.3B and HunyuanVideo.
- Qualitative comparison: Qualitative comparisons show EpaCache better preserves image semantics and perceptual quality than competing methods at matched skip rates.On video, baseline methods exhibit facial-expression deviations or semantic changes in representative frames.
- Ablation study: Minimum 50% Lt substantially degrades performance, showing that local variation is needed to identify stale cached features.Reverse Lt also performs worse, while Slash remains inferior to the error-propagation-aware threshold strategy.
- Calibration sensitivity: N = 5 substantially degrades reconstruction fidelity, while N = 1 can be competitive but produces a highly prompt-dependent impact profile.The default calibration setting uses 20 prompts.
- Cache decision visualization: EpaCache reaches 3.82× speedup at a 74.7% skip rate by distributing refreshes across multiple influential regions.TeaCache uses 3.21× speedup and 70.0% skip rate, while SeaCache uses 3.68× and 74.0%.
Conclusion
EpaCache is a training-free caching policy that calibrates timestep-wise error propagation and adapts reuse thresholds across diffusion trajectories. Experiments on FLUX.1-dev, Wan2.1, and HunyuanVideo show improved latency–quality trade-offs without retraining or architectural modifications.
- Conclusion: EpaCache calibrates timestep-wise propagation impacts through isolated cache-reuse perturbations and converts them into an adaptive threshold schedule.Sensitive timesteps receive conservative refreshes, while less impactful timesteps allow more aggressive reuse.
- Conclusion: Experiments across FLUX.1-dev, Wan2.1, and HunyuanVideo demonstrate consistently improved latency–quality trade-offs over caching baselines.The comparisons use comparable realized computation budgets.
- Conclusion: Error-propagation-aware cache allocation can integrate into existing cache controllers without model retraining or architectural modifications.
A Overhead of Error-Propagation Profiling
EpaCache profiles downstream cache-reuse effects from a reference trajectory and uses the resulting timestep impacts to construct its reuse schedule. Profiling excludes the first and last denoising steps from cacheable timesteps and can be parallelized across prompts and timesteps.
- Profiling procedure: The error-propagation-aware profile is constructed once per model and adapted to different threshold configurations.
- Profiling procedure: Each calibration run reuses the residual from timestep s at s−1 and executes only the remaining T −s denoising steps.A full-step inference first provides the reference trajectory.
- Cacheable timesteps: The first and last denoising steps are excluded from caching because the first lacks a preceding residual and the last is always recomputed for final quality.
- Cost model: T = 50 is typically used for FLUX.1-dev, Wan2.1, and HunyuanVideo when standard inference costs T c_step.
- Calibration overhead: 24.52 standard-inference equivalents are required for one profiling prompt, while N = 20 requires approximately 490.4 equivalents.Profiling runs are independent across timesteps and prompts and can be parallelized.
B Optimization: Reducing Profiling Overhead with Sparse-Step Interpolation
EpaCache’s offline error-propagation profiling adds practical overhead because it requires timestep-wise cache-injection runs. Sparse-step calibration reduces this burden by interpolating propagation profiles for uncalibrated steps while preserving stable latency–quality trade-offs.
- Offline profiling requires cache-injection runs across multiple cacheable timesteps, limiting EpaCache’s practical applicability.
- Sparse-step calibration explicitly profiles only a subset of cacheable timesteps and interpolates the remaining final-deviation allocations.
- Tested interpolation ratios range from 1/2 to 1/10, where 1/k calibrates one of every k timesteps.
- Across tested ratios and global thresholds, interpolated profiles maintain stable latency and reconstruction quality while reducing profiling overhead.
C Dimension-Level VBench Evaluation on HunyuanVideo
On HunyuanVideo, EpaCache remains competitive across VBench semantic and quality dimensions. It ranks strongly among caching methods, especially on quality-related measures and several individual dimensions.
- Aggregate VBench Results: 80.37 is EpaCache’s overall VBench score, compared with 81.11 for the original 50-step model and 80.95 for the original 25-step model.
- Semantic Dimensions: 70.01 is EpaCache’s Semantic Score, 0.67 points below the 50-step original and second-highest among caching methods.
- Semantic Dimensions: 79.11 is EpaCache’s highest Object Class score among caching methods, while its Human Action score matches the original at 92.00.
- Quality Dimensions: 83.28 is EpaCache’s Quality Score, only 0.44 points below the 50-step original model.
- Rankings: 1.93 is EpaCache’s best average rank among caching methods across Quality dimensions, while its overall average rank is 2.28.
D Effectiveness of the Dynamic Degree
Qualitative examples indicate that explicitly accounting for error propagation helps EpaCache reduce visible structural drift under cache reuse.
- EpaCache’s qualitative examples show reduced visible structural drift under cache reuse.
- The examples include rear-view vehicle layout and train–surfboard spatial relationship, silhouette, and viewpoint.
- These examples connect error-propagation-aware caching with preservation of structural relationships and viewpoint.
Metric
Dynamic Degree measures noticeable motion, but it does not reliably capture semantic preservation or visual fidelity. The evaluation therefore compares it with reference-fidelity and other quality metrics.
- Dynamic Degree measures whether generated video contains sufficiently noticeable motion.
- Cache-induced errors may cause temporal flicker, semantic drift, or perceptual degradation that Dynamic Degree does not consistently reflect.
- EpaCache scores lower on Dynamic Degree but higher on PSNR, SSIM, LPIPS, Subject Consistency, and Motion Smoothness.
- Dynamic Agreement indicates that EpaCache better preserves the uncached reference’s motion decisions.
- Qualitative comparisons report better overall perceptual quality and closer appearance to the uncached reference for EpaCache than TeaCache.
E Supplementary Visualization and Case Study
The supplementary visualization compares EpaCache with the uncached baseline and existing caching methods on FLUX.1-dev, while Table 10 compares Dynamic Degree with other quality metrics.
- Qualitative comparison: EpaCache more faithfully preserves reference composition and object geometry than the uncached baseline in the representative FLUX.1-dev generations.
- Metric comparison: Table 10 compares Dynamic Degree with other quality metrics.
- Qualitative comparison: Figure 11 compares uncached inference with EpaCache, TeaCache, TaylorSeer, and SeaCache on representative FLUX.1-dev generations.Each row uses the same configuration across methods.