AutoTarget:面向少步蒸馏 DiT 的缓存目标选择方法
Rethinking What to Cache in Few-Step Diffusion Transformers: Solver-Aware Target Selection
蒸馏后的 DiT 缓存加速容易掉质量,这篇论文给出按模型和求解器自动挑缓存目标的办法,还放了代码,做生图生视频加速的可以试试。
少步蒸馏后的 Diffusion Transformer 相邻采样步间隔更大,缓存复用张量会引入更多误差。论文提出 AutoTarget,通过少量无缓存的运行测量每个候选张量的复用误差,按模型、求解器和复用节奏选出误差最低的缓存目标。在 PixArt-LCM 和 FLUX.1-schnell 上的实验显示,最优缓存目标随模型、分辨率和求解器变化,AutoTarget 的校准排序与保留集上的真实缓存运行一致。该方法减少了 DiT 前向评估次数和缓存存储,生成质量接近未缓存运行,代码已在 GitHub 开源。
Rethinking What to Cache in Few-Step Diffusion Transformers: Solver-Aware Target Selection
Diffusion Transformers (DiTs) can generate high-quality images and videos, but generating each sample requires multiple costly DiT forward passes. Two common ways to accelerate DiT sampling are step distillation, which reduces the number of sampling steps, and caching, which skips some DiT evaluations by reusing a tensor computed at an earlier step. Most caching methods decide in advance which tensor to reuse. After distillation, adjacent sampling steps are farther apart. Reusing a tensor across this larger gap introduces more error, so choosing what to cache becomes especially important. We therefore introduce AutoTarget, a method that chooses the cached tensor for a given model, solver, and reuse schedule. AutoTarget uses a small set of runs without cache reuse to measure the error caused by reusing each candidate tensor, then selects the candidate with the lowest error. We also analyze how an error at one reuse step affects the final sample. For Euler sampling, we identify cache targets that produce the same trajectory and show why a stored solver update may not. Experiments on distilled image and video DiTs show that the best cache target changes with the model, image resolution, and solver. AutoTarget reduces DiT evaluations and retained cache storage. Generation quality remains close to the corresponding uncached run. On the tested PixArt-LCM and FLUX.1-schnell settings, its calibration ranking matches the ranking from held-out cached runs. To help others reproduce the method, we provide its core implementation on GitHub at https://github.com/wali1024-offical/AutoTarget.