AdaFlow: Efficient Long Video Editing via Adaptive Attention Slimming And Keyframe Selection

Shuheng Zhang, Yuqi Liu, Hongbo Zhou, Jun Peng, Yiyi Zhou +2 more
2/8/2025
cs.CV

Official code: jidantang55/AdaFlow (9 stars, last commit 2025-09-16).

Abstract

Despite great progress, text-driven long video editing is still notoriously challenging mainly due to excessive memory overhead. Although recent efforts have simplified this task into a two-step process of keyframe translation and interpolation generation, the token-wise keyframe translation still plagues the upper limit of video length. In this paper, we propose a novel and training-free approach towards efficient and effective long video editing, termed AdaFlow. We first reveal that not all tokens of video frames hold equal importance for keyframe translation, based on which we propose an Adaptive Attention Slimming scheme for AdaFlow to squeeze the $KV$ sequence, thus increasing the number of keyframes for translations by an order of magnitude. In addition, an Adaptive Keyframe Selection scheme is also equipped to select the representative frames for joint editing, further improving generation quality. With these innovative designs, AdaFlow achieves high-quality long video editing of minutes in one inference, i.e., more than 1$k$ frames on one A800 GPU, which is about ten times longer than the compared methods, e.g., TokenFlow. To validate AdaFlow, we also build a new benchmark for long video editing with high-quality annotations, termed LongV-EVAL. Our code is released at: https://github.com/jidantang55/AdaFlow.

View on arXivView PDF

Code Implementations(1)

90PythonSep 28, 20241 years ago

Similar Papers

Cite this paper

@article{zhang2025adaflow,
  title  = {AdaFlow: Efficient Long Video Editing via Adaptive Attention Slimming And Keyframe Selection},
  author = {Shuheng Zhang and Yuqi Liu and Hongbo Zhou and Jun Peng and Yiyi Zhou and Xiaoshuai Sun and Rongrong Ji},
  year   = {2025},
  eprint = {2502.05433},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.05433v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.05433.svg)](https://codeofpaper.com/paper/2502.05433)

Discussion