Skip to content

preprocess_workflow_ltx2_t2v

LTX-2 preprocessing workflow writing native .precomputed training artifacts.

Classes

fastvideo.workflow.preprocess.preprocess_workflow_ltx2_t2v.LTX2PrecomputedSaver

LTX2PrecomputedSaver(output_root: Path)

Save LTX-2 preprocessing outputs to .pt files under .precomputed/.

Source code in fastvideo/workflow/preprocess/preprocess_workflow_ltx2_t2v.py
def __init__(self, output_root: Path):
    self.output_root = output_root
    self.latents_dir = self.output_root / "latents"
    self.conditions_dir = self.output_root / "conditions"
    self.audio_latents_dir: Path | None = None
    self.latents_dir.mkdir(parents=True, exist_ok=True)
    self.conditions_dir.mkdir(parents=True, exist_ok=True)

fastvideo.workflow.preprocess.preprocess_workflow_ltx2_t2v.PreprocessWorkflowLTX2T2V

PreprocessWorkflowLTX2T2V(fastvideo_args: FastVideoArgs)

Bases: PreprocessWorkflow

LTX-2 workflow for generating native precomputed training tensors.

Source code in fastvideo/workflow/workflow_base.py
def __init__(self, fastvideo_args: FastVideoArgs):
    """
    Initialize the workflow with configuration arguments.

    Args:
        fastvideo_args: Configuration object containing all parameters
                      needed for workflow and pipeline setup.
    """
    self.fastvideo_args = fastvideo_args

    # TODO: pipeline_config should be: dict[str, PipelineConfig]
    # pipeline_type should be included in the PipelineConfig
    # pipeline_config[pipeline_name] = (pipeline_type, fastvideo_args)
    self._pipeline_configs: dict[str, tuple[PipelineType, FastVideoArgs]] = {}
    self._pipelines: dict[str, ComposedPipelineBase] = {}
    self._components: dict[str, Any] = {}
    self.register_pipelines()
    self.register_components()

    self.prepare_system_environment()
    self.load_pipelines()

Functions