Towards Chunk-Wise Generation for Long Videos

Siyang Zhang, Ser-Nam LimarXiv 2024 · OpenReview

TL;DR

This paper tackles the challenge of generating long videos using diffusion models, which are memory-intensive. They propose a chunk-by-chunk autoregressive generation strategy and introduce an efficient "k-step search" method to select the best initial noise for each video chunk, significantly improving quality and mitigating degradation.

What Problem Does This Paper Address?

Generating long videos with diffusion models is a significant hurdle due to massive GPU memory requirements. Standard diffusion models process the entire video tensor simultaneously, leading to out-of-memory (OOM) errors for longer or higher-resolution videos. While chunk-by-chunk generation offers a solution by breaking down the task, it can suffer from cumulative quality degradation due to imperfections in each generated chunk, particularly with smaller models. The paper aims to address this degradation and make chunk-by-chunk generation more robust and effective.

Methods

The core of the paper's approach is autoregressive chunk-by-chunk generation using pre-trained Image-to-Video (I2V) diffusion models. Instead of generating a whole video at once, they generate short video segments (chunks) sequentially. The last frame of a generated chunk then serves as the "guide image" for generating the next chunk.

To combat the quality degradation that arises from this sequential process, they introduce an efficient k-step search method. This involves:

  1. Preparing multiple initial noise candidates: For a given guide image, they generate several potential starting noises.
  2. Partial denoising (k-step): Each noise candidate is partially denoised for a small number of steps (k). This produces "suboptimal" video candidates.
  3. Quality evaluation: These suboptimal candidates are evaluated using a metric (cosine similarity of CLIP embeddings) to assess their quality.
  4. Best candidate selection: The noise candidate that yields the best suboptimal video is chosen.
  5. Full denoising: The selected "good" noise is then used to generate the final video chunk with the full denoising process.

This k-step evaluation is significantly faster than performing full denoising for every noise candidate, making the selection process computationally feasible.

Datasets

The paper evaluates its methods on existing video generation benchmarks and uses metrics from VBench [8] for evaluation. Specific datasets for training the underlying I2V models are not detailed, as the focus is on using pre-trained models.

Key Insights and Ideas

  • Initial noise is critical: The choice of initial Gaussian noise has a surprisingly large impact on the quality of generated video chunks, even with strong conditioning. This is attributed to a train-inference discrepancy in how noise is handled.
  • Smaller models are more vulnerable: Smaller I2V models exhibit more pronounced quality degradation in chunk-by-chunk generation compared to larger, more robust models.
  • k-step search is a practical solution: A short, partial denoising process (k-steps) is sufficient to identify good initial noises, offering a significant speedup over brute-force full-step evaluation.
  • Larger models are inherently robust: Advanced, larger I2V models (like OpenSoraPlan and CogVideoX) are less susceptible to degradation, suggesting that naive chunk-by-chunk generation might suffice for them, albeit at a higher inference cost.

Key Results

  • The k-step search method significantly improves video quality metrics (Subject Consistency, Background Consistency, Temporal Flickering, Motion Smoothness, Aesthetic Quality) for smaller models like StableVideoDiffusion and ConsistI2V, as shown in Table 2.
  • For larger models like OpenSoraPlan and CogVideoX, the improvement from k-step search is less pronounced, indicating their inherent robustness.
  • The paper demonstrates successful generation of longer videos (up to 20 chunks) with improved quality compared to naive chunk-by-chunk approaches.
  • The k-step evaluation is computationally efficient, requiring only k steps (e.g., 8 steps) for evaluation compared to the full 50-100 steps for final generation.

Limitations and Future Work

  • Random sampling vs. explicit refinement: The current method relies on sampling multiple noises and selecting the best, rather than explicitly refining a single arbitrary noise. Future work could explore noise refinement techniques.
  • Training for robustness: Introducing degradation (like blurring or noise) during training could further enhance the robustness of I2V models to errors during inference.
  • Infinite video generation: While the method enables longer videos, generating truly "infinite" videos remains a challenge due to the potential accumulation of small errors over many chunks. Future work could explore effective feedback loops, potentially involving human intervention, to address this.

Summary updated

Abstract

Generating long-duration videos has always been a significant challenge due to the inherent complexity of spatio-temporal domain and the substantial GPU memory demands required to calculate huge size tensors. While diffusion based generative models achieve state-of-the-art performance in video generation task, they are typically trained with predefined video resolutions and lengths. During inference, a noise tensor with specific resolution and length should be specified at first, and the model will perform denoising on the entire video tensor simultaneously, all the frames together. Such approach will easily raise an out-of-memory (OOM) problem when the specified resolution and/or length exceed a certain limit. One of the solutions to this problem is to generate many short video chunks autoregressively with strong inter-chunk spatio-temporal relation and then concatenate them together to form a long video. In this approach, a long video generation task is divided into multiple short video generation subtasks, and the cost of each subtask is reduced to a feasible level. In this paper, we conduct a detailed survey on long video generation with the autoregressive chunk-by-chunk strategy. We address common problems caused by applying short image-to-video models to long video tasks and design an efficient $k$-step search solution to mitigate these problems.
BibTeX
@misc{zhang2024towards,
  author = {Siyang Zhang and Ser-Nam Lim},
  title = {{Towards Chunk-Wise Generation for Long Videos}},
  year = {2024},
  eprint = {2411.18668},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.18668},
}
Figure