VideoGrain: Modulating Space-Time Attention for Multi-grained Video Editing

Xiangpeng Yang, Linchao Zhu, Hehe Fan, Yi Yang
2/12/2026

No official code found. Best implementation: knightyxp/VideoGrain (159 stars, MIT, last commit 2025-03-24).

Abstract

Recent advancements in diffusion models have significantly improved video generation and editing capabilities. However, multi-grained video editing, which encompasses class-level, instance-level, and part-level modifications, remains a formidable challenge. The major difficulties in multi-grained editing include semantic misalignment of text-to-region control and feature coupling within the diffusion model. To address these difficulties, we present VideoGrain, a zero-shot approach that modulates space-time (cross- and self-) attention mechanisms to achieve fine-grained control over video content. We enhance text-to-region control by amplifying each local prompt's attention to its corresponding spatial-disentangled region while minimizing interactions with irrelevant areas in cross-attention. Additionally, we improve feature separation by increasing intra-region awareness and reducing inter-region interference in self-attention. Extensive experiments demonstrate our method achieves state-of-the-art performance in real-world scenarios. Our code, data, and demos are available at https://knightyxp.github.io/VideoGrain_project_page/

View on arXivView PDF

Code Implementations(1)

MIT

[ICLR 2025] VideoGrain: This repo is the official implementation of "VideoGrain: Modulating Space-Time Attention for Multi-Grained Video Editing"

1599C++, CMakeNov 23, 20241 years agoMIT
diffusion-modelsiclr2025stable-diffusiontext-to-videovideo-editing+1 more

Similar Papers

Cite this paper

@article{yang2026videograin,
  title  = {VideoGrain: Modulating Space-Time Attention for Multi-grained Video Editing},
  author = {Xiangpeng Yang and Linchao Zhu and Hehe Fan and Yi Yang},
  year   = {2026},
  eprint = {2502.17258},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.17258},
  journal = {ICLR 2025 2025}
}

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.17258.svg)](https://codeofpaper.com/paper/2502.17258)

Discussion