TL;DR
TACache (Trajectory-Aware Cache) is a training-free acceleration framework that significantly speeds up rectified flow and diffusion models for image and video generation. By decomposing velocity acceleration into independent magnitude and directional components, it intelligently skips redundant timesteps and accurately reconstructs skipped states without extra model evaluations. This approach achieves up to a 4.14× speedup on text-to-image and a 2.11× speedup on text-to-video tasks while maintaining superior visual fidelity compared to prior caching methods.
What Problem Does This Paper Address?
State-of-the-art diffusion and rectified flow (RF) models generate stunning, high-fidelity images and videos, but their iterative sampling process is computationally brutal. Producing a single sample requires dozens of expensive network evaluations along a trajectory, which becomes a massive bottleneck for high-resolution images and long videos.
To solve this, researchers use cache-based methods—evaluating the full model only at key steps and reusing features or residuals for skipped steps. However, existing caching methods approximate trajectory dynamics coarsely. They collapse magnitude changes and directional drift into a single pathway. As the skip interval grows, this coupled error accumulates rapidly, leading to severe quality degradation, structural distortions, and texture collapse under aggressive acceleration.
Methods
The authors introduce TACache, which operates on a "skip-then-compensate" paradigm across two stages: offline calibration and online inference.
- Parallel-Orthogonal Velocity Decomposition (POVD): Instead of treating feature changes as a generic block, TACache geometrically decomposes the discrete velocity acceleration into two components relative to the current velocity: a parallel component (capturing scalar magnitude changes) and an orthogonal residual (capturing directional drift).
- Stable Step Calculator (SSC) [Offline]: The authors discovered that these magnitude and direction indicators are highly consistent across different samples. SSC uses these stable offline statistics to pre-compute a safe skip schedule by ensuring that cumulative variations don't exceed separate, independent thresholds ($\tau_k$ and $\tau_d$).
- Trajectory-Aware Skip-Update (TASU) [Online]: During generation, when a step is skipped, TASU reconstructs the velocity field. It combines the calibrated offline scalar statistics with the sample's own historical orthogonal direction (re-orthogonalized at each step to maintain geometric consistency). This allows accurate reconstruction without running the full model.
Datasets
The method was evaluated across three representative rectified flow generative models:
- BAGEL (Text-to-Image)
- FLUX.1-dev (Text-to-Image)
- Wan2.1-1.3B (Text-to-Video)
Calibration sets were built using prompts from WISE (60 prompts for T2I) and InternVid-10M-FLT (30 prompts for T2V), as well as CompBench. Evaluation benchmarks included GenEval (for text-to-image alignment) and VBench (for video quality and consistency).
Key Insights and Ideas
- Dual Stability: The per-timestep statistics for both magnitude change and directional drift are remarkably consistent across entirely different prompts and evolve smoothly along the trajectory. This justifies using a fixed, population-level offline calibration to guide online skipping.
- Direction Matters More Than Magnitude: Ablation studies revealed that controlling directional drift provides the most significant correction to generation quality. Reusing features without accounting for the turning direction of the velocity field is the primary driver of structural collapse.
- Component-Wise Error Control: By separating the error bounds into magnitude error, orthogonal strength error, and direction alignment error, the framework can apply independent thresholds. This prevents a loose threshold on a stable component from being ruined by a volatile one.
Key Results
- Text-to-Image (T2I): On BAGEL, TACache achieved a 4.14× speedup while actually improving the GenEval score from 86.31% (baseline) to 87.32%. On FLUX.1-dev, it achieved a 3.99× speedup and improved PSNR by more than 4 dB over the next-best accelerated method.
- Text-to-Video (T2V): On Wan2.1-1.3B, it delivered a 2.11× speedup (reducing latency to 121.60s), outperforming baselines like MagCache and TeaCache in reference-based fidelity metrics (PSNR of 25.19 dB vs MagCache's 23.82 dB).
- Qualitative Quality: TACache successfully avoids typical failure modes of aggressive caching, such as texture noise, missing semantic cues, and motion incoherence in videos.
Limitations and Future Work
- While the historical direction estimate provides a consistently positive alignment signal, it is still far from a perfect match to the true oracle direction.
- The authors plan to extend TACache to longer video generation tasks where computational demands are even more severe.
- Future work will also explore combining TACache with distillation-based samplers (like consistency models) to compound acceleration gains.
Summary updated