> 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/hunyuan-video.md).

# Hunyuan Video

टेनसेंट के ओपन-सोर्स Hunyuan Video के साथ उच्च-गुणवत्ता वाले वीडियो उत्पन्न करें।

{% hint style="success" %}
सभी उदाहरण GPU सर्वरों पर चलाए जा सकते हैं जिन्हें द्वारा किराए पर लिया गया है [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace).
{% endhint %}

## CLORE.AI पर किराये पर लेना

1. पर जाएँ [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace)
2. GPU प्रकार, VRAM, और मूल्य के अनुसार फ़िल्टर करें
3. चुनें **ऑन-डिमांड** (निश्चित दर) या **स्पॉट** (बिड प्राइस)
4. अपना ऑर्डर कॉन्फ़िगर करें:
   * Docker इमेज चुनें
   * पोर्ट सेट करें (SSH के लिए TCP, वेब UI के लिए HTTP)
   * यदि आवश्यक हो तो एनवायरनमेंट वेरिएबल जोड़ें
   * स्टार्टअप कमांड दर्ज करें
5. भुगतान चुनें: **CLORE**, **BTC**, या **USDT/USDC**
6. ऑर्डर बनाएं और डिप्लॉयमेंट का इंतज़ार करें

### अपने सर्वर तक पहुँचें

* कनेक्शन विवरण में खोजें **मेरे ऑर्डर**
* वेब इंटरफेस: HTTP पोर्ट URL का उपयोग करें
* SSH: `ssh -p <port> root@<proxy-address>`

## Hunyuan Video क्या है?

टेनसेंट का Hunyuan Video प्रदान करता है:

* उच्च-गुणवत्ता टेक्स्ट-टू-वीडियो जनरेशन
* 5+ सेकंड के वीडियो क्लिप
* 720p रिज़ॉल्यूशन
* ओपन-सोर्स और व्यावसायिक उपयोग योग्य

## संसाधन

