Skip to content

Acelogic/LTX-2-MLX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTX-2-MLX

Model Original Repo Paper

Native Apple Silicon implementation of Lightricks LTX-2 video generation models using MLX. Supports both LTX-2.0 (19B) and LTX-2.3 (22B) with automatic version detection.

"A golden retriever running through a sunny meadow"

golden_retriever.mp4

"A city street at night with neon lights and rain"

cyberpunk_city.mp4

"A rocket ship launching into space with flames"

rocket_launch.mp4

"Ocean waves crashing on a beach at sunset"

ocean_sunset.mp4

768×512, 65 frames (~2.7s at 24fps), 8 steps on Apple Silicon

Quick Start

# 1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Download weights
uv run scripts/download_weights.py

# 3. Generate video (auto-detects model version)
uv run python scripts/generate.py "A golden retriever running through a meadow"

# Or specify the 2.3 checkpoint explicitly
uv run python scripts/generate.py --weights weights/ltx-2.3/ltx-2.3-22b-distilled.safetensors \
  "A golden retriever running through a meadow"

Required Models

LTX-2.3 (Recommended)

Download from Lightricks/LTX-2 on HuggingFace:

Model Size Description
ltx-2.3-22b-distilled.safetensors 46GB Latest - 22B params, 8 steps

LTX-2.0

Model Size Description
ltx-2-19b-distilled.safetensors 43GB Fast generation (8 steps)
ltx-2-19b-distilled-fp8.safetensors 27GB FP8 quantized (smaller download)
ltx-2-19b-dev.safetensors 43GB Higher quality (25-50 steps)
ltx-2-spatial-upscaler-x2-1.0.safetensors 995MB 2x resolution upscaling
ltx-2-temporal-upscaler-x2-1.0.safetensors 262MB 2x framerate upscaling
ltx-2-19b-distilled-lora-384.safetensors 1.5GB LoRA for two-stage refinement

Text Encoder: Gemma 3 12B (~25GB) - Requires accepting license

Or use the interactive downloader:

uv run scripts/download_weights.py --weights all

Available Pipelines

Pipeline Speed Quality Best For
text-to-video Medium Good Basic generation
distilled Fast Good Quick iteration
one-stage Slow High Quality priority
two-stage Medium High High resolution (512p+)
# Fast preview
python scripts/generate.py "Your prompt" --pipeline distilled

# High quality
python scripts/generate.py "Your prompt" --pipeline one-stage --steps 20 --cfg 5.0

# High resolution
python scripts/generate.py "Your prompt" --pipeline two-stage --height 768 --width 1024

See Pipelines Guide for all 6 pipelines and options.

Optimization Tips

  • Use --fp16 - Reduces memory ~50% (enabled by default)
  • Use --pipeline distilled - Fastest inference (8 steps)
  • Use --low-memory - For systems with <32GB RAM
  • Reduce resolution - Start with --height 256 --width 384 for testing

See Usage Guide for memory requirements and benchmarks.

Prompting Tips

Focus on detailed, chronological descriptions. Include movements, appearances, camera angles, and environment details in a flowing paragraph. Keep under 200 words.

Structure your prompts:

  1. Main action in a single sentence
  2. Specific movements and gestures
  3. Character/object appearances
  4. Background and environment
  5. Camera angles and movements
  6. Lighting and colors

See Lightricks prompting guide for more tips.

Requirements

  • macOS with Apple Silicon (M1/M2/M3/M4)
  • ~25GB RAM (128GB recommended for high resolution)
  • ffmpeg: brew install ffmpeg

Documentation

License

Research and educational use. See LTX-2 for model licensing.

Acknowledgments

About

Attempt at Porting LTX-2 Video Model to Apple's MLX Machine Learning Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages