Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,65 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model:
|
| 3 |
+
- Lightricks/LTX-Video-0.9.5
|
| 4 |
+
library_name: candle
|
| 5 |
+
tags:
|
| 6 |
+
- ltx-video
|
| 7 |
+
- text-to-video
|
| 8 |
+
- candle
|
| 9 |
+
- rust
|
| 10 |
+
- gguf
|
| 11 |
+
language:
|
| 12 |
+
- en
|
| 13 |
+
license: apache-2.0
|
| 14 |
+
pipeline_tag: text-to-video
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# LTX-Video in Rust (Candle)
|
| 18 |
+
|
| 19 |
+
This repository provides a high-performance, native Rust implementation of [LTX-Video](https://huggingface.co/Lightricks/LTX-Video) using the [Candle](https://github.com/huggingface/candle) ML framework.
|
| 20 |
+
|
| 21 |
+
## Features
|
| 22 |
+
|
| 23 |
+
- 🦀 **Native Rust**: No Python dependency required for inference.
|
| 24 |
+
- 🚀 **Performance**: Optimized for NVIDIA GPUs with **Flash Attention v2** and **cuDNN**.
|
| 25 |
+
- 💾 **Memory Efficient**: Supports **GGUF quantization** for T5-XXL text encoder and **VAE tiling/slicing** for generating HD videos on consumer GPUs.
|
| 26 |
+
- 🛠 **Flexible**: Easy to use CLI for video generation and library for custom integration.
|
| 27 |
+
|
| 28 |
+
## Quick Start
|
| 29 |
+
|
| 30 |
+
### Installation
|
| 31 |
+
|
| 32 |
+
Ensure you have Rust and the CUDA Toolkit installed, then:
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
git clone https://github.com/FerrisMind/candle-video
|
| 36 |
+
cd candle-video
|
| 37 |
+
cargo build --release --features flash-attn,cudnn
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
### Video Generation
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
cargo run --example ltx-video --release -- \
|
| 44 |
+
--local-weights ./models/ltx-video \
|
| 45 |
+
--prompt "A serene mountain lake at sunset, photorealistic, 4k" \
|
| 46 |
+
--width 768 --height 512 --num-frames 97 \
|
| 47 |
+
--steps 30
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## Performance & Memory
|
| 51 |
+
|
| 52 |
+
| Resolution | Frames | VRAM (BF16) | VRAM (VAE Tiling) |
|
| 53 |
+
|------------|--------|-------------|-------------------|
|
| 54 |
+
| 512x768 | 97 | ~8-12 GB | ~8 GB |
|
| 55 |
+
|
| 56 |
+
*Note: Using GGUF T5 encoder saves an additional ~8-12GB of VRAM.*
|
| 57 |
+
|
| 58 |
+
## Credits
|
| 59 |
+
|
| 60 |
+
- **Original Model**: [Lightricks/LTX-Video](https://huggingface.co/Lightricks/LTX-Video)
|
| 61 |
+
- **Framework**: [HuggingFace Candle](https://github.com/huggingface/candle)
|
| 62 |
+
- **Inspiration**: [city96/LTX-Video-gguf](https://huggingface.co/city96/LTX-Video-gguf) (for GGUF support patterns)
|
| 63 |
+
|
| 64 |
+
---
|
| 65 |
+
For more details, visit the main [GitHub Repository](https://github.com/FerrisMind/candle-video).
|