> 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/mochi-1.md).

# Mochi-1 वीडियो

**Mochi-1** Genmo का ओपन-सोर्स 10 अरब पैरामीटर वाला वीडियो जनरेशन मॉडल है, जो भौतिक रूप से यथार्थवादी गति के साथ 848×480 @ 30fps आउटपुट तैयार करता है। यह asymmetric diffusion transformer (AsymmDiT) आर्किटेक्चर का उपयोग करता है और गति की विश्वसनीयता के लिए शीर्ष-गुणवत्ता वाले ओपन-सोर्स वीडियो मॉडलों में गिना जाता है। इसे Clore.ai के GPU क्लाउड पर तैनात करके आप व्यावसायिक API लागत के एक छोटे हिस्से में प्रोफेशनल-ग्रेड वीडियो बना सकते हैं।

***

## Mochi-1 क्या है?

Mochi-1 एक **10 अरब पैरामीटर वाला** वीडियो डिफ्यूजन मॉडल है, जिसे निम्न बनाने के लिए प्रशिक्षित किया गया है:

* स्मूद, भौतिक रूप से संभाव्य गति
* उच्च समयिक स्थिरता
* प्रॉम्प्ट का मजबूत अनुपालन
* 848×480 रिज़ॉल्यूशन पर 30 fps

यह एक **asymmetric diffusion transformer** (AsymmDiT) आर्किटेक्चर का उपयोग करता है — वीडियो और टेक्स्ट के लिए अलग encoder depths — जिससे बड़े पैमाने पर कुशल inference संभव होता है। वज़न Genmo Open Source License के तहत जारी किए गए हैं, जो शोध और व्यावसायिक उपयोग के लिए निःशुल्क हैं।

**मॉडल की मुख्य विशेषताएँ:**

* 10 अरब पैरामीटर
* नेटिव 848×480 @ 30 fps आउटपुट
* उच्च मोशन निष्ठा (समुदाय बेंचमार्क में शीर्ष स्थान)
* diffusers इंटीग्रेशन के साथ Hugging Face पर उपलब्ध
* आसान इंटरैक्शन के लिए Gradio डेमो UI

***

## पूर्वापेक्षाएँ

| आवश्यकता | न्यूनतम  | अनुशंसित    |
| -------- | -------- | ----------- |
| GPU VRAM | 24 GB    | 40–80 GB    |
| GPU      | RTX 4090 | A100 / H100 |
| RAM      | 32 GB    | 64 GB       |
| स्टोरेज  | 60 GB    | 100 GB      |
| CUDA     | 12.8+    | 12.8+       |

{% hint style="warning" %}
Mochi-1 एक बड़ा मॉडल है (fp8 में लगभग 40 GB / bf16 में लगभग 80 GB)। एक अकेला RTX 4090 (24 GB) इसे quantization के साथ चला सकता है। पूर्ण गुणवत्ता के लिए A100 40 GB या उससे बड़ा उपयोग करें। Multi-GPU सेटअप समर्थित हैं।
{% endhint %}

***

## चरण 1 — Clore.ai पर GPU किराए पर लें

