Abstract
Diffusion Transformers (DiTs) have established a new state-of-the-art in high-fidelity media generation, yet their deployment is hindered by significant computational costs and sequential dependencies. We present SpeCa, a "forecast-then-verify" framework designed to accelerate DiTs by up to 7.3x. By utilizing a lightweight draft model to predict future feature states and a surgical verification mechanism to prevent error propagation, SpeCa achieves substantial speedups in image and video generation. Unlike previous caching methods that suffer from "quality collapse" at high acceleration ratios, SpeCa maintains high fidelity across diverse architectures including FLUX.1 and HunyuanVideo.
Introduction
Diffusion models (DMs) are the backbone of modern generative AI, but their iterative nature makes them notoriously slow. Each generation requires a sequence of denoising steps where step $t-1$ depends strictly on the output of step $t$. Furthermore, modern architectures like FLUX or HunyuanVideo involve massive transformers that require hundreds of trillions of floating-point operations per step.
Existing acceleration strategies often rely on "feature caching," where computations from previous steps are reused to skip current ones. However, as the gap between timesteps increases to achieve higher speeds, these reused features become increasingly inaccurate. This leads to a phenomenon known as quality collapse, where the structural integrity and fine details of the generated media vanish. SpeCa addresses this by introducing speculative decoding principles to the diffusion process.
The SpeCa Framework: Forecast-then-Verify
SpeCa replaces traditional step-by-step execution with a three-stage workflow designed to balance speed and accuracy:
1. Strategic Computation
The model performs a full, high-fidelity forward pass only at specific "key" timesteps. These steps serve as the ground-truth anchors for the subsequent speculative phases.
2. Feature Forecasting (The Draft Model)
Rather than simply reusing static features from the past, SpeCa employs TaylorSeer, a training-free draft model. TaylorSeer utilizes Taylor series expansion to model the trajectory of feature evolution, predicting how features will change over the next $N$ timesteps. This "look-ahead" capability allows the model to maintain accuracy even at high acceleration ratios where static caching fails.
3. Efficient Verification and Adaptive Thresholding
To prevent the accumulation of errors, SpeCa implements a lightweight verification check. It measures the L2-distance (error) of the predicted features at a specific deep layer. If the error falls below a threshold, the prediction is accepted, and the heavy computation for that step is skipped. If the error is too high, the prediction is rejected, and the model resumes a full forward pass.
Crucially, SpeCa uses an adaptive threshold. It allows for more speculation (higher error tolerance) during the early, noisy stages of generation and enforces stricter fidelity checks as the model begins to render fine, high-frequency details.
Experimental Evaluation
SpeCa was evaluated across three distinct generative tasks to demonstrate its versatility:
- Text-to-Image: Using FLUX.1-dev on the DrawBench dataset, SpeCa achieved a 6.34x acceleration with only a 5.5% drop in ImageReward. In contrast, previous state-of-the-art methods like TaylorSeer experienced a 17.5% quality loss at the same speed.
- Text-to-Video: On HunyuanVideo, SpeCa reached a 6.1x speedup while maintaining a VBench score of 79.84%, significantly reducing the massive TFLOP requirements of large-scale video models.
- Class-conditional Image Generation: Evaluated on DiT-XL/2 using ImageNet, the framework maintained high fidelity at a 7.3x speedup, effectively overcoming the quality collapse issues that typically plague other methods beyond 3x.
Key Insights
The "Deep Layer" Proxy
A pivotal finding in this research is that errors in the deepest layers of the transformer (e.g., Layer 27 in DiT) have a very strong correlation ($r=0.842$) with the final image quality. This allows SpeCa to verify predictions by inspecting just one layer, keeping the verification overhead extremely low—between 1.75% and 3.5% of a full pass.
Sample-Adaptive Acceleration
SpeCa naturally allocates more computation to complex samples where predictions are more likely to fail verification. On HunyuanVideo, the system accelerated 57.5% of cases by 6.48x while automatically providing more resources to the remaining "hard" cases, ensuring consistent quality across varying prompt complexities.
Conclusion
SpeCa represents a significant step forward in making large-scale diffusion models practical for real-time applications. As a "plug-and-play" solution, it requires no retraining and is compatible with existing architectures. Future work will explore the application of SpeCa to other modalities such as audio and 3D generation, as well as its potential synergy with other optimization techniques like quantization and pruning.
Summary updated