> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-hi/video-generation/ltx-video.md).

# LTX-Video रियल-टाइम जनरेशन

Clore.ai GPUs पर Lightricks के LTX-Video के साथ रियल-टाइम से तेज़ 5-सेकंड वीडियो जनरेट करें।

Lightricks का LTX-Video उपलब्ध सबसे तेज़ ओपन-सोर्स वीडियो जनरेशन मॉडल है। RTX 4090 पर यह लगभग 4 सेकंड में 5-सेकंड का 768×512 क्लिप बनाता है — रियल-टाइम प्लेबैक से तेज़। मॉडल मूल `diffusers` एकीकरण के माध्यम से `LTXPipeline` और `LTXImageToVideoPipeline`.

पर GPU किराए पर लेना [Clore.ai](https://clore.ai/) आपको LTX-Video के लिए आवश्यक हार्डवेयर तक तुरंत पहुँच देता है, बिना किसी अग्रिम निवेश के और प्रति-घंटा बिलिंग के साथ.

## मुख्य विशेषताएँ

* **रियल-टाइम से तेज़** — RTX 4090 पर लगभग 4 सेकंड में 5-सेकंड का वीडियो बनाया जाता है।
* **टेक्स्ट-टू-वीडियो** — प्राकृतिक भाषा विवरणों से क्लिप्स बनाएं।
* **इमेज-टू-वीडियो** — गति और कैमरा नियंत्रण के साथ एक स्थिर संदर्भ छवि को एनिमेट करें।
* **हल्की आर्किटेक्चर** — कॉम्पैक्ट लेटेंट स्पेस वाला 2B-पैरामीटर वीडियो DiT।
* **नेटिव diffusers** — `LTXPipeline` और `LTXImageToVideoPipeline` में `diffusers >= 0.32`.
* **ओपन वेट्स** — Apache-2.0 लाइसेंस; पूर्ण व्यावसायिक उपयोग अनुमत है।
* **टेम्पोरल VAE** — स्थान और समय में 1:192 संपीड़न अनुपात; कुशल डिकोडिंग।

## आवश्यकताएँ

| घटक        | न्यूनतम | अनुशंसित |
| ---------- | ------- | -------- |
| GPU VRAM   | 16 GB   | 24 GB    |
| System RAM | 16 GB   | 32 GB    |
| डिस्क      | 15 GB   | 30 GB    |
| Python     | 3.10+   | 3.11     |
| CUDA       | 12.8+   | 12.8+    |
| diffusers  | 0.32+   | नवीनतम   |

**Clore.ai GPU अनुशंसा:** एक **RTX 4090** (24 GB, $0.14–0.42/घंटा) अधिकतम थ्रूपुट के लिए आदर्श है। एक **RTX 3090** (24 GB, $0.07–0.21/घंटा) फिर भी कई प्रतिस्पर्धी मॉडलों की तुलना में लागत के एक अंश पर तेज़ चलता है।

## त्वरित शुरुआत

```bash
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu128
pip install diffusers transformers accelerate sentencepiece imageio[ffmpeg]

python -c "import torch; print(torch.cuda.get_device_name(0))"
```

## उपयोग के उदाहरण

### टेक्स्ट-टू-वीडियो

```python
import torch
from diffusers import LTXPipeline
from diffusers.utils import export_to_video

pipe = LTXPipeline.from_pretrained(
    "Lightricks/LTX-Video",
    torch_dtype=torch.bfloat16,
)
pipe.to("cuda")

prompt = (
    "फ़िरोज़ी कोरल रीफ़ के ऊपर सरकती हुई ड्रोन शॉट, "
    "नीचे फुर्ती से भागती उष्णकटिबंधीय मछलियों के झुंड, गोल्डन आवर की रोशनी "
    "पानी की सतह से अपवर्तित होती हुई"
)

video_frames = pipe(
    prompt=prompt,
    negative_prompt="धुंधला, कम गुणवत्ता, विकृत",
    num_frames=121,               # 24 fps पर लगभग 5 सेकंड
    width=768,
    height=512,
    num_inference_steps=30,
    guidance_scale=7.5,
    generator=torch.Generator("cuda").manual_seed(0),
).frames[0]

export_to_video(video_frames, "coral_reef.mp4", fps=24)
print("coral_reef.mp4 सहेजा गया")
```

### इमेज-टू-वीडियो

```python
import torch
from PIL import Image
from diffusers import LTXImageToVideoPipeline
from diffusers.utils import export_to_video

pipe = LTXImageToVideoPipeline.from_pretrained(
    "Lightricks/LTX-Video",
    torch_dtype=torch.bfloat16,
)
pipe.to("cuda")

image = Image.open("cityscape.png").resize((768, 512))

video_frames = pipe(
    prompt="कैमरा धीरे-धीरे दाईं ओर पैन करता है, संध्या में शहर की बत्तियाँ झिलमिलाकर जल उठती हैं",
    negative_prompt="स्थिर, धुंधला",
    image=image,
    num_frames=121,
    num_inference_steps=30,
    guidance_scale=7.5,
).frames[0]

export_to_video(video_frames, "cityscape_animated.mp4", fps=24)
```

### बैच जनरेशन स्क्रिप्ट

```python
import torch
from diffusers import LTXPipeline
from diffusers.utils import export_to_video

pipe = LTXPipeline.from_pretrained(
    "Lightricks/LTX-Video", torch_dtype=torch.bfloat16
).to("cuda")

prompts = [
    "धूप से जगमगाती खिड़की की देहलीज़ पर खिंचती हुई बिल्ली, हवा में तैरते धूल कण",
    "काले ज्वालामुखीय रेत पर टकराती लहरों का हवाई दृश्य",
    "मैदानी क्षेत्र के ऊपर लुढ़कते तूफ़ानी बादलों का टाइम-लैप्स",
]

for i, prompt in enumerate(prompts):
    frames = pipe(
        prompt=prompt,
        num_frames=121,
        width=768,
        height=512,
        num_inference_steps=30,
        guidance_scale=7.5,
    ).frames[0]
    export_to_video(frames, f"batch_{i:03d}.mp4", fps=24)
    print(f"[{i+1}/{len(prompts)}] पूरा")
```

## Clore.ai उपयोगकर्ताओं के लिए सुझाव

1. **गति बेंचमार्क** — RTX 4090 पर, LTX-Video लगभग 4 सेकंड में 121 फ्रेम जनरेट करता है; इसका उपयोग इस बात की पुष्टि के लिए करें कि आपका रेंटल सही ढंग से काम कर रहा है।
2. **bf16 परिशुद्धता** — चेकपॉइंट bf16 में प्रशिक्षित है; fp16 पर स्विच न करें, वरना गुणवत्ता घट सकती है।
3. **वज़न कैश करें** — सेट करें `HF_HOME=/workspace/hf_cache` एक स्थायी वॉल्यूम पर। मॉडल लगभग 6 GB का है; हर कंटेनर स्टार्ट पर फिर से डाउनलोड करना समय बर्बाद करता है।
4. **प्रॉम्प्ट इंजीनियरिंग** — LTX-Video सिनेमाई भाषा पर अच्छी प्रतिक्रिया देता है: "ड्रोन शॉट", "स्लो मोशन", "गोल्डन आवर", "ट्रैकिंग शॉट"। कैमरा मूवमेंट के बारे में स्पष्ट रहें।
5. **रात भर बैच में** — LTX-Video इतना तेज़ है कि 4090 पर प्रति घंटे सैकड़ों क्लिप्स बना सकता है। फ़ाइल से प्रॉम्प्ट्स कतार में लगाएँ और इसे चलने दें।
6. **SSH + tmux** — हमेशा एक `tmux` सेशन के अंदर जनरेशन चलाएँ, ताकि कनेक्शन टूटने पर लंबे बैच जॉब्स बाधित न हों।
7. **VRAM की निगरानी करें** — `watch -n1 nvidia-smi` एक दूसरे टर्मिनल में, ताकि यह सुनिश्चित हो सके कि आप स्वैप का उपयोग नहीं कर रहे हैं।

## समस्या निवारण

| समस्या                              | ठीक करें                                                                                                  |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `OutOfMemoryError`                  | कम करें `num_frames` को 81 या `चौड़ाई`/`ऊँचाई` को 512×320                                                 |
| diffusers में मॉडल नहीं मिला        | अपग्रेड करें: `pip install -U diffusers` — LTXPipeline के लिए diffusers ≥ 0.32 आवश्यक है                  |
| काला या स्थिर आउटपुट                | सुनिश्चित करें कि आप एक `negative_prompt`पास करें; `guidance_scale` को 8–9 तक बढ़ाएँ                      |
| `ImportError: imageio`              | `pip install imageio[ffmpeg]` — MP4 निर्यात के लिए ffmpeg बैकएंड आवश्यक है                                |
| धीमा पहला inference                 | पहली बार चलाने पर CUDA kernels compile होते हैं और weights डाउनलोड होते हैं; उसके बाद के रन तेज़ होते हैं |
| रंग बैंडिंग आर्टिफैक्ट              | उपयोग करें `torch.bfloat16` (float16 नहीं); bfloat16 की डायनेमिक रेंज अधिक व्यापक होती है                 |
| जॉब के बीच में कंटेनर पुनः आरंभ हुआ | सेट करें `HF_HOME` स्थायी स्टोरेज पर; आंशिक HF डाउनलोड स्वतः फिर से शुरू हो जाते हैं                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.clore.ai/guides/guides_v2-hi/video-generation/ltx-video.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
