Skip to content

thanhnhan29/SAGA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAGA: Stable Acceleration Guidance for Autoregressive Video Generation

Thanh-Nhan Vo1,2, Trong-Thuan Nguyen1,2, Trung-Hoang Le1,2, Tam V. Nguyen3, and Minh-Triet Tran1,2

1 University of Science, VNU-HCM, Vietnam
2 Vietnam National University, Ho Chi Minh City, Vietnam
3 University of Dayton, Ohio, U.S.A.
{vtnhan, ntthuan}@selab.hcmus.edu.vn, lthoang@fit.hcmus.edu.vn, tnguyen1@udayton.edu, tmtriet@fit.hcmus.edu.vn

License Framework Paper


This repository contains the official PyTorch implementation of SAGA (Stable Acceleration Guidance for Autoregressive Video Generation). SAGA is a training-free inference-time stabilization framework designed to eliminate temporal inconsistencies—such as flickering, motion jitter, and structural drift—commonly found in autoregressive video diffusion rollouts.

🔥 News

  • 2026.07.18: Our paper is now available on arXiv!
  • 2026.07.09: The official code of SAGA is released!

🔬 Method Overview

Autoregressive video diffusion models are highly efficient for streaming and long-horizon generation, but repeatedly reusing generated latents as causal context accumulates small temporal errors over time. By analyzing these instabilities from a spectral kinematic perspective, SAGA introduces a training-free, dual-action mechanism to stabilize temporal dynamics:

  • Structured Autoregressive Noise Initialization (SAN): A kinematically neutral noise prior that decorrelates adjacent noise frames while preserving longer-range dependencies.
  • Acceleration-Domain Spectral Guidance (SG): An inference-time guidance objective based on finite-window Slepian projections (Discrete Prolate Spheroidal Sequences - DPSS) that isolates and suppresses unstable high-frequency kinematic energy during denoising.

SAGA Framework


📊 Quantitative Results on VBench

SAGA consistently boosts temporal consistency metrics across state-of-the-art 1.3B-parameter Wan2.1 autoregressive diffusion backbones:

Model SC BC TF MS TQ AQ IQ
Autoregressive-Diffusion Hybrid Models
CausVid [26] (CVPR 2025) 95.91 96.46 99.02 97.81 97.30 64.18 67.23
Self-Forcing [10] (NeurIPS 2025) 95.60 96.20 99.00 98.38 97.30 66.33 69.60
Causal-Forcing [28] (ICML 2026) 95.43 96.15 97.97 97.52 96.77 66.82 70.11
Our approaches
CausVid + SAGA 96.71 96.59 98.96 98.04 97.58 64.39 67.46
Self-Forcing + SAGA 96.63 96.95 99.19 98.85 97.91 66.48 70.51
Causal-Forcing + SAGA 96.13 96.57 98.63 97.97 97.33 66.66 69.83

Note: SC, BC, TF, MS, TQ, AQ, and IQ correspond to Subject Consistency, Background Consistency, Temporal Flickering, Motion Smoothness, Temporal Quality, Aesthetic Quality, and Image Quality, respectively. Best results are shown in bold, and second-best results are underlined.


📋 TODO

  • Release the SAGA core inference code
  • Integrate target backbone wrappers (Self-Forcing, Causal-Forcing, CausVid)
  • Release paper and project page
  • Release preprint on arXiv
  • Build Web Demo (Gradio / Replicate instance)
  • Support ComfyUI node integration
  • Support more autoregressive video diffusion backbones

📁 Repository Layout

The SAGA core method is centralized under the saga/ package, with backbones vendored as target inference sites:

SAGA/
├── backbones/           # Target inference backbones
│   ├── self_forcing/    # Self-Forcing wrapper & entry points
│   ├── causal_forcing/  # Causal-Forcing wrapper & entry points
│   └── causvid/         # CausVid wrapper & entry points
├── saga/                # SAGA core method package
│   ├── __init__.py
│   ├── noise.py         # SAN (Dual-AR) noise generators
│   └── guidance.py      # Slepian/FFT kinematic guidance module
├── scripts/             # Shell scripts for executing evaluations
├── docs/                # Documentation and architecture notes
└── README.md
  • saga/noise.py: Contains the implementation of the Dual-AR noise generator (generate_dual_ar_noise).
  • saga/guidance.py: Contains the SAGAGuidance module which computes the high-frequency temporal acceleration Slepian/FFT loss and guides the predicted clean latent.

