ltx2
¶
Modules¶
fastvideo.pipelines.preprocess.ltx2.ltx2_preprocess_pipelines
¶
LTX-2 preprocessing pipeline for native FastVideo training data generation.
This module defines the LTX-2 preprocess pipeline used by FastVideo workflows to build precomputed training artifacts from raw text/video datasets.
Usage:
- Entry is through preprocess workflows that register PreprocessPipelineT2V.
- Input samples should provide prompt text plus video metadata/loader fields
consumed by TextTransformStage and VideoTransformStage.
- Output artifacts are written by the shared preprocessing workflow into
.precomputed/ (latents, conditions, and optional audio_latents).
Optional audio path:
- When audio preprocessing is enabled, this pipeline loads the native
LTX-2 audio encoder and stores per-sample audio latents in
batch.extra["ltx2_audio_latents"].
Classes¶
fastvideo.pipelines.preprocess.ltx2.ltx2_preprocess_pipelines.LTX2AudioEncodingStage
¶
LTX2AudioEncodingStage(audio_encoder: Module, audio_processor: AudioProcessor, fallback_fps: int)
Bases: PipelineStage
Extract audio from input videos and encode into LTX-2 audio latents.
Source code in fastvideo/pipelines/preprocess/ltx2/ltx2_preprocess_pipelines.py
fastvideo.pipelines.preprocess.ltx2.ltx2_preprocess_pipelines.LTX2TextPrecomputeStage
¶
LTX2TextPrecomputeStage(text_encoder: Module, tokenizer: Any, preprocess_text_fn, tokenizer_kwargs: dict[str, Any], padding_side: str)
Bases: PipelineStage
Compute pre-connector Gemma embeddings for LTX-2 training.
Source code in fastvideo/pipelines/preprocess/ltx2/ltx2_preprocess_pipelines.py
fastvideo.pipelines.preprocess.ltx2.ltx2_preprocess_pipelines.PreprocessPipelineT2V
¶
PreprocessPipelineT2V(model_path: str, fastvideo_args: FastVideoArgs | TrainingArgs, required_config_modules: list[str] | None = None, loaded_modules: dict[str, Module] | None = None)
Bases: ComposedPipelineBase
Native LTX-2 preprocessing pipeline (text/video with optional audio).