TL;DR
Generating high-resolution images and videos with Diffusion Transformers (DiTs) is painfully slow, and existing shortcuts—like caching and reusing neural network features—rely on shortsighted, step-by-step guesses that fall apart when prompts get complicated. Map-Guided Caching acts like a GPS for image generation: before denoising even begins, it looks at the prompt and initial noise to predict a complete "traffic map" of feature changes, planning a globally optimal route of what to compute and what to skip. The result is up to a 3.3× speedup on massive image and video models without sacrificing fine details—even on rich, complex prompts.
What Problem Does This Paper Address?
Diffusion Transformers (DiTs) are the engines behind stunning modern image and video generators, like FLUX and HunyuanVideo. Their catch? Generating a single sample requires running a deep transformer network dozens of times iteratively to turn static noise into a crisp visual.
To speed this up without the massive cost of retraining or distilling the model, researchers use feature caching: if a transformer block’s output at step 5 looks nearly identical to step 4, why recompute it? Just reuse the cached result! However, current caching methods make greedy, local decisions based only on immediate history (like driving while looking only ten feet ahead of your bumper). While this works for simple prompts like "a little cat", complex, descriptive prompts create turbulent, unpredictable shifts across different blocks and timesteps. A quiet moment at step 4 doesn't guarantee stability at step 6, causing local heuristics to reuse features prematurely, accumulate errors, and ruin the final output.
Methods
Instead of improvising step-by-step, the authors treat feature caching as a global path-planning problem using three novel components:
- Temporal Variation Map (TVMap): A 2D grid (blocks $\times$ timesteps) quantifying how much each block's features change between consecutive steps. High-dimensional features are compressed via Principal Component Analysis (PCA) so their step-to-step $\ell_1$ change rate is easy to measure.
- Lightweight Map Predictor: Of course, you can't run the whole model just to build the map! So, the authors repurpose the target model's frozen first DiT block—the only block that sees both initial noise and full text conditioning—and attach a tiny MLP adapter. Trained in just ~2 hours on a single H100 GPU, it predicts the entire TVMap before generation starts.
- Two-Stage Global Planner:
- Orientation Planner: Uses dynamic programming to find the path of least resistance (lowest feature variation) from the first block/timestep to the end. Moving "right" computes the next block; moving "down" reuses a cached block in the next timestep, skipping intermediate blocks.
- Quantity Planner: Ranks all candidate "reuse" moves and activates the safest ones until hitting the user's exact target speedup budget.
For video generation, the predictor outputs a map per latent frame. The framework simply queries three key frames (first, middle, and last) and takes their element-wise maximum—ensuring a region is only cached if all key frames agree it is stable.
Datasets
- Training: Only 1,000 generated samples from the target model are needed to train the Map Predictor. For images, prompts are drawn from a custom, diversity-balanced 100-category taxonomy (10 prompts per category).
- Evaluation: PartiPrompts (1,632 prompts) for image generation, plus GenEval and ELLA in ablations; GEdit-Bench (606 samples) for image editing; and VBench (1,892 videos) for video generation.
- New Benchmark Subset: The authors construct a Long-prompt Subset comprising the top 30% longest, most descriptive prompts from existing image and video datasets to stress-test caching under turbulent temporal dynamics.
Key Insights and Ideas
- Prompt complexity physically reshapes denoising trajectories: Shorter prompts produce smooth, dark TVMaps (high redundancy), whereas longer prompts light up the map with irregular, heterogeneous spikes across blocks and timesteps—explaining why static rules fail in realistic scenarios.
- The first block already knows the future: You don't need to relearn language semantics from scratch to predict model dynamics; a tiny readout on top of the frozen first DiT block generalizes remarkably well with just 1,000 training examples.
- Semantic diversity beats random sampling: Curating those 1,000 training prompts across a structured 100-category taxonomy boosts image reconstruction quality by nearly 4 dB in PSNR compared to random sampling.
Key Results
Tested on a single NVIDIA H100 GPU, Map-Guided Caching consistently outperforms leading baselines like TeaCache, MagCache, FORA, and TaylorSeer:
- Image Generation (FLUX.1 [dev]): Reaches a 3.3× speedup (cutting latency from 14.98s to 4.53s) with 23.11 PSNR and 0.7935 SSIM—beating slower baselines like MagCache-fast (2.8×, 12.04 PSNR) and TeaCache-fast (2.4×, 18.79 PSNR). Qualitatively, it avoids missing hats, altered ingredients, and shifted camera angles seen in competitors.
- Image Editing (FLUX.1 Kontext [dev]): Achieves a 2.7× speedup (31.19s down to 11.56s) while scoring highest in overall VIEScore (6.453).
- Video Generation (HunyuanVideo): Hits a 3.3× speedup (slashing generation from 28.53 minutes to 8.44 minutes for 129-frame 720p videos) while maintaining an 80.46% VBench score (vs. 80.55% unaccelerated) and 32.96 PSNR.
- Complex Prompts: On the Long-prompt Subset, competing methods degrade sharply, while Map-Guided Caching holds rock-steady (dropping less than 0.4 dB PSNR on FLUX.1).
Limitations and Future Work
- Data collection storage overhead: While training the predictor takes only two hours, generating the 1,000 training trajectories requires saving high-dimensional intermediate features from the target model, creating temporary storage overhead.
- Error accumulation over long skips: Low variation between adjacent steps doesn't mean zero variation; tiny, structured changes can still compound over repeated cache reuses and cause subtle artifacts. The authors suggest exploring error compensation mechanisms, alongside adaptive key-frame selection for videos, in future work.
Summary updated