A DiT pipeline repeatedly denoises latent features. Without Cache-DiT, every denoising step runs every transformer block. Cache-DiT wraps the blocks, measures cross-step feature similarity, and reuses cached outputs when the current step is close enough.
Every denoising step recomputes the full transformer stack. This is the baseline behavior and the easiest correctness reference.
Cache-DiT is inserted as a PyTorch-native middleware layer. It first discovers model-specific block layout, maps each block to a known forward pattern, then wraps block forward calls so runtime caching can happen without rewriting the whole model.
DBCache keeps first Fn blocks and last Bn blocks computed. Middle blocks are cacheable: if the L1 residual difference is below threshold τ, reuse previous-step cache; otherwise recompute and refresh the cache.
This is a simplified visual model, not a kernel benchmark. It helps build intuition for why larger cache regions increase speed but also increase quality risk.
Latency examples below are from the Cache-DiT technical report’s FLUX.1-dev, L20, 28-step DBCache configuration table. Lower latency means fewer expensive block forwards were executed.