Abstract
Diffusion Transformers (DiTs) have achieved state-of-the-art performance in high-fidelity image generation but suffer from high computational costs due to their iterative denoising process. We present CorGi, a training-free framework that accelerates DiT inference by identifying and caching low-contribution transformer blocks. By leveraging Centered Kernel Alignment (CKA) to detect redundancy and introducing a salient token protection mechanism (CorGi+), our method achieves up to a 2.02x speedup on models like Stable Diffusion 3.5 Large and FLUX.1-dev while maintaining high perceptual similarity to the original outputs.
Introduction
Diffusion Transformers (DiTs) such as Stable Diffusion 3.5 and FLUX.1 have set new benchmarks for image synthesis. However, their architecture—characterized by massive stacks of transformer blocks—requires dozens of iterative denoising steps, leading to significant latency. Existing acceleration techniques often rely on coarse-grained caching or complex token-wise skipping, which can either cause structural distortions or introduce excessive computational overhead.
CorGi addresses these challenges by introducing a "Goldilocks" solution: a block-wise interval caching strategy that is fine-grained enough to preserve image quality but efficient enough to provide substantial real-world speedups without requiring any retraining.
Methodology
1. CorGi: Contribution-Guided Caching
The core insight behind CorGi is that not all transformer blocks contribute equally at every stage of the denoising process. The framework employs Centered Kernel Alignment (CKA) to measure the similarity of a block's output between consecutive steps. When the change is minimal, the block is deemed "low-contribution."
Instead of re-evaluating these blocks, CorGi caches the outputs of the Attention and Feed-Forward networks for a fixed interval. Crucially, the system continues to update residual connections even when a block is cached. This ensures the "information highway" remains active, preventing the image collapse typically seen in naive caching methods.
2. CorGi+: Salient Token Protection
To prevent the loss of fine details in text-to-image tasks, the authors developed CorGi+. This enhanced version uses cross-attention maps to identify "salient tokens"—pixels that correspond most strongly to the input text prompt. Even if a block is scheduled for caching, CorGi+ performs partial updates on these salient tokens to ensure critical features (like eyes or small objects) remain sharp and accurate.
Key Insights and Results
Spatial and Temporal Specialization
Analysis reveals that transformer blocks are both spatially and temporally specialized. Early "warm-up" steps are critical for establishing global layout, while later steps focus on fine-tuning. Furthermore, different blocks specialize in different image regions; for instance, one block might focus on a primary subject while another handles the background.
Performance Metrics
Evaluated on the MS COCO 2014 validation set, CorGi and CorGi+ demonstrate superior efficiency across multiple architectures:
- Speedup: Achieved a 2.02x speedup on Stable Diffusion 3.5 Large and 1.91x on FLUX.1-dev.
- Fidelity: Using the LPIPS metric, CorGi+ maintains significantly higher consistency with original model outputs compared to existing methods like DeepCache or RAS.
Discussion and Limitations
While CorGi provides a robust, training-free acceleration path, it currently relies on a "warm-up" phase (the first ~20% of steps) where caching is disabled to ensure structural integrity. Future work may focus on optimizing this phase to further increase speedups. Additionally, while the framework is hardware-agnostic, the overhead of managing salient token masks may vary across different GPU architectures.
In conclusion, CorGi demonstrates that by intelligently identifying and skipping redundant computations, we can significantly accelerate state-of-the-art diffusion models without sacrificing the quality that makes them industry leaders.
Summary updated