TL;DR
Researchers have developed CEM (Cumulative Error Minimization), a training-free, plug-and-play plugin that accelerates Diffusion Transformers (DiTs) by optimizing their caching strategies. By using offline error modeling and dynamic programming, CEM achieves significant speedups while maintaining—and sometimes even exceeding—the generation quality of the original models.
What Problem Does This Paper Address?
Diffusion Transformers (DiTs) like FLUX.1 and OpenSora are the current state-of-the-art for generating high-fidelity images and videos. However, they are notoriously slow because they require dozens of iterative "denoising" steps to turn random noise into a coherent image.
To fix this, researchers often use caching: instead of recomputing every layer at every step, they reuse (cache) hidden states from previous steps. While this is fast, it introduces "caching error" that accumulates over time, leading to blurry images or warped video motion. Existing caching methods usually use a "one-size-fits-all" strategy (like caching every 3rd step), which ignores the fact that some parts of the denoising process are much more sensitive to errors than others.
Methods
The authors introduce CEM, which treats acceleration as an optimization problem. It consists of three main stages:
- Offline Error Modeling: Before any real images are generated, the system "stress tests" the DiT model using a small set of random samples. It measures how much the output deviates when different cache intervals are used at different timesteps. This creates a "sensitivity map" of the model.
- Cumulative Error Approximation: Because errors in diffusion models don't just add up—they propagate and compound—the authors use a cumulative integral (CUMSUM) to estimate how a small error early on will affect the final result.
- Dynamic Caching Strategy: Using the sensitivity map, CEM employs a Dynamic Programming (DP) algorithm. Given a specific "speed budget" (e.g., "I want this 2x faster"), the DP finds the mathematically optimal sequence of caching intervals that results in the lowest possible cumulative error.
Because the sensitivity of a model is intrinsic to its architecture (not the specific prompt), this optimization only needs to be done once per model and adds zero computational overhead during actual inference.
Datasets
The authors validated CEM across nine different models and three major tasks:
- Text-to-Image: Evaluated on MS-COCO 2017 and DrawBench using models like FLUX.1-dev, PixArt-α, and StableDiffusion 1.5.
- Text-to-Video: Evaluated on VBench (a comprehensive video benchmark) using Hunyuan Video, Wan2.1, and OpenSora.
- Class-to-Image: Evaluated on ImageNet using DiT-XL/2.
Key Insights and Ideas
- Architecture over Content: A key "aha moment" is that a model’s sensitivity to caching is content-agnostic. Whether you are generating a cat or a car, the model's "weak points" in the denoising timeline remain the same. This allows for the highly efficient offline modeling approach.
- Non-Linear Sensitivity: The paper reveals that caching error doesn't grow linearly. For example, in the FLUX.1 model, an "anomalously high" error occurs specifically during the middle denoising steps if a certain interval is used. CEM identifies and avoids these "danger zones."
- Synergy with Quantization: CEM isn't just for standard models; it can be layered on top of quantized models (which are already compressed). It successfully doubled the speed of Q-DiT while actually improving its visual fidelity.
Key Results
The results are impressive because CEM often acts as a "free lunch" for performance:
- Fidelity Boost: When integrated into existing acceleration frameworks (like TaylorSeer or ToCa), CEM significantly reduced FID (lower is better). On PixArt-α, it improved the FID by 13.99 compared to the baseline acceleration method.
- Surpassing the Original: In several cases, accelerated models using CEM actually achieved higher fidelity scores than the original, unaccelerated models (e.g., on FLUX.1-dev and Hunyuan).
- Video Consistency: For video generation, CEM significantly reduced "viewpoint shifts" and temporal flickering that usually plague fast video models, leading to much smoother motion.
Limitations and Future Work
While CEM is a powerful plugin, the authors note a few areas for growth:
- Gap with Training-based Methods: While CEM is the best in the "training-free" category, it still generally lags behind heavy-duty "distillation" methods (where a model is specifically retrained to be fast).
- One-Step Models: The current framework is designed for multi-step iterative denoising. It hasn't yet been adapted for "one-step" generation models, which represent the extreme end of the speed spectrum.
- Pruning Integration: The authors suggest that their offline modeling could eventually be used to guide "pruning" (removing neurons) rather than just caching, which could lead to even leaner models.
Summary updated