How lightricks/ltx-video works
LTX-Video is a legacy text- and media-conditioned video-generation model. Users provide a prompt and optionally image/video conditioning; inference loads configured model components, then the generation pipeline samples video latents and decodes them into video. The README also describes multi-keyframe conditioning, video extension and transformation, and multi-scale generation. Edges reflect the sampled source references and README; some pipeline internals and documented capabilities are not shown in the excerpts, so their wiring is not inferred.
Main entry points: pipeline_ltx_video.py Video pipeline · inference.py Inference loader · transformer3d.py 3D transformer · causal_video_autoencoder.py Causal video VAE
Components 22
Inference entry
- Model configs
configs - Inference loader
ltx_video/inference.py
Generation pipeline
- Video pipeline
ltx_video/pipelines/pipeline_ltx_video.py - CRF compressor
ltx_video/pipelines/crf_compressor.py
Video models
- 3D transformer
ltx_video/models/transformers/transformer3d.py - Attention blocks
ltx_video/models/transformers/attention.py - Patchifier
ltx_video/models/transformers/symmetric_patchifier.py - Embeddings
ltx_video/models/transformers/embeddings.py - Causal video VAE
ltx_video/models/autoencoders/causal_video_autoencoder.py - VAE layers
ltx_video/models/autoencoders/vae.py - Video autoencoder
ltx_video/models/autoencoders/video_autoencoder.py - VAE encoding
ltx_video/models/autoencoders/vae_encode.py - Latent upsampler
ltx_video/models/autoencoders/latent_upsampler.py
Sampling and utilities
- Rectified-flow scheduler
ltx_video/schedulers/rf.py - Prompt enhancement
ltx_video/utils/prompt_enhance_utils.py - Skip-layer strategy
ltx_video/utils/skip_layer_strategy.py - Convolution factory
ltx_video/models/autoencoders/conv_nd_factory.py - Config mapping
ltx_video/utils/diffusers_config_mapping.py - Tensor utilities
ltx_video/utils/torch_utils.py
Other components
- User
- Prompt and media
- Generated video
Connections 27
- User → Prompt and media: provides
README.md - Prompt and media → Inference loader: submits
README.md - Model configs → Inference loader: configures
ltx_video/inference.py - Inference loader → Video pipeline: constructs
ltx_video/inference.py - Inference loader → Causal video VAE: loads
ltx_video/inference.py - Inference loader → 3D transformer: loads
ltx_video/inference.py - Inference loader → Rectified-flow scheduler: loads
ltx_video/inference.py - Inference loader → Latent upsampler: loads
ltx_video/inference.py - Inference loader → CRF compressor: uses
ltx_video/inference.py - Video pipeline → 3D transformer: denoises with
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → Rectified-flow scheduler: steps with
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → Causal video VAE: encodes and decodes
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → VAE encoding: uses
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → Patchifier: uses
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → Latent upsampler: uses
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → Prompt enhancement: uses
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → Skip-layer strategy: uses
ltx_video/pipelines/pipeline_ltx_video.py - Video pipeline → Generated video: produces
README.md - 3D transformer → Attention blocks: applies
ltx_video/models/transformers/transformer3d.py - 3D transformer → Skip-layer strategy: uses
ltx_video/models/transformers/transformer3d.py - Causal video VAE → VAE layers: builds on
ltx_video/models/autoencoders/causal_video_autoencoder.py - Causal video VAE → Convolution factory: creates convolutions
ltx_video/models/autoencoders/causal_video_autoencoder.py - Video autoencoder → Convolution factory: creates convolutions
ltx_video/models/autoencoders/video_autoencoder.py - VAE layers → Convolution factory: creates convolutions
ltx_video/models/autoencoders/vae.py - Rectified-flow scheduler → Tensor utilities: uses
ltx_video/schedulers/rf.py - Causal video VAE → Config mapping: uses
ltx_video/models/autoencoders/causal_video_autoencoder.py - 3D transformer → Config mapping: uses
ltx_video/models/transformers/transformer3d.py