🤖 AI Summary
This study addresses the prohibitive computational overhead of attention mechanisms in video diffusion models caused by high spatial resolution and long temporal sequences. We propose a training-free mixed-precision attention optimization framework that leverages low-resolution draft frames as guidance. By jointly optimizing block selection and precision allocation, the method theoretically decouples sparsification and quantization errors to expand the performance Pareto frontier. For efficient deployment, it integrates spatial pooling statistics, a shared sorting mechanism, and a single-kernel operator supporting multi-precision fusion. Experimental results demonstrate that this framework significantly improves the trade-off between generation quality and efficiency. Notably, in few-step generation scenarios, combining 4-bit and 8-bit mixed precision yields substantial inference acceleration while preserving visual fidelity.
📝 Abstract
Video generation has broad applications in content creation and entertainment. Diffusion transformers have advanced the quality of generated videos, but attention over spatiotemporal tokens becomes increasingly expensive as video resolution and duration increase. We present DraftAttention2, a training-free framework that uses the low-resolution draft attention map to jointly select attention blocks and assign their numerical precision. Specifically, spatial 2D average- and max-pooled queries and keys capture complementary regional statistics to estimate block importance, and a shared ranking assigns higher precision to important blocks, lower precision to less important retained blocks, and skips the rest under configurable budgets. Our analysis separates sparsification error from attention-weighted quantization error, establishing when recovering skipped interactions with low-bit computation tightens the output-error bound. This analysis motivates retaining more interactions at low precision while reserving higher precision for blocks with larger attention mass. To translate these fine-grained assignments into practical speedups, we further develop fused operand preparation and a single attention kernel with precision-specific phases, sharing data movement, softmax statistics, and output accumulation across precisions. Experiments demonstrate that our method achieves a superior quality-efficiency trade-off over existing efficient video generation methods. Notably, its advantage is particularly pronounced for few-step video diffusion, where jointly combining sparsity with 4- and 8-bit mixed-precision computation substantially improves generation quality while retaining significant acceleration. Code is available at https://github.com/anemoi-project/anemoi