How nvlabs/longlive works
The repository contains three generations of long-video generation software: LongLive-Plug for reusable capability distillation, LongLive 1.0 for real-time interactive generation, and LongLive 2.0 for parallel, quantized training and inference. The main user workflow is prompt input through a generation pipeline to video output; training and distillation form distinct model-production workflows. README documents additional training and serving capabilities beyond the sampled excerpts, so those branches are represented at their supported directory paths; wiring not evidenced by the excerpts is omitted.
Main entry points: LongLive-Plug/inference.py Video inference · distillation.py Distillation trainer · LongLive2.0/inference.py Inference entry · interactive_inference.py Interactive inference
Components 32
LongLive Plug
- Capability distillation
LongLive-Plug/train.py - Distillation trainer
LongLive-Plug/trainer/distillation.py - Distillation methods
LongLive-Plug/model - Prompt dataset
LongLive-Plug/utils/dataset.py - Video inference
LongLive-Plug/inference.py - Functional LoRA
LongLive-Plug/utils/lora_utils.py - Wan components
LongLive-Plug/wan_5b/modules - Generated video
LongLive 1.0
- Model training
LongLive1.0/train.py - Distillation trainer
LongLive1.0/trainer/distillation.py - Interactive inference
LongLive1.0/interactive_inference.py - Interactive pipeline
LongLive1.0/pipeline/interactive_causal_inference.py - Causal generation
LongLive1.0/pipeline/causal_inference.py - Text conditioning
LongLive1.0/utils/wan_wrapper.py - Causal Wan model
LongLive1.0/wan/modules/causal_model.py - Generated video
LongLive 2.0
- Training entry
LongLive2.0/train.py - Training workflows
LongLive2.0/trainer - Inference entry
LongLive2.0/inference.py - Parallel inference
LongLive2.0/inference_sp.py - Causal diffusion
LongLive2.0/pipeline/causal_diffusion_inference.py - Sequence-parallel pipeline
LongLive2.0/pipeline/causal_diffusion_inference_sp.py - Ulysses collectives
LongLive2.0/wan_5b/distributed/sp_ulysses_inference.py - Quantized setup
LongLive2.0/utils/inference_utils.py - Quantization runtime
LongLive2.0/utils/quant.py - FourOverSix kernels
LongLive2.0/fouroversix/src/fouroversix/quantize - Generated video
Model foundations
- Wan 1.0 modules
LongLive1.0/wan/modules - Wan 2.0 modules
LongLive2.0/wan_5b/modules - Plug Wan models
LongLive-Plug/wan_5b/modules
Other components
- Prompt user
- Training data
Connections 36
- Prompt user → Video inference: provides prompts
- Video inference → Functional LoRA: loads adapter
- Video inference → Wan components: runs model
- Wan components → Generated video: decodes frames
- Video inference → Generated video: saves output
- Training data → Prompt dataset: supplies examples
- Capability distillation → Prompt dataset: loads data
- Capability distillation → Distillation trainer: starts training
- Distillation trainer → Distillation methods: uses objectives
- Distillation trainer → Functional LoRA: trains adapters
- Distillation trainer → Wan components: distills model
- Prompt user → Interactive inference: provides prompts
- Interactive inference → Interactive pipeline: invokes
- Interactive pipeline → Causal generation: inherits inference
- Causal generation → Text conditioning: encodes prompts
- Causal generation → Causal Wan model: denoises chunks
- Causal Wan model → Wan 1.0 modules: uses modules
- Interactive inference → Generated video: writes video
- Training data → Model training: supplies training data
- Model training → Distillation trainer: starts training
- Prompt user → Inference entry: provides prompts
- Inference entry → Quantized setup: prepares quantization
- Quantized setup → Quantization runtime: configures weights
- Quantization runtime → FourOverSix kernels: dispatches kernels
- Inference entry → Causal diffusion: runs inference
- Causal diffusion → Wan 2.0 modules: uses Wan components
- Causal diffusion → Generated video: decodes output
- Inference entry → Generated video: saves video
- Prompt user → Parallel inference: provides prompts
- Parallel inference → Sequence-parallel pipeline: constructs pipeline
- Sequence-parallel pipeline → Ulysses collectives: uses collectives
- Sequence-parallel pipeline → Wan 2.0 modules: runs causal model
- Training data → Training entry: supplies training data
- Training entry → Training workflows: starts training
- Training workflows → Wan 2.0 modules: trains models
- Video inference → Plug Wan models: loads architecture