⚙️ Configuration & Run Instructions

Environment Variables

Before running the evaluation scripts, you can customize execution via the following environment variables:

  • CUDA_VISIBLE_DEVICES: Target GPU device list (default: 0).
  • CHECKPOINT_PATH / CHECKPOINT_FOLDER: Path to model checkpoint file or folder containing weights. (Defaults are set internally to point inside each backbone folder).
  • PROMPT_PATH: Path to the evaluation prompt .txt file.
  • OUTPUT_ROOT: Parent directory for saving generated videos (default: ./outputs).
  • SEED: Random seed (defaults: 0 for Self-Forcing/Causal-Forcing, 42 for CausVid).

Running Evaluations

We provide wrapper scripts to run either the baseline (*_raw.sh) or the SAGA-guided (*_method.sh) variant.

Important

If you specify relative paths for CHECKPOINT_PATH, CHECKPOINT_FOLDER, or PROMPT_PATH, prefix them with $(pwd)/ to ensure they resolve correctly when the script changes directories to the backbone folders.

1. Self-Forcing

# SAGA-Stabilized Run
CHECKPOINT_PATH=$(pwd)/backbones/self_forcing/checkpoints/self_forcing_dmd.pt \
PROMPT_PATH=$(pwd)/backbones/self_forcing/prompts/MovieGenVideoBench_extended.txt \
bash scripts/run_self_forcing_method.sh

# Baseline Run
CHECKPOINT_PATH=$(pwd)/backbones/self_forcing/checkpoints/self_forcing_dmd.pt \
PROMPT_PATH=$(pwd)/backbones/self_forcing/prompts/MovieGenVideoBench_extended.txt \
bash scripts/run_self_forcing_raw.sh

2. Causal-Forcing

# SAGA-Stabilized Run
CHECKPOINT_PATH=$(pwd)/backbones/causal_forcing/checkpoints/chunkwise/causal_forcing.pt \
PROMPT_PATH=$(pwd)/backbones/causal_forcing/prompts/example_prompts.txt \
bash scripts/run_causal_forcing_method.sh

# Baseline Run
CHECKPOINT_PATH=$(pwd)/backbones/causal_forcing/checkpoints/chunkwise/causal_forcing.pt \
PROMPT_PATH=$(pwd)/backbones/causal_forcing/prompts/example_prompts.txt \
bash scripts/run_causal_forcing_raw.sh

3. CausVid

# SAGA-Stabilized Run
CHECKPOINT_FOLDER=$(pwd)/backbones/causvid/wan_models \
PROMPT_PATH=$(pwd)/backbones/causvid/sample_dataset/MovieGenVideoBench.txt \
bash scripts/run_causvid_method.sh

# Baseline Run
CHECKPOINT_FOLDER=$(pwd)/backbones/causvid/wan_models \
PROMPT_PATH=$(pwd)/backbones/causvid/sample_dataset/MovieGenVideoBench.txt \
bash scripts/run_causvid_raw.sh

✏️ Citation

If you find SAGA useful in your research, please cite our paper:

@article{vo2026saga,
  title={SAGA: Stable Acceleration Guidance for Autoregressive Video Generation},
  author={Vo, Thanh-Nhan and Nguyen, Trong-Thuan and Le, Trung-Hoang and Nguyen, Tam V. and Tran, Minh-Triet},
  journal={arXiv preprint arXiv:2607.08020},
  year={2026}
}

🙏 Acknowledgements

This codebase is built upon and integrates components from the open-source implementations of Self-Forcing, Causal-Forcing, and CausVid. We sincerely thank the authors of these projects for releasing their code and contributing to the video generation research community.

About

SAGA: Stable Acceleration Guidance for Autoregressive Video Generation

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors