Skip to main content
QUICK REVIEW

[Paper Review] Swap Attention in Spatiotemporal Diffusions for Text-to-Video Generation

Wenjing Wang, Huan Yang|arXiv (Cornell University)|May 18, 2023
Generative Adversarial Networks and Image SynthesisComputer Science19 citations
TL;DR

VideoFactory introduces Swapped Spatiotemporal Cross-Attention (Swap-CA) in a 3D-window diffusion framework to jointly model space and time for open-domain text-to-video generation, and trains on HD-VG-130M to achieve high-definition, watermark-free 16:9 videos.

ABSTRACT

With the explosive popularity of AI-generated content (AIGC), video generation has recently received a lot of attention. Generating videos guided by text instructions poses significant challenges, such as modeling the complex relationship between space and time, and the lack of large-scale text-video paired data. Existing text-video datasets suffer from limitations in both content quality and scale, or they are not open-source, rendering them inaccessible for study and use. For model design, previous approaches extend pretrained text-to-image generation models by adding temporal 1D convolution/attention modules for video generation. However, these approaches overlook the importance of jointly modeling space and time, inevitably leading to temporal distortions and misalignment between texts and videos. In this paper, we propose a novel approach that strengthens the interaction between spatial and temporal perceptions. In particular, we utilize a swapped cross-attention mechanism in 3D windows that alternates the "query" role between spatial and temporal blocks, enabling mutual reinforcement for each other. Moreover, to fully unlock model capabilities for high-quality video generation and promote the development of the field, we curate a large-scale and open-source video dataset called HD-VG-130M. This dataset comprises 130 million text-video pairs from the open-domain, ensuring high-definition, widescreen and watermark-free characters. A smaller-scale yet more meticulously cleaned subset further enhances the data quality, aiding models in achieving superior performance. Experimental quantitative and qualitative results demonstrate the superiority of our approach in terms of per-frame quality, temporal correlation, and text-video alignment, with clear margins.

Motivation & Objective

  • Motivate high-quality open-domain video generation beyond frame-wise image backbones.
  • Explore joint spatiotemporal modeling to reduce temporal distortions and improve text-video alignment.
  • Develop a scalable, watermark-free video generation pipeline with high-definition output.
  • Create a large-scale training corpus (HD-VG-130M) to support open-domain video synthesis.

Proposed method

  • Propose Swapped Spatiotemporal Cross-Attention (Swap-CA) in 3D windows to enable reciprocal interaction between spatial and temporal features.
  • Use a latent diffusion framework with a spatiotemporal U-Net for 3D noise prediction.
  • Incorporate Swap-CA at block boundaries and use 3D window attention to balance performance and efficiency.
  • Construct a large-scale 130M-text-video-pair dataset (HD-VG-130M) from open-domain sources with BLIP-2 captions for training.
  • Apply a 2× spatial upscaling and a Real-ESRGAN-based super-resolution module to achieve 1376×768 outputs.
  • Train with joint data from HD-VG-130M and WebVid-10M to improve generalization to diverse textual prompts.
Figure 1 : The paradigm of Swapped Spatiotemporal Cross-Attention (Swap-CA) in comparison with existing video attention schemes. Instead of only conducting self-attention in (a)-(c), we perform cross-attention between spatial and temporal modules in a U-Net, which encourages more spatiotemporal mutu
Figure 1 : The paradigm of Swapped Spatiotemporal Cross-Attention (Swap-CA) in comparison with existing video attention schemes. Instead of only conducting self-attention in (a)-(c), we perform cross-attention between spatial and temporal modules in a U-Net, which encourages more spatiotemporal mutu

Experimental results

Research questions

  • RQ1How can joint spatiotemporal interactions improve the quality and semantic alignment of text-to-video generation?
  • RQ2Does swapped cross-attention between spatial and temporal modalities reduce temporal distortions and improve text-video coherence?
  • RQ3What is the impact of large-scale, high-definition open-domain video data on video generation performance?

Key findings

  • Swap-CA enables mutual reinforcement between spatial and temporal features, improving text-video alignment (CLIPSIM) and video quality (FVD) in ablations.
  • 3D window attention substantially reduces memory and time costs while maintaining or improving performance.
  • HD-VG-130M, a 130M-pair open-domain dataset, significantly boosts generation quality (FVD improvement on WebVid-10M val by 45.74 after addition).
  • VideoFactory achieves high-definition 1376×768, widescreen videos with watermark-free outputs.
  • In zero-shot evaluation, VideoFactory attains competitive or superior scores on MSR-VTT (CLIPSIM 0.3005) and UCF101 (FVD 410.0) compared to several baselines.
  • Human evaluation favors VideoFactory over several state-of-the-art methods in video quality and text-video correlation.
Figure 2 : Statistics of video categories, clip durations, and caption word lengths in HD-VG-130M. HD-VG-130M covers a wide range of video categories.
Figure 2 : Statistics of video categories, clip durations, and caption word lengths in HD-VG-130M. HD-VG-130M covers a wide range of video categories.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.