Files
Conal Mullan cad056abf6 Add LTX-2.3 video generation via Modal (text-to-video, image-to-video)
Integrates Lightricks LTX-2.3 22B DiT model for AI video generation.
Generates ~5s video clips at up to 1024x1536 with synchronized audio.

- docker/modal-ltx2/app.py: Modal deployment on A100-80GB with baked weights
  (~55GB: dev checkpoint + distilled LoRA + spatial upsampler + Gemma 3 12B)
- tools/ltx2.py: CLI tool with --prompt, --input (I2V), --width/--height,
  --num-frames, --quality, --seed
- tools/cloud_gpu.py: Wire ltx2 into Modal endpoint routing and cost estimation
- docs/ltx2.md: Setup guide, parameters, prompting tips, troubleshooting

Key implementation notes:
- torch.inference_mode() required around pipeline call (GitHub #152) —
  without it, Gemma text encoder retains ~37GB of autograd activations
  causing OOM even on 80GB GPU
- Weights are on Lightricks/LTX-2.3 HF repo (not Lightricks/LTX-2)
- transformers pinned to 4.57.6 (5.x breaks Gemma3TextConfig)
- Pipeline returns lazy iterator — inference_mode scope must include
  encode_video() call

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:39:05 +00:00
..