Attention Surgery: An Efficient Recipe to Linearize Your Video Diffusion Transformer

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ghafoorian, Mohsen, Korzhenkov, Denis, Habibian, Amirhossein
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909907573276672
author Ghafoorian, Mohsen
Korzhenkov, Denis
Habibian, Amirhossein
author_facet Ghafoorian, Mohsen
Korzhenkov, Denis
Habibian, Amirhossein
contents Transformer-based video diffusion models (VDMs) deliver state-of-the-art video generation quality but are constrained by the quadratic cost of self-attention, making long sequences and high resolutions computationally expensive. While linear attention offers sub-quadratic complexity, previous approaches have failed to match the expressiveness of softmax attention unless retrained at significant computational cost. We introduce Attention Surgery, an efficient framework that enables linear or hybrid attention in pretrained VDMs, eliminating the need for training from scratch. Inspired by recent advances in language models, our method combines a novel hybrid attention mechanism-mixing softmax and linear tokens-with a lightweight distillation and fine-tuning pipeline requiring only a few GPU-days. Additionally, we incorporate a cost-aware block-rate strategy to balance expressiveness and efficiency across layers. Applied to Wan2.1 1.3B, a state-of-the-art efficient transformer VDM and evaluated on VBench, VBench2.0 and a human preference study, Attention Surgery achieves competitive results. Furthermore, measurements of on-mobile latency, memory usage, and FLOPs demonstrate notable improvements in scaling behavior for longer videos. Project page is available at: https://qualcomm-ai-research.github.io/attention-surgery.
format Preprint
id arxiv_https___arxiv_org_abs_2509_24899
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Attention Surgery: An Efficient Recipe to Linearize Your Video Diffusion Transformer
Ghafoorian, Mohsen
Korzhenkov, Denis
Habibian, Amirhossein
Computer Vision and Pattern Recognition
Transformer-based video diffusion models (VDMs) deliver state-of-the-art video generation quality but are constrained by the quadratic cost of self-attention, making long sequences and high resolutions computationally expensive. While linear attention offers sub-quadratic complexity, previous approaches have failed to match the expressiveness of softmax attention unless retrained at significant computational cost. We introduce Attention Surgery, an efficient framework that enables linear or hybrid attention in pretrained VDMs, eliminating the need for training from scratch. Inspired by recent advances in language models, our method combines a novel hybrid attention mechanism-mixing softmax and linear tokens-with a lightweight distillation and fine-tuning pipeline requiring only a few GPU-days. Additionally, we incorporate a cost-aware block-rate strategy to balance expressiveness and efficiency across layers. Applied to Wan2.1 1.3B, a state-of-the-art efficient transformer VDM and evaluated on VBench, VBench2.0 and a human preference study, Attention Surgery achieves competitive results. Furthermore, measurements of on-mobile latency, memory usage, and FLOPs demonstrate notable improvements in scaling behavior for longer videos. Project page is available at: https://qualcomm-ai-research.github.io/attention-surgery.
title Attention Surgery: An Efficient Recipe to Linearize Your Video Diffusion Transformer
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2509.24899