リアルタイム長編動画生成(GitHub リポジトリ)
NVIDIA Labs が公開した「LongLive 2.0」は、NVFP4(NVIDIA Floating Point 4)という独自形式と並列インフラを活用し、リアルタイムでの長編動画生成を可能にする画期的なオープンソース基盤である。
キーポイント
NVFP4 による効率的な推論
従来の BF16(半精度浮動小数点)に代わり、NVIDIA 独自の NVFP4 形式を採用することで、メモリ使用量を劇的に削減し、高速な処理を実現している。
リアルタイム長編動画生成
単なる短尺クリップの生成ではなく、長時間にわたる一貫性のある動画をリアルタイムに近い速度で生成できるインフラストラクチャを提供する。
多様なモデル形式の公開
Hugging Face 上で BF16 版と NVFP4 版の両方のモデル(5B パラメータ)が公開されており、ハードウェアや用途に応じて選択可能である。
完全なオープンソース化
論文、コード、デモページ、そして学習済みモデルまで全て GitHub と Hugging Face で無料で公開され、研究開発の加速を促している。
ストリーミング対応の推論パイプライン構築
CausalDiffusionInferencePipeline を初期化し、place_vae_for_streaming 関数を通じて VAE をストリーミング処理用に設定することで、長時間動画のリアルタイム生成を可能にしています。
メモリ効率と推論速度の最適化
モデルを bfloat16 形式に変換し、勾配計算を無効化(set_grad_enabled(False))することで、GPU メモリ使用量を削減しつつ推論速度を最大化しています。
ストリーミングVAEの構成
`place_vae_for_streaming`関数は、設定ファイルでストリーミングパイプラインを有効にするだけで自動的に機能し、スクリプトの変更は不要です。
影響分析・編集コメントを表示
影響分析
この発表は、動画生成 AI が実験段階から実用的なリアルタイムアプリケーションへ移行する重要な転換点を示しています。特に NVFP4 という独自フォーマットの採用は、NVIDIA エコシステム内での推論効率を最大化する戦略であり、業界全体が「高解像度・長時間」の生成を可能にするためのハードウェア最適化競争に突入したことを示唆します。
編集コメント
「リアルタイム」という言葉が動画生成に適用されることは、従来のバッチ処理型モデルとの決定的な違いであり、ゲームやインタラクティブコンテンツへの応用を即座に想像させます。NVFP4 のような専用フォーマットの台頭は、今後 AI モデルの最適化競争がハードウェア依存度を高める重要なシグナルです。
🎬 LongLive 2.0: 長編動画生成のための NVFP4 パラレルインフラ
💡 TLDR: 学習と推論の両方に NVFP4 と並列処理を採用したインフラ
ニュース
- 🔥 [2026.05.13] AR(自己回帰)トレーニング、DMD 蒸留、および推論(⚡45.7 FPS)に対応する、NVFP4・並列処理・マルチショット機能を備えた LongLive 2.0 をリリースしました。元の LongLive 1.0 は v1.0 ブランチにあります。
- 🎉 [2026.1.27] LongLive が ICLR-2026 に採択されました。
- 🔥 [2025.1.11] LongLive は、元の RoPE(回転位置埋め込み)を KV キャッシュの相対 RoPE へ適応させ、無限に長い動画を生成することをサポートしました!
- 🔥 [2025.11.3] Linear attention model SANA-Video に LongLive を実装しました。これにより、SANA-Video はリアルタイムで 60 秒間のインタラクティブな動画を生成できるようになりました。
- 🔥 [2025.9.29] 論文、トレーニングおよび推論コードを含むこの GitHub リポジトリ「LongLive」、モデル重み「LongLive-1.3B」、デモページ「Website」をリリースしました。
イントロダクション
LongLive 1.0: リアルタイムインタラクティブ長編動画生成。こちらの V1.0 ブランチで見つけることができます。
LongLive 2.0: 長編動画生成のための NVFP4 パラレルインフラ
- トレーニングにおいては、以下の機能をサポートします:
- AR(自己回帰)トレーニング(教師あり強制学習)用のバランス型シーケンス並列処理。
- マルチショット(またはシングルショット)動画に対する AR トレーニング。
- AR トレーニングおよび few-step 蒸留の両方における NVFP4(または BF16)対応。
- 推論においては、以下の機能をサポートします:
- NVFP4 推論(W4A4)および NVFP4 KV キャッシュ。
- マルチショットアテンションシンク。
- シーケンス並列推論。
- 非同期デコーディング。
LongLive 1.0: リアルタイム対話型長編動画生成。逐次的なユーザープロンプトを受け付け、対応する動画をリアルタイムで生成することで、ユーザー主導による長編動画生成を可能にします。鍵となる洞察は、アテンションシンク(attention sink)、KV-リキャッシュ(KV-recache)、およびストリーミング長期チューニングです。
入門ガイド
- 完全ドキュメント
- インストール方法
- NVFP4 セットアップ
- トレーニング
- 推論
- データ構成
クイックスタート
BF16
import torch
from omegaconf import OmegaConf
from pipeline import CausalDiffusionInferencePipeline
from utils.config import normalize_config
from utils.inference_utils import (
load_generator_checkpoint,
place_vae_for_streaming,
prepare_single_prompt_inputs,
save_video,
)
prompt = "A compact silver robot walks through a clean robotics lab."
merged_checkpoint_path = "LongLive-2.0-5B/model_bf16.pt"
config = normalize_config(OmegaConf.load("configs/inference.yaml"))
device = torch.device("cuda")
torch.set_grad_enabled(False)
pipe = CausalDiffusionInferencePipeline(config, device=device)
load_generator_checkpoint(pipe.generator, merged_checkpoint_path)
pipe = pipe.to(device=device, dtype=torch.bfloat16)
place_vae_for_streaming(pipe, config) # honor streaming_vae + vae_device when set
pipe.generator.model.eval().requires_grad_(False)
noise, prompts = prepare_single_prompt_inputs(config, prompt, device)
video = pipe.inference(noise=noise, text_prompts=prompts)
save_video(video[0], "videos/quickstart/sample.mp4", fps=24)
place_vae_for_streaming は、inference.streaming_vae が true であり、かつ inference.vae_device が設定されている場合にのみ機能する no-op(何もしない操作)であるため、yaml 内で streaming-pipeline のデコードを切り替えるだけで十分であり、スクリプト自体を変更する必要はありません。
NVFP4
configs/nvfp4/inference_nvfp4.yaml 内の checkpoints.generator_ckpt をダウンロードしたチェックポイントに指し示し、使用しているバックエンドに応じて model_quant_use_transformer_engine を設定してください:
- TransformerEngine チェックポイント (model_te.pt) の場合:model_quant_use_transformer_engine: true
- FourOverSix チェックポイント (model_4o6.pt) の場合:model_quant_use_transformer_engine: false
setup_nvfp4_pipeline は、両方のバックエンドに対してチェックポイントの読み込み、NVFP4 モジュールのラップ処理、重みの実体化、データ型(dtype)およびデバイス配置、そして streaming-pipeline における VAE の再配置を処理します。この場合、bf16 pipe.to(...) ショートカットは安全ではありません。なぜなら、これは量子化されたバッファをキャストしてしまうためです。
import torch
from omegaconf import OmegaConf
from pipeline import CausalDiffusionInferencePipeline
from utils.config import normalize_config
from utils.inference_utils import prepare_single_prompt_inputs, save_video, setup_nvfp4_pipeline
prompt = "A compact silver robot walks through a clean robotics lab."
config = normalize_config(OmegaConf.load("configs/nvfp4/inference_nvfp4.yaml"))
device = torch.device("cuda")
torch.set_grad_enabled(False)
pipe = CausalDiffusionInferencePipeline(config, device=device)
setup_nvfp4_pipeline(pipe, config, device)
pipe.generator.model.eval().requires_grad_(False)
ノイズとプロンプトを準備する
noise, prompts = prepare_single_prompt_inputs(config, prompt, device)
動画の推論実行
video = pipe.inference(noise=noise, text_prompts=prompts)
結果の保存
save_video(video[0], "videos/quickstart/sample_nvfp4.mp4", fps=24)
モデル
モデル
FPS ↑
パラメータ数
VBench ↑
マルチショット対応
20.7
1.3B
84.87
24.8
5B
85.06
✅
29.7
5B
84.51
✅
45.7
5B
83.14
✅
ライセンス
本リポジトリは Apache 2.0 ライセンスの下で公開されています。詳細については LICENSE をご覧ください。
引用
本研究成果が有用であるとご判断いただけた場合は、以下の形式で引用をご検討ください:
@article{longlive_2.0,
title={LongLive2.0: An NVFP4 Parallel Infrastructure for Long Video Generation},
author={Chen, Yukang and Wang, Luozhou and Huang, Wei and Yang, Shuai and Zhang, Bohan and Xiao, Yicheng and Chu, Ruihang and Mao, Weian and Hu, Qixin and Liu, Shaoteng and Zhao, Yuyang and Mao, Huizi and Chen, Ying-Cong and Xie, Enze and Qi, Xiaojuan and Han, Song},
journal={arXiv preprint arXiv},
year={2026}
}
@inproceedings{longlive,
title={Longlive: Real-time interactive long video generation},
author={Yang, Shuai and Huang, Wei and Chu, Ruihang and Xiao, Yicheng and Zhao, Yuyang and Wang, Xianbang and Li, Muyang and Xie, Enze and Chen, Yingcong and Lu, Yao and others},
booktitle={ICLR},
year={2026},
}
謝辞
- Self-Forcing: 本リリースで基盤として構築した自己強制(Self-Forcing)の AR 学習コードベースおよび定式化。
- Wan2.2: 本リリースで使用されている基本となる動画拡散モデル(video diffusion model)コンポーネント。
原文を表示
🎬 LongLive 2.0: An NVFP4 Parallel Infrastructure for Long Video Generation
💡 TLDR: Infra with NVFP4 and parallelism for both training and inference
News
- 🔥 [2026.05.13] We release LongLive 2.0, infra with NVFP4, parallelism and multi-shot for AR training, DMD distillation, and inference (⚡45.7 FPS). The original LongLive 1.0 is now in the v1.0 branch.
- 🎉 [2026.1.27] LongLive is accepted by ICLR-2026.
- 🔥 [2026.1.11] LongLive supports adapting LongLive's original RoPE into KV-cache relative RoPE and generates infinite long videos!
- 🔥 [2025.11.3] We implement LongLive on linear attention model SANA-Video! Now SANA-Video can generate 60s interactive videos in real-time.
- 🔥 [2025.9.29] We release Paper, this GitHub repo LongLive with all training and inference code, the model weight LongLive-1.3B, and demo page Website.
Introduction
LongLive 1.0: Real-time Interactive Long Video Generation. You can find it here in our V1.0 branch.
LongLive 2.0: an NVFP4 Parallel Infrastructure for Long Video Generation
- For training, it supports
Balanced sequence parallel for AR training (teacher-forcing).
- AR training on multi-shot (or single-shot) videos.
- NVFP4 (or BF16) for both AR training and few-step distillation.
- For inference, it supports
NVFP4 inference (W4A4) and NVFP4 KV Cache.
- Multi-shot attention sink.
- Sequence parallel inference.
- Async decoding.
LongLive 1.0: Real-time Interactive Long Video Generation. It accepts sequential user prompts and generates corresponding videos in real time, enabling user-guided long video generation. The key insights are attention sink, KV-recache, and streaming long tuning.
Getting Started
- Full Documentation
- Installation
- NVFP4 Setup
- Training
- Inference
- Data Organization
Quick Start
BF16
import torch
from omegaconf import OmegaConf
from pipeline import CausalDiffusionInferencePipeline
from utils.config import normalize_config
from utils.inference_utils import (
load_generator_checkpoint,
place_vae_for_streaming,
prepare_single_prompt_inputs,
save_video,
)
prompt = "A compact silver robot walks through a clean robotics lab."
merged_checkpoint_path = "LongLive-2.0-5B/model_bf16.pt"
config = normalize_config(OmegaConf.load("configs/inference.yaml"))
device = torch.device("cuda")
torch.set_grad_enabled(False)
pipe = CausalDiffusionInferencePipeline(config, device=device)
load_generator_checkpoint(pipe.generator, merged_checkpoint_path)
pipe = pipe.to(device=device, dtype=torch.bfloat16)
place_vae_for_streaming(pipe, config) # honor streaming_vae + vae_device when set
pipe.generator.model.eval().requires_grad_(False)
noise, prompts = prepare_single_prompt_inputs(config, prompt, device)
video = pipe.inference(noise=noise, text_prompts=prompts)
save_video(video[0], "videos/quickstart/sample.mp4", fps=24)place_vae_for_streaming is a no-op unless inference.streaming_vae is true and inference.vae_device is set, so toggling streaming-pipeline decode in your yaml is enough — the script does not need to change.
NVFP4
Point checkpoints.generator_ckpt in configs/nvfp4/inference_nvfp4.yaml at the downloaded checkpoint and set model_quant_use_transformer_engine according to the backend you are using:
- TransformerEngine checkpoint (model_te.pt): model_quant_use_transformer_engine: true
- FourOverSix checkpoint (model_4o6.pt): model_quant_use_transformer_engine: false
setup_nvfp4_pipeline handles checkpoint loading, NVFP4 module wrapping, weight materialization, dtype/device placement, and the streaming-pipeline VAE relocation for both backends — the bf16 pipe.to(...) shortcut is unsafe here because it would cast the quantized buffers.
import torch
from omegaconf import OmegaConf
from pipeline import CausalDiffusionInferencePipeline
from utils.config import normalize_config
from utils.inference_utils import prepare_single_prompt_inputs, save_video, setup_nvfp4_pipeline
prompt = "A compact silver robot walks through a clean robotics lab."
config = normalize_config(OmegaConf.load("configs/nvfp4/inference_nvfp4.yaml"))
device = torch.device("cuda")
torch.set_grad_enabled(False)
pipe = CausalDiffusionInferencePipeline(config, device=device)
setup_nvfp4_pipeline(pipe, config, device)
pipe.generator.model.eval().requires_grad_(False)
noise, prompts = prepare_single_prompt_inputs(config, prompt, device)
video = pipe.inference(noise=noise, text_prompts=prompts)
save_video(video[0], "videos/quickstart/sample_nvfp4.mp4", fps=24)Models
Model
FPS ↑
Params
VBench ↑
Multi-shot
20.7
1.3B
84.87
24.8
5B
85.06
✅
29.7
5B
84.51
✅
45.7
5B
83.14
✅
License
This repository is released under the Apache 2.0 license. See LICENSE for details.
Citation
Please consider citing our work if you find them useful:
@article{longlive_2.0,
title={LongLive2.0: An NVFP4 Parallel Infrastructure for Long Video Generation},
author={Chen, Yukang and Wang, Luozhou and Huang, Wei and Yang, Shuai and Zhang, Bohan and Xiao, Yicheng and Chu, Ruihang and Mao, Weian and Hu, Qixin and Liu, Shaoteng and Zhao, Yuyang and Mao, Huizi and Chen, Ying-Cong and Xie, Enze and Qi, Xiaojuan and Han, Song},
journal={arXiv preprint arXiv},
year={2026}
}@inproceedings{longlive,
title={Longlive: Real-time interactive long video generation},
author={Yang, Shuai and Huang, Wei and Chu, Ruihang and Xiao, Yicheng and Zhao, Yuyang and Wang, Xianbang and Li, Muyang and Xie, Enze and Chen, Yingcong and Lu, Yao and others},
booktitle={ICLR},
year={2026},
}Acknowledgement
- Self-Forcing: the AR training codebase and formulation we build upon.
- Wan2.2: the base video diffusion model components used in this release.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み