1. पर जाएँ [clore.ai](https://clore.ai) और साइन इन करें।
2. क्लिक करें **मार्केटप्लेस** और फ़िल्टर करें:
   * VRAM: **≥ 24 GB** (RTX 4090 न्यूनतम, A100 अनुशंसित)
   * Multi-GPU के लिए: GPU count ≥ 2 से फ़िल्टर करें
3. अपना सर्वर चुनें और क्लिक करें **कॉन्फ़िगर करें**.
4. Docker image सेट करें `pytorch/pytorch:2.11.0-cuda12.8-cudnn9-devel` (base image — हम इसके अंदर Mochi इंस्टॉल करेंगे)।
5. ओपन पोर्ट सेट करें: `22` (SSH) और `7860` (Gradio UI)।
6. क्लिक करें **किराए पर लें**.

{% hint style="info" %}
Clore.ai A100 40 GB instances को शुरू होने वाली कीमत से सूचीबद्ध करता है [bare metal](https://clore.ai/bare-metal). Mochi-1 को पूर्ण गुणवत्ता पर चलाने के लिए, यह सबसे किफायती विकल्प है।
{% endhint %}

***

## चरण 2 — कस्टम Dockerfile

अपना स्वयं का image build करें या इसका उपयोग करें `Dockerfile` एक तैयार-से-उपयोग Mochi-1 environment बनाने के लिए:

```dockerfile
FROM pytorch/pytorch:2.11.0-cuda12.8-cudnn9-devel

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \\
    git wget curl ffmpeg \\
    libgl1 libglib2.0-0 \\
    openssh-server \\
    && rm -rf /var/lib/apt/lists/*

# SSH कॉन्फ़िगर करें
RUN mkdir /var/run/sshd && \\
    echo 'root:clore123' | chpasswd && \\
    sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \\
    sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config

WORKDIR /workspace

# Mochi-1 repository क्लोन करें
RUN git clone https://github.com/genmoai/mochi /workspace/mochi

# Python dependencies इंस्टॉल करें
RUN cd /workspace/mochi && \\
    pip install --upgrade pip && \\
    pip install -e . && \\
    pip install gradio huggingface_hub

EXPOSE 22 7860

CMD service ssh start && \\
    echo "Mochi-1 environment तैयार है। पहले download script चलाएँ, फिर demo लॉन्च करें." && \\
    tail -f /dev/null
```

### Docker Hub पर Build और Push करें

इमेज को स्थानीय रूप से build करें और इसे अपने Docker Hub खाते पर push करें (बदलें `YOUR_DOCKERHUB_USERNAME` अपने वास्तविक उपयोगकर्ता नाम से):

```bash
docker build -t YOUR_DOCKERHUB_USERNAME/mochi-1:latest .
docker push YOUR_DOCKERHUB_USERNAME/mochi-1:latest
```

फिर इसका उपयोग करें `YOUR_DOCKERHUB_USERNAME/mochi-1:latest` Clore.ai में अपनी Docker image के रूप में।

{% hint style="info" %}
Docker Hub पर Mochi-1 के लिए कोई आधिकारिक pre-built Docker image नहीं है। आपको ऊपर दिए गए Dockerfile से build करना होगा। वैकल्पिक रूप से, सीधे `pytorch/pytorch:2.11.0-cuda12.8-cudnn9-devel` को base image के रूप में उपयोग करें और SSH के माध्यम से setup commands मैन्युअल रूप से चलाएँ।
{% endhint %}

***

## चरण 3 — SSH के माध्यम से कनेक्ट करें

एक बार आपका instance चलने लगे:

```bash
ssh root@<clore-host> -p <assigned-ssh-port>
```

***

## चरण 4 — Mochi-1 वज़न डाउनलोड करें

मॉडल वज़न Hugging Face पर होस्ट किए गए हैं। इन्हें `huggingface_hub` CLI के माध्यम से डाउनलोड करें:

```bash
cd /workspace

# यदि huggingface-cli पहले से मौजूद न हो तो इसे इंस्टॉल करें
pip install -U huggingface_hub

# Mochi-1 वज़न डाउनलोड करें (~ bf16 के लिए 40 GB)
huggingface-cli download genmo/mochi-1-preview \\
    --local-dir /workspace/mochi-weights \\
    --include "*.safetensors" "*.json" "*.txt"
```

{% hint style="info" %}
पूरा bf16 मॉडल लगभग 80 GB का है। `fp8` quantized संस्करण लगभग 40 GB का है और CPU offloading के साथ RTX 4090 (24 GB) पर चलता है। निर्दिष्ट करें `--include "*fp8*"` केवल quantized वज़न डाउनलोड करने के लिए।
{% endhint %}

### विकल्प: केवल fp8 quantized वज़न डाउनलोड करें

```bash
huggingface-cli download genmo/mochi-1-preview \\
    --local-dir /workspace/mochi-weights \\
    --include "*fp8*" "*.json" "*.txt"
```

***

## चरण 5 — Gradio डेमो लॉन्च करें

Mochi-1 आसान text-to-video जनरेशन के लिए Gradio web UI के साथ आता है:

```bash
cd /workspace/mochi

python demos/gradio_ui.py \\
    --model_dir /workspace/mochi-weights \\
    --share False \\
    --host 0.0.0.0 \\
    --port 7860
```

**कम-VRAM मोड के लिए (RTX 4090, 24 GB):**

```bash
python demos/gradio_ui.py \\
    --model_dir /workspace/mochi-weights \\
    --cpu_offload \\
    --share False \\
    --host 0.0.0.0 \\
    --port 7860
```

{% hint style="info" %}
यह `--cpu_offload` यह flag उपयोग न होने पर model layers को CPU RAM में भेज देता है, जिससे peak VRAM \~18–20 GB तक घट जाती है, लेकिन generation लगभग 2× धीमी हो जाती है।
{% endhint %}

***

## चरण 6 — Web UI तक पहुँचें

अपना browser खोलें और यहाँ जाएँ:

```
http://<clore-host>:<public-port-7860>
```

आपको Mochi-1 Gradio interface में यह दिखाई देगा:

* एक text prompt input
* Generation settings (steps, guidance scale, seed)
* Video output player

***

## चरण 7 — अपना पहला वीडियो बनाइए

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

**प्रकृति दृश्य:**

```
एक भव्य झरना, जो हरे-भरे वर्षावन में काई से ढकी चट्टानों पर झर रहा है, 
छतरियों के बीच से छनती सुनहरी घड़ी की धूप, धीमा सिनेमाई pan
```

**एक्शन दृश्य:**

```
एक चीता जो पूरी गति से खुले सवाना में दौड़ रहा है, 
पीछे धूल उड़ती हुई, नाटकीय वाइड शॉट, 4K वन्यजीव डॉक्यूमेंट्री
```

**अमूर्त/कलात्मक:**

```
पानी में धीमी गति से घूमता रंगीन पेंट, 
चटक नीले और नारंगी पिगमेंट का मिश्रण, मैक्रो लेंस, स्टूडियो लाइटिंग
```

### अनुशंसित सेटिंग्स

| पैरामीटर       | मान                  |
| -------------- | -------------------- |
| स्टेप्स        | 64                   |
| Guidance Scale | 4.5                  |
| अवधि           | 5.1 सेकंड (डिफ़ॉल्ट) |
| रिज़ॉल्यूशन    | 848×480 (नेटिव)      |

{% hint style="info" %}
Generation time GPU के अनुसार काफी बदलती है। A100 80 GB पर, 5-सेकंड का वीडियो लगभग **2–4 मिनट**. RTX 4090 के साथ CPU offload पर, अपेक्षा करें **8–15 मिनट**.
{% endhint %}

***

## Python API उपयोग

कार्यक्रमात्मक जनरेशन के लिए, diffusers pipeline का उपयोग करें:

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

# पाइपलाइन लोड करें
pipe = MochiPipeline.from_pretrained(
    "/workspace/mochi-weights",
    torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
pipe.enable_vae_slicing()

# वीडियो जनरेट करें
with torch.autocast("cuda", torch.bfloat16, cache_enabled=False):
    frames = pipe(
        prompt="एक सुनहरे रंग का retriever जो धूप वाले समुद्र तट पर fetch खेल रहा है, सिनेमाई",
        num_frames=84,
        guidance_scale=4.5,
        num_inference_steps=64,
        generator=torch.Generator("cuda").manual_seed(42)
    ).frames[0]

# Export
export_to_video(frames, "output.mp4", fps=30)
print("वीडियो output.mp4 में सहेजा गया")
```

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

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

pipe = MochiPipeline.from_pretrained(
    "/workspace/mochi-weights",
    torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()

prompts = [
    "धीमी गति में फूल पर बैठती तितली, मैक्रो फोटोग्राफी",
    "सूर्यास्त के समय चट्टानी कगारों से टकराती समुद्री लहरें, ड्रोन शॉट",
    "एक जमी हुई झील के ऊपर तारों भरे आकाश में नृत्य करती उत्तरी रोशनियाँ",
]

os.makedirs("/workspace/outputs", exist_ok=True)

for i, prompt in enumerate(prompts):
    frames = pipe(
        prompt=prompt,
        num_frames=84,
        guidance_scale=4.5,
        num_inference_steps=64,
    ).frames[0]
    
    output_path = f"/workspace/outputs/video_{i:03d}.mp4"
    export_to_video(frames, output_path, fps=30)
    print(f"सहेजा गया: {output_path}")
```

***

## बहु-GPU inference

अनेक GPUs के साथ तेज़ जनरेशन के लिए:

```python
import torch
from diffusers import MochiPipeline

# स्वचालित multi-GPU वितरण के लिए device_map का उपयोग करें
pipe = MochiPipeline.from_pretrained(
    "/workspace/mochi-weights",
    torch_dtype=torch.bfloat16,
    device_map="balanced"
)

# कई GPUs के साथ cpu_offload की आवश्यकता नहीं है
frames = pipe(
    prompt="यहाँ अपना प्रॉम्प्ट दें",
    num_frames=84,
    guidance_scale=4.5,
    num_inference_steps=64,
).frames[0]
```

{% hint style="info" %}
Clore.ai बहु-GPU सर्वर (2×, 4× RTX 4090 या A100) प्रदान करता है। 2× A100 80 GB के साथ, 5-सेकंड क्लिप के लिए generation time 60 सेकंड से कम हो जाता है।
{% endhint %}

***

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

### CUDA मेमोरी समाप्त

```
torch.cuda.OutOfMemoryError: CUDA मेमोरी समाप्त
```

**समाधान:**

1. जोड़ें `--cpu_offload` को gradio कमांड में
2. VAE slicing सक्षम करें: `pipe.enable_vae_slicing()`
3. कम करें `num_frames` (84 के बजाय 24 आज़माएँ)
4. bf16 के बजाय fp8 quantized वज़न का उपयोग करें

### मॉडल लोड होना धीमा

**समाधान:** सुनिश्चित करें कि वज़न HDD पर नहीं, बल्कि तेज़ NVMe drive पर हों। स्टोरेज गति जाँचें:

```bash
dd if=/dev/zero of=/workspace/test bs=1M count=1000 conv=fdatasync
```

### वीडियो artifacts / temporal flickering

**समाधान:**

* inference steps बढ़ाएँ (80–100 आज़माएँ)
* guidance scale समायोजित करें (आमतौर पर 3.5–5.0 दायरा सबसे अच्छा होता है)
* पुनरुत्पादन और iteration के लिए एक विशिष्ट seed का उपयोग करें

### Port 7860 पहुँच योग्य नहीं है

जाँचें कि port Clore.ai में सही ढंग से खोला गया है और Gradio server इससे bind हो रहा है `0.0.0.0`:

```bash
ss -tlnp | grep 7860
```

***

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

| GPU          | VRAM   | अनुमानित कीमत                             | 5 सेकंड वीडियो समय |
| ------------ | ------ | ----------------------------------------- | ------------------ |
| RTX 4090     | 24 GB  | $0.14–0.42/hr                             | \~10–15 मिनट       |
| A100 40GB    | 40 GB  | [bare metal](https://clore.ai/bare-metal) | \~3–5 मिनट         |
| A100 80GB    | 80 GB  | [bare metal](https://clore.ai/bare-metal) | \~2–3 मिनट         |
| 2× A100 80GB | 160 GB | [bare metal](https://clore.ai/bare-metal) | \~60–90 सेकंड      |

***

## Clore.ai GPU अनुशंसाएँ

{% hint style="warning" %}
**Clore.ai marketplace पर multi-GPU 80GB-class rigs सूचीबद्ध नहीं हैं।** आज सूचीबद्ध सबसे बड़े boxes 4× RTX PRO 6000 Blackwell (प्रत्येक 96GB, कुल 380GB) और 8–11× RTX 5090 (प्रत्येक 32GB) हैं। A100 / H200 / B200 क्षमता [bare metal](https://clore.ai/bare-metal) के रूप में अनुरोध पर बेची जाती है। देखें [GPU मूल्य और उपलब्धता](/guides/guides_v2-hi/getting-started/pricing.md) किसी deployment का आकार तय करने से पहले।
{% endhint %}

Mochi-1 VRAM बहुत खाता है — 10B parameter मॉडल के लिए सावधानीपूर्वक GPU चयन की आवश्यकता होती है।

| GPU          | VRAM   | Clore.ai मूल्य                            | मोड                        | 5 सेकंड वीडियो जनरेशन समय |
| ------------ | ------ | ----------------------------------------- | -------------------------- | ------------------------- |
| RTX 4090     | 24 GB  | $0.14–0.42/hr                             | केवल fp8 quantized         | \~10–15 मिनट              |
| A100 40GB    | 40 GB  | [bare metal](https://clore.ai/bare-metal) | bf16 अनुशंसित              | \~3–5 मिनट                |
| A100 80GB    | 80 GB  | [bare metal](https://clore.ai/bare-metal) | पूर्ण bf16, तेज़           | \~2–3 मिनट                |
| 2× A100 80GB | 160 GB | [bare metal](https://clore.ai/bare-metal) | tensor parallel, सबसे तेज़ | \~60–90 सेकंड             |

{% hint style="warning" %}
**RTX 3090 (24GB) अनुशंसित नहीं है** — Mochi-1 का fp8 मोड में कम-से-कम 24GB की आवश्यकता होती है और लगभग कोई अतिरिक्त स्थान नहीं छोड़ता। RTX 4090 (24GB) fp8 में काम करता है लेकिन लंबे sequences पर बार-बार OOM हो जाता है। विश्वसनीय परिणामों के लिए A100 40GB से शुरू करें।
{% endhint %}

**गुणवत्ता के लिए सर्वोत्तम मूल्य:** A100 40GB पर [bare metal](https://clore.ai/bare-metal) 3–5 मिनट में 5-सेकंड क्लिप बनाता है। यह लगभग $0.08–0.10 प्रति वीडियो क्लिप है — Runway ML ($0.25–0.50/clip) या Pika Labs subscriptions की तुलना में काफ़ी सस्ता।

***

## उपयोगी संसाधन

* [Mochi-1 GitHub](https://github.com/genmoai/mochi)
* [Hugging Face पर Mochi-1](https://huggingface.co/genmo/mochi-1-preview)
* [Genmo Blog — Mochi-1 रिलीज़](https://www.genmo.ai/blog/mochi-1)
* [Diffusers Mochi दस्तावेज़ीकरण](https://huggingface.co/docs/diffusers/api/pipelines/mochi)
* [Mochi Prompt Guide (समुदाय)](https://github.com/genmoai/mochi/blob/main/README.md)


---

# 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/mochi-1.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.