* **मॉडल:** [tencent/HunyuanVideo](https://huggingface.co/tencent/HunyuanVideo)
* **GitHub:** [Tencent/HunyuanVideo](https://github.com/Tencent/HunyuanVideo)
* **पेपर:** [HunyuanVideo पेपर](https://arxiv.org/abs/2412.03603)

## अनुशंसित हार्डवेयर

| घटक     | न्यूनतम       | अनुशंसित   | सर्वोत्तम  |
| ------- | ------------- | ---------- | ---------- |
| GPU     | RTX 4090 24GB | A100 40GB  | A100 80GB  |
| VRAM    | 24GB          | 40GB       | 80GB       |
| CPU     | 8 कोर         | 16 कोर     | 32 कोर     |
| RAM     | 32GB          | 64GB       | 128GB      |
| स्टोरेज | 100GB NVMe    | 200GB NVMe | 500GB NVMe |
| इंटरनेट | 500 Mbps      | 1 Gbps     | 1 Gbps     |

## CLORE.AI पर त्वरित डिप्लॉय

**Docker इमेज:**

```
pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
```

**पोर्ट:**

```
22/tcp
7860/http
```

**कमांड:**

```bash
git clone https://github.com/Tencent/HunyuanVideo.git && \
cd HunyuanVideo && \
pip install -r requirements.txt && \
python sample_video.py --prompt "A cat walking in a garden"
```

## अपनी सेवा तक पहुँचना

डिप्लॉयमेंट के बाद, अपना खोजें `http_pub` URL में **मेरे ऑर्डर**:

1. जाएँ **मेरे ऑर्डर** पृष्ठ
2. अपने ऑर्डर पर क्लिक करें
3. खोजें `http_pub` URL (उदा., `abc123.clorecloud.net`)

उपयोग करें `https://YOUR_HTTP_PUB_URL` की बजाय `localhost` नीचे दिए उदाहरणों में।

## इंस्टॉलेशन

```bash
git clone https://github.com/Tencent/HunyuanVideo.git
cd HunyuanVideo
pip install -r requirements.txt

# मॉडल डाउनलोड करें
python download_models.py
```

## आप क्या बना सकते हैं

### मार्केटिंग सामग्री

* उत्पाद प्रदर्शन वीडियो
* सोशल मीडिया क्लिप
* प्रमोशनल एनिमेशन

### रचनात्मक प्रोजेक्ट

* म्यूजिक वीडियो कॉन्सेप्ट
* शॉर्ट फिल्म प्रोटोटाइप
* कला स्थापना

### शिक्षा और प्रशिक्षण

* व्याख्यात्मक वीडियो ड्राफ्ट
* प्रशिक्षण सामग्री अवधारणाएँ
* संकल्पनाओं का विज़ुअलाइज़ेशन

## मूल उपयोग

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

pipe = HunyuanVideoPipeline.from_pretrained(
    "tencent/HunyuanVideo",
    torch_dtype=torch.float16
)
pipe.to("cuda")
pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()

prompt = "A majestic eagle soaring over snow-capped mountains, cinematic lighting, 4K"

video_frames = pipe(
    prompt=prompt,
    num_frames=45,
    num_inference_steps=50,
    guidance_scale=7.0
).frames[0]

export_to_video(video_frames, "eagle.mp4", fps=15)
```

## उन्नत जनरेशन

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

pipe = HunyuanVideoPipeline.from_pretrained(
    "tencent/HunyuanVideo",
    torch_dtype=torch.float16
)
pipe.to("cuda")
pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()
pipe.vae.enable_slicing()

video_frames = pipe(
    prompt="Time-lapse of a flower blooming, macro photography, detailed petals",
    negative_prompt="blurry, low quality, distorted, ugly",
    num_frames=45,
    height=544,
    width=960,
    num_inference_steps=50,
    guidance_scale=7.0,
    generator=torch.Generator("cuda").manual_seed(42)
).frames[0]

export_to_video(video_frames, "flower_bloom.mp4", fps=15)
```

## प्रॉम्प्ट उदाहरण

### प्रकृति और परिदृश्य

```python
prompts = [
    "Aurora borealis dancing over a frozen lake, time-lapse, ethereal",
    "Ocean waves crashing on volcanic black sand beach, slow motion",
    "Thunderstorm over a wheat field, dramatic lighting, 4K",
    "Cherry blossoms falling in a Japanese garden, spring, peaceful"
]
```

### साइंस-फाई और फैंटेसी

```python
prompts = [
    "Spaceship launching from a futuristic city, cinematic, detailed",
    "Dragon flying through clouds at sunset, epic, fantasy",
    "Robot walking through neon-lit streets, cyberpunk, rain",
    "Magical portal opening in an ancient forest, mystical lights"
]
```

### Abstract और कलात्मक

```python
prompts = [
    "Ink drops diffusing in water, macro, colorful, abstract",
    "Geometric shapes morphing and transforming, motion graphics",
    "Light painting in darkness, long exposure effect, vibrant"
]
```

## बैच जनरेशन

```python
import os
import torch
from diffusers import HunyuanVideoPipeline
from diffusers.utils import export_to_video

pipe = HunyuanVideoPipeline.from_pretrained("tencent/HunyuanVideo", torch_dtype=torch.float16)
pipe.to("cuda")
pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()

prompts = [
    "Underwater coral reef with colorful fish swimming",
    "City traffic time-lapse at night, light trails",
    "Butterfly emerging from cocoon, nature documentary"
]

output_dir = "./videos"
os.makedirs(output_dir, exist_ok=True)

for i, prompt in enumerate(prompts):
    print(f"Generating {i+1}/{len(prompts)}: {prompt[:50]}...")

    video_frames = pipe(
        prompt=prompt,
        num_frames=45,
        num_inference_steps=50,
        guidance_scale=7.0
    ).frames[0]

    export_to_video(video_frames, f"{output_dir}/video_{i:03d}.mp4", fps=15)
```

## Gradio इंटरफ़ेस

```python
import gradio as gr
import torch
from diffusers import HunyuanVideoPipeline
from diffusers.utils import export_to_video
import tempfile

pipe = HunyuanVideoPipeline.from_pretrained("tencent/HunyuanVideo", torch_dtype=torch.float16)
pipe.to("cuda")
pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()

def generate(prompt, negative_prompt, num_frames, steps, guidance, seed):
    generator = torch.Generator("cuda").manual_seed(seed) if seed > 0 else None

    video_frames = pipe(
        prompt=prompt,
        negative_prompt=negative_prompt,
        num_frames=num_frames,
        num_inference_steps=steps,
        guidance_scale=guidance,
        generator=generator
    ).frames[0]

    with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as f:
        export_to_video(video_frames, f.name, fps=15)
        return f.name

demo = gr.Interface(
    fn=generate,
    inputs=[
        gr.Textbox(label="Prompt", lines=3),
        gr.Textbox(label="Negative Prompt", value="blurry, low quality"),
        gr.Slider(16, 60, value=45, step=1, label="Frames"),
        gr.Slider(20, 100, value=50, step=5, label="Steps"),
        gr.Slider(3, 12, value=7, step=0.5, label="Guidance"),
        gr.Number(value=-1, label="Seed")
    ],
    outputs=gr.Video(label="Generated Video"),
    title="Hunyuan Video - Text to Video on CLORE.AI"
)

demo.launch(server_name="0.0.0.0", server_port=7860)
```

## प्रदर्शन

| रिज़ॉल्यूशन | फ्रेम्स | GPU       | समय      |
| ----------- | ------- | --------- | -------- |
| 544x960     | 45      | RTX 4090  | \~5 मिनट |
| 544x960     | 45      | A100 40GB | \~3 मिनट |
| 544x960     | 45      | A100 80GB | \~2 मिनट |
| 720x1280    | 45      | A100 80GB | \~4 मिनट |

## सामान्य समस्याएँ और समाधान

### आउट ऑफ़ मेमोरी

**समस्या:** 24GB GPU पर CUDA में मेमोरी खत्म

**समाधान:**

```python

# सभी मेमोरी अनुकूलन सक्षम करें
pipe.enable_model_cpu_offload()
pipe.enable_sequential_cpu_offload()  # और अधिक आक्रामक
pipe.vae.enable_tiling()
pipe.vae.enable_slicing()

# फ्रेम और रिज़ॉल्यूशन कम करें
video = pipe(prompt, num_frames=24, height=480, width=720).frames[0]
```

### धीमा जनरेशन

**समस्या:** जनरेट करने में बहुत समय लगता है

**समाधान:**

* घटाएँ `num_inference_steps` (30-40 अभी भी अच्छे परिणाम देता है)
* घटाएँ `num_frames` (24 फ्रेम = 15fps पर 1.6s)
* तेज़ प्रोसेसिंग के लिए A100 GPU का उपयोग करें
* मॉडल लोडिंग के लिए सुनिश्चित करें कि आपके पास NVMe स्टोरेज है

### खराब वीडियो गुणवत्ता

**समस्या:** धुंधला या असंगत मोशन

**समाधान:**

* बढ़ाएँ `num_inference_steps` to 75-100
* समायोजित करें `guidance_scale` (6-8 सबसे अच्छा काम करता है)
* और अधिक विस्तृत प्रॉम्प्ट लिखें
* समस्याओं से बचने के लिए नेगेटिव प्रॉम्प्ट जोड़ें

### वीडियो आर्टिफैक्ट्स

**समस्या:** झिलमिलाना या अस्थायी असंगतताएँ

**समाधान:**

* पुनरुत्पादन के लिए सुसंगत सीड का उपयोग करें
* तेज़ गति वाले प्रॉम्प्ट से बचें
* वीडियो स्थिरीकरण के साथ पोस्ट-प्रोसेस करें

## समस्याओं का निवारण

{% hint style="danger" %}
**मेमोरी खत्म**
{% endhint %}

* Hunyuan के लिए न्यूनतम 24GB+ VRAM आवश्यक है
* बेहतरीन परिणामों के लिए A100 40GB/80GB का उपयोग करें
* वीडियो लंबाई/रिज़ॉल्यूशन घटाएँ

### वीडियो जनरेशन विफल हो रहा है

* सुनिश्चित करें कि सभी मॉडल फाइलें सही ढंग से डाउनलोड हुई हैं
* पर्याप्त डिस्क स्थान सुनिश्चित करें (100GB+)
* CUDA और PyTorch अनुकूलता सत्यापित करें

### खराब वीडियो गुणवत्ता

* इन्फरेंस स्टेप्स बढ़ाएँ
* और वर्णनात्मक प्रॉम्प्ट का उपयोग करें
* इनपुट रिज़ॉल्यूशन की जांच करें कि यह अपेक्षित से मेल खाता है

### धीमी जनरेशन

* वीडियो जनरेशन कंप्यूट-गहन है
* तेज़ परिणामों के लिए A100/H100 का उपयोग करें
* पहले छोटे क्लिप पर विचार करें

## लागत अनुमान

सामान्य CLORE.AI मार्केटप्लेस दरें (2024 के अनुसार):

| GPU       | घंटात्मक दर | दैनिक दर | 4-घंटे सत्र |
| --------- | ----------- | -------- | ----------- |
| RTX 3060  | \~$0.03     | \~$0.70  | \~$0.12     |
| RTX 3090  | \~$0.06     | \~$1.50  | \~$0.25     |
| RTX 4090  | \~$0.10     | \~$2.30  | \~$0.40     |
| A100 40GB | \~$0.17     | \~$4.00  | \~$0.70     |
| A100 80GB | \~$0.25     | \~$6.00  | \~$1.00     |

*कीमतें प्रदाता और मांग के अनुसार बदलती हैं। जाँच करें* [*CLORE.AI मार्केटप्लेस*](https://clore.ai/marketplace) *वर्तमान दरों के लिए।*

**पैसे बचाएँ:**

* उपयोग करें **स्पॉट** लचीले वर्कलोड के लिए मार्केट (अक्सर 30-50% सस्ता)
* भुगतान करें **CLORE** टोकन के साथ
* विभिन्न प्रदाताओं के बीच कीमतों की तुलना करें

## अगले कदम

* CogVideoX - वैकल्पिक T2V
* Wan2.1 Video - एक और T2V विकल्प
* AnimateDiff - इमेज एनिमेशन


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
