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ightx2v
|
| 4 |
+
base_model:
|
| 5 |
+
- robbyant/lingbot-video-moe-30b-a3b
|
| 6 |
+
pipeline_tag: text-to-video
|
| 7 |
+
tags:
|
| 8 |
+
- video-generation
|
| 9 |
+
- text-to-video
|
| 10 |
+
- image-to-video
|
| 11 |
+
- text-to-image
|
| 12 |
+
- distillation
|
| 13 |
+
- lora
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# π¬ LightLingBot-Video
|
| 17 |
+
|
| 18 |
+
> Few-step distilled LoRA checkpoints for LingBot-Video, accelerated by
|
| 19 |
+
> [LightX2V](https://github.com/ModelTC/LightX2V).
|
| 20 |
+
|
| 21 |
+
LightLingBot-Video provides distilled LoRA checkpoints for fast LingBot-Video
|
| 22 |
+
inference. The same LoRA configuration supports text-to-video (T2V),
|
| 23 |
+
text-to-image (T2I), and image-to-video (I2V) generation.
|
| 24 |
+
|
| 25 |
+
## π Table of Contents
|
| 26 |
+
|
| 27 |
+
- [Features](#-features)
|
| 28 |
+
- [Installation](#-installation)
|
| 29 |
+
- [Model Preparation](#-model-preparation)
|
| 30 |
+
- [Inference](#-inference)
|
| 31 |
+
- [Generation Results](#-generation-results)
|
| 32 |
+
- [Notes](#-notes)
|
| 33 |
+
- [Acknowledgements](#-acknowledgements)
|
| 34 |
+
|
| 35 |
+
## β¨ Features
|
| 36 |
+
|
| 37 |
+
- β‘ **4-step inference** with distilled LoRA checkpoints
|
| 38 |
+
- π¬ **T2V, T2I, and I2V** generation
|
| 39 |
+
- π§ **One unified LoRA configuration** shared by all tasks
|
| 40 |
+
- π **LightX2V integration** for efficient inference and deployment
|
| 41 |
+
- π― **Two distilled LoRA versions** for comparison
|
| 42 |
+
|
| 43 |
+
## π¦ Installation
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
git clone https://github.com/ModelTC/LightX2V.git
|
| 47 |
+
cd LightX2V
|
| 48 |
+
python3 -m pip install -e .
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
Follow the
|
| 52 |
+
[LightX2V installation guide](https://github.com/ModelTC/LightX2V)
|
| 53 |
+
to install the optional acceleration dependencies required by your hardware.
|
| 54 |
+
|
| 55 |
+
## π₯ Model Preparation
|
| 56 |
+
|
| 57 |
+
Download the LingBot-Video base model and the distilled LoRA repository:
|
| 58 |
+
|
| 59 |
+
```bash
|
| 60 |
+
huggingface-cli download robbyant/lingbot-video-moe-30b-a3b \
|
| 61 |
+
--local-dir /path/to/LingBot-Video
|
| 62 |
+
|
| 63 |
+
huggingface-cli download lightx2v/LightLingBot-Video \
|
| 64 |
+
--local-dir /path/to/LightLingBot-Video
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Before inference:
|
| 68 |
+
|
| 69 |
+
1. Set `model_path` in the corresponding script under
|
| 70 |
+
`scripts/lingbot_video/`.
|
| 71 |
+
2. Set the LoRA checkpoint path in
|
| 72 |
+
`configs/lingbot_video/lingbot_video_lora.json`.
|
| 73 |
+
3. Adjust `CUDA_VISIBLE_DEVICES` in the script if needed.
|
| 74 |
+
4. For I2V, also set `image_path` in the I2V script.
|
| 75 |
+
|
| 76 |
+
## π Inference
|
| 77 |
+
|
| 78 |
+
Run the following commands from the LightX2V repository root. These commands
|
| 79 |
+
use the shell scripts under `scripts/lingbot_video`; no `examples` entry point
|
| 80 |
+
is required.
|
| 81 |
+
|
| 82 |
+
### Text-to-Video
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
bash scripts/lingbot_video/run_lingbot_video_t2v.sh
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
### Text-to-Image
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
bash scripts/lingbot_video/run_lingbot_video_t2i.sh
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
### Image-to-Video
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
bash scripts/lingbot_video/run_lingbot_video_i2v.sh
|
| 98 |
+
```
|
| 99 |
+
|
| 100 |
+
### Recommended Settings
|
| 101 |
+
|
| 102 |
+
| Setting | Base model | Distilled LoRA |
|
| 103 |
+
|:--|:--:|:--:|
|
| 104 |
+
| Inference steps | 40 | 4 |
|
| 105 |
+
| LoRA strength | β | 1.0 |
|
| 106 |
+
| Resolution | 832 Γ 480 | 832 Γ 480 |
|
| 107 |
+
| Guidance scale | 3.0 | 1.0 |
|
| 108 |
+
| Sample shift | 3.0 | 3.0 |
|
| 109 |
+
|
| 110 |
+
## π¬ Generation Results
|
| 111 |
+
|
| 112 |
+
### Text-to-Video (T2V)
|
| 113 |
+
|
| 114 |
+
| Method | Sample 1 | Sample 2 | Sample 3 |
|
| 115 |
+
|:--|:--:|:--:|:--:|
|
| 116 |
+
| 40 steps | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/aBfpevvzMCykZ2AN4nDoy.mp4" controls loop muted playsinline preload="metadata" width="280"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/GmroUGvhggG7Iwh3STSF0.mp4" controls loop muted playsinline preload="metadata" width="280"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/2hrGRrK8M89PqE6zU9uIH.mp4" controls loop muted playsinline preload="metadata" width="280"></video> |
|
| 117 |
+
| 4-step LoRA v1 | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/DCrdwVVelNhMXPR9l0TOb.mp4" controls loop muted playsinline preload="metadata" width="280"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/6yHNCWUHeW61cBxKbhIpt.mp4" controls loop muted playsinline preload="metadata" width="280"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/Nzr5O7KMHBUBgEkGtc-ps.mp4" controls loop muted playsinline preload="metadata" width="280"></video> |
|
| 118 |
+
| 4-step LoRA v2 | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/yTthqJbREftm0zLaHQ6YB.mp4" controls loop muted playsinline preload="metadata" width="280"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/MBTAs68pA6Crw7RUb1jRG.mp4" controls loop muted playsinline preload="metadata" width="280"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/nQVAyzryvoHjOk-531ibh.mp4" controls loop muted playsinline preload="metadata" width="280"></video> |
|
| 119 |
+
|
| 120 |
+
### Text-to-Image (T2I)
|
| 121 |
+
|
| 122 |
+
| Method | Sample 1 | Sample 2 | Sample 3 | Sample 4 |
|
| 123 |
+
|:--|:--:|:--:|:--:|:--:|
|
| 124 |
+
| 40 steps | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/heyC2-qQ0n4-UCnNwgAEn.png" alt="T2I 40-step sample 1" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/gf0j5YOtB0M16Jzu-rgu7.png" alt="T2I 40-step sample 2" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/yaTy3eiHIDU4whWXOS5CY.png" alt="T2I 40-step sample 3" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/IqA7K-XOiSbDqNP6jduus.png" alt="T2I 40-step sample 4" width="220"> |
|
| 125 |
+
| 4-step LoRA v1 | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/_6bWXNVVNYthLPTNfkcqn.png" alt="T2I LoRA v1 sample 1" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/iXqL-99pN_L59aSDBtpDl.png" alt="T2I LoRA v1 sample 2" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/t8qLxFwtwl3NBYkIpVkEh.png" alt="T2I LoRA v1 sample 3" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/ogGwg7x-erqwzvBuRfvJG.png" alt="T2I LoRA v1 sample 4" width="220"> |
|
| 126 |
+
| 4-step LoRA v2 | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/eqC8uWo86Ioi6SuCxOJFC.png" alt="T2I LoRA v2 sample 1" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/idiLpjm1ukZ10f4UIS0SU.png" alt="T2I LoRA v2 sample 2" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/a1f7l4Q5ylOSOHLmNf0lp.png" alt="T2I LoRA v2 sample 3" width="220"> | <img src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/3BCgc6ZQsi1_qM5wXXK0x.png" alt="T2I LoRA v2 sample 4" width="220"> |
|
| 127 |
+
|
| 128 |
+
### Image-to-Video (I2V)
|
| 129 |
+
|
| 130 |
+
| Method | Sample 1 | Sample 2 | Sample 3 | Sample 4 |
|
| 131 |
+
|:--|:--:|:--:|:--:|:--:|
|
| 132 |
+
| 40 steps | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/uwIKVnhw0ZmYQ9W9h_2Bb.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/dBhmDQ1xg9VNc3_bFk9Y2.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/qyj46MCmyPRNjHGMtIjZg.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/bhjdpxkWY01iOtO1sdwWT.mp4" controls loop muted playsinline preload="metadata" width="210"></video> |
|
| 133 |
+
| 4-step LoRA v1 | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/iyeCPr8_jugefnGjQzVXy.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/n8nXH4iZteTIL9wvsCa7L.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/t6assZ-6RW85DMIOXkoUV.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/Fo_PsM3xHn6bdvPFSnkV0.mp4" controls loop muted playsinline preload="metadata" width="210"></video> |
|
| 134 |
+
| 4-step LoRA v2 | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/4M-jfTK6o0CCP2II1cFYd.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/j58fryiWhyQrT1rCc0WdX.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/E8KZPqL00qCjMqZ2951JD.mp4" controls loop muted playsinline preload="metadata" width="210"></video> | <video src="https://cdn-uploads.huggingface.co/production/uploads/680de13385293771bc57400b/_VP2MQaiQYqxdrtx9aB5J.mp4" controls loop muted playsinline preload="metadata" width="210"></video> |
|
| 135 |
+
|
| 136 |
+
## β οΈ Notes
|
| 137 |
+
|
| 138 |
+
- The distilled LoRA configuration uses 4 inference steps and disables CFG.
|
| 139 |
+
- Merged LoRA inference requires original, non-quantized DiT weights.
|
| 140 |
+
- Prompts and negative prompts should follow the structured JSON format used
|
| 141 |
+
in `scripts/lingbot_video/`.
|
| 142 |
+
- T2V, T2I, and I2V share
|
| 143 |
+
`configs/lingbot_video/lingbot_video_lora.json`.
|
| 144 |
+
- Speed and memory usage depend on the GPU, attention backend, resolution, and
|
| 145 |
+
video length.
|
| 146 |
+
|
| 147 |
+
## π€ Acknowledgements
|
| 148 |
+
|
| 149 |
+
- [LingBot-Video](https://huggingface.co/inclusionAI/LingBot-Video)
|
| 150 |
+
- [LightX2V](https://github.com/ModelTC/LightX2V)
|
| 151 |
+
|
| 152 |
+
If you find this project helpful, please give
|
| 153 |
+
[LightX2V](https://github.com/ModelTC/LightX2V) a β.
|