Which LTX-2 Pipeline Offers the Fastest Inference Speed?

The DistilledPipeline class in ltx_pipelines/distilled.py provides the fastest inference speed in the LTX-2 suite by utilizing a distilled model checkpoint with only 12 total diffusion steps (8 for stage 1, 4 for stage 2) and eliminating classifier-free guidance.

When working with the Lightricks/LTX-2 video generation model, selecting the right pipeline significantly impacts your inference latency. Among the available options, the DistilledPipeline stands out as the fastest LTX-2 pipeline, designed specifically for high-throughput scenarios and real-time applications. This optimized implementation trades a modest quality reduction for substantial speed gains through architectural innovations in the two-stage diffusion process.

Why DistilledPipeline Is the Fastest LTX-2 Pipeline

Distilled Model Architecture

The DistilledPipeline leverages a smaller, fine-tuned checkpoint defined in packages/ltx-pipelines/src/ltx_pipelines/distilled.py. This distilled variant requires fewer forward passes than the standard model, directly reducing computational overhead. The implementation shares a single upsampler between both generation stages, minimizing data movement and memory bandwidth bottlenecks while maintaining a compact latent-only processing workflow.

Fixed Sigma Schedule Optimization

Unlike adaptive scheduling methods, the pipeline employs predefined sigma constants defined in packages/ltx-pipelines/src/ltx_pipelines/utils/constants.py. The DISTILLED_SIGMAS array specifies exactly 8 steps for stage 1 denoising, while STAGE_2_DISTILLED_SIGMAS allocates 4 steps for stage 2 refinement. This fixed schedule eliminates the computational cost of dynamic step calculation and reduces the total denoising loop to just 12 iterations.

Elimination of Classifier-Free Guidance

The pipeline omits classifier-free guidance (CFG), which typically requires doubling forward passes for conditional and unconditional predictions. By removing these extra computations, the DistilledPipeline achieves linear scaling with respect to model size rather than the 2x overhead seen in CFG-enabled pipelines.

Implementing the Fastest LTX-2 Pipeline

Command-Line Usage

Execute the distilled pipeline directly from the repository root using the module entry point:

python -m ltx_pipelines.distilled \
    --distilled-checkpoint-path path/to/distilled_checkpoint.safetensors \
    --spatial-upsampler-path path/to/upsampler.safetensors \
    --gemma-root path/to/gemma \
    --prompt "A quiet mountain lake at sunrise" \
    --output-path output.mp4

Python API Integration

For programmatic control, instantiate the DistilledPipeline class and invoke it with your generation parameters:

from ltx_pipelines.distilled import DistilledPipeline
from ltx_core.loader import LoraPathStrengthAndSDOps
from ltx_pipelines.utils.args import ImageConditioningInput
from ltx_pipelines.utils.media_io import encode_video
from ltx_core.types import Audio

# Initialize the pipeline without LoRA for maximum speed

pipeline = DistilledPipeline(
    distilled_checkpoint_path="path/to/distilled_checkpoint.safetensors",
    gemma_root="path/to/gemma",
    spatial_upsampler_path="path/to/upsampler.safetensors",
    loras=[],
)

# Optional: Add image conditioning

images = [ImageConditioningInput("condition.jpg", frame_idx=0, strength=1.0, crf=33)]

# Generate video

video, audio = pipeline(
    prompt="A quiet mountain lake at sunrise",
    seed=123,
    height=512,
    width=768,
    num_frames=121,
    frame_rate=25.0,
    images=images,
)

# Encode to MP4

encode_video(
    video=video,
    fps=25.0,
    audio=audio,
    output_path="output.mp4",
    video_chunks_number=1,
)

Technical Architecture and Source Files

The DistilledPipeline implementation relies on several critical components within the Lightricks/LTX-2 repository:

Summary

  • The DistilledPipeline in ltx_pipelines/distilled.py is the fastest LTX-2 pipeline available in the repository.
  • It uses exactly 12 total diffusion steps (8 for stage 1, 4 for stage 2) defined by fixed sigma schedules in constants.py.
  • Classifier-free guidance is disabled, eliminating the 2x forward pass overhead required by standard pipelines.
  • The architecture employs a shared upsampler and distilled model checkpoint to minimize memory bandwidth and computation.
  • Both CLI and Python API interfaces support optional image conditioning while maintaining maximum inference speed.

Frequently Asked Questions

What makes DistilledPipeline faster than other LTX-2 pipelines?

The DistilledPipeline achieves superior speed through a combination of a distilled model checkpoint requiring fewer parameters, a fixed sigma schedule limiting total steps to 12, and the elimination of classifier-free guidance. According to the source code in packages/ltx-pipelines/src/ltx_pipelines/distilled.py, these optimizations reduce the denoising loop complexity and avoid the conditional/unconditional dual forward passes present in standard pipelines.

How many diffusion steps does the fastest LTX-2 pipeline use?

The DistilledPipeline uses exactly 12 diffusion steps total: 8 steps for stage 1 generation (defined by DISTILLED_SIGMAS in constants.py) and 4 steps for stage 2 refinement (defined by STAGE_2_DISTILLED_SIGMAS). This fixed schedule contrasts with adaptive methods that may require 20-50 steps for comparable outputs.

Is there a quality trade-off when using the fastest LTX-2 pipeline?

Yes, the DistilledPipeline trades a modest reduction in generation quality for significant latency improvements. The pipeline selection guide in packages/ltx-pipelines/README.md recommends this approach for batch processing and low-latency scenarios where speed outweighs the marginal quality differences introduced by the distilled checkpoint and reduced step count.

Can I use image conditioning with the DistilledPipeline?

Yes, the DistilledPipeline supports image conditioning through the ImageConditioningInput class. You can pass conditioned images to the pipeline initialization or the call method using the images parameter, as demonstrated in the programmatic example using ImageConditioningInput with frame indices and strength values.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →