> 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/3d-generation/hunyuan3d.md).

# Hunyuan3D 2.1

Tencent द्वारा Hunyuan3D 2.1 एक दो-चरणीय 3D जनरेशन मॉडल है: यह पहले ज्यामिति (आकार) का पूर्वानुमान लगाता है, फिर PBR टेक्सचर संश्लेषित करता है। यह टेक्स्ट प्रॉम्प्ट और संदर्भ छवियों दोनों को इनपुट के रूप में स्वीकार करता है और GLB, OBJ, या PLY फॉर्मेट में प्रोडक्शन-रेडी मेष आउटपुट करता है। HuggingFace पर 3 मिलियन से अधिक डाउनलोड के साथ, यह सबसे व्यापक रूप से अपनाए गए ओपन-सोर्स 3D जनरेशन मॉडलों में से एक है।

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

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

* **टेक्स्ट-टू-3D और इमेज-टू-3D** — दोनों इनपुट मोड एक ही मॉडल में
* **दो-चरण पाइपलाइन** — पहले आकृति जनरेशन फिर PBR टेक्सचर संश्लेषण
* **उच्च-विश्वसनीयता आउटपुट** — अल्बेडो, नॉर्मल और रफनेस मैप के साथ विस्तृत ज्यामिति
* **कई एक्सपोर्ट फॉर्मेट** — GLB, OBJ, PLY
* **Gradio वेब UI** — ब्राउज़र-आधारित इंटरैक्शन, किसी कोडिंग की आवश्यकता नहीं
* **16–24 GB VRAM** — RTX 3090 और RTX 4090 पर चलता है
* **3M+ डाउनलोड** HuggingFace पर — सक्रिय समुदाय और निरंतर अपडेट

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

| घटक    | न्यूनतम        | अनुशंसित       |
| ------ | -------------- | -------------- |
| GPU    | RTX 3090 24 GB | RTX 4090 24 GB |
| VRAM   | 16 GB          | 24 GB          |
| RAM    | 16 GB          | 32 GB          |
| डिस्क  | 50 GB          | 100 GB         |
| CUDA   | 11.8           | 12.1+          |
| Python | 3.10           | 3.11           |

**Clore.ai मूल्य निर्धारण:** RTX 4090 ≈ $0.5–2/दिन · RTX 3090 ≈ $0.3–1/दिन

## त्वरित प्रारम्भ

### 1. क्लोन और इंस्टॉल करें

```bash
git clone https://github.com/Tencent/Hunyuan3D-2.git
cd Hunyuan3D-2

# एनवायरनमेंट बनाएं
conda create -n hunyuan3d python=3.10 -y
conda activate hunyuan3d

# PyTorch इंस्टॉल करें
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121

# निर्भरताएँ इंस्टॉल करें
pip install -r requirements.txt

# मॉडल वेट्स डाउनलोड करें (पहली बार रन पर स्वतः डाउनलोड, कुल ~15 GB)
python -c "from hy3dgen.shapegen import Hunyuan3DDiTFlowMatchingPipeline; Hunyuan3DDiTFlowMatchingPipeline.from_pretrained('tencent/Hunyuan3D-2')"
```

### 2. Gradio वेब UI लॉन्च करें

```bash
python gradio_app.py --port 7860 --share
```

UI प्रदान करता है:

* टेक्स्ट-टू-3D जनरेशन के लिए टेक्स्ट इनपुट फ़ील्ड
* इमेज-टू-3D जनरेशन के लिए इमेज अपलोड
* इन्फेरेंस स्टेप्स, गाइडेंस स्केल और सीड के लिए स्लाइडर
* ऑर्बिट कंट्रोल के साथ 3D मॉडल प्रीव्यू
* GLB/OBJ/PLY के लिए डाउनलोड बटन

### 3. Python API के माध्यम से जनरेट करें

```python
from hy3dgen.shapegen import Hunyuan3DDiTFlowMatchingPipeline
from hy3dgen.texgen import Hunyuan3DPaintPipeline

# चरण 1: आकृति जनरेशन
shape_pipeline = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(
    "tencent/Hunyuan3D-2",
    subfolder="shapegen",
)
shape_pipeline.to("cuda")

# टेक्स्ट से मेष जनरेट करें
mesh = shape_pipeline(
    prompt="a detailed medieval sword with ornate handle",
    num_inference_steps=30,
    guidance_scale=7.5,
    seed=42,
)[0]

mesh.export("sword_shape.glb")
```

### 4. टेक्सचर जोड़ें (चरण 2)

```python
# चरण 2: टेक्सचर संश्लेषण
texture_pipeline = Hunyuan3DPaintPipeline.from_pretrained(
    "tencent/Hunyuan3D-2",
    subfolder="texgen",
)
texture_pipeline.to("cuda")

textured_mesh = texture_pipeline(
    mesh=mesh,
    prompt="a detailed medieval sword with ornate handle",
    num_inference_steps=20,
    seed=42,
)[0]

textured_mesh.export("sword_textured.glb")
```

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

### इमेज-टू-3D जनरेशन

```python
from PIL import Image

# संदर्भ छवि लोड करें
image = Image.open("reference_chair.png")

# छवि से आकृति जनरेट करें
mesh = shape_pipeline(
    image=image,
    num_inference_steps=30,
    guidance_scale=7.5,
    seed=42,
)[0]

# टेक्सचर लागू करें
textured = texture_pipeline(
    mesh=mesh,
    image=image,
    num_inference_steps=20,
    seed=42,
)[0]

textured.export("chair.glb")
```

### बैच प्रोसेसिंग

```python
from pathlib import Path

prompts = [
    "a red sports car, low-poly game asset",
    "a wooden treasure chest, PBR material",
    "a sci-fi helmet with visor, hard surface",
]

output_dir = Path("/workspace/3d-output")
output_dir.mkdir(exist_ok=True)

for i, prompt in enumerate(prompts):
    mesh = shape_pipeline(prompt=prompt, num_inference_steps=30, seed=42)[0]
    textured = texture_pipeline(mesh=mesh, prompt=prompt, num_inference_steps=20, seed=42)[0]
    textured.export(str(output_dir / f"asset_{i:03d}.glb"))
    print(f"Generated: asset_{i:03d}.glb — {prompt[:40]}")
```

### कई फॉर्मैट में एक्सपोर्ट करें

```python
# GLB (अनुशंसित — टेक्सचर शामिल करता है, यूनिवर्सल फॉर्मेट)
textured_mesh.export("model.glb")

# OBJ (MTL मैटेरियल फ़ाइल के साथ)
textured_mesh.export("model.obj")

# PLY (वर्टेक्स रंग, पॉइंट क्लाउड संगत)
textured_mesh.export("model.ply")
```

## प्रदर्शन संदर्भ

| GPU      | आकृति (30 स्टेप्स) | टेक्सचर (20 स्टेप्स) | कुल        |
| -------- | ------------------ | -------------------- | ---------- |
| RTX 4090 | \~20 सेकंड         | \~15 सेकंड           | \~35 सेकंड |
| RTX 3090 | \~30 सेकंड         | \~25 सेकंड           | \~55 सेकंड |
| A100 40G | \~18 सेकंड         | \~12 सेकंड           | \~30 सेकंड |

## टिप्स

* **छवि पृष्ठभूमि निकालें** इमेज-टू-3D से पहले — उपयोग करें `rembg` साफ सेगमेंटेशन के लिए
* **टेक्स्ट प्रॉम्प्ट्स specificity से लाभान्वित होते हैं** — "a low-poly medieval sword with leather-wrapped handle" "sword" की तुलना में बेहतर परिणाम देता है
* **कम करें `num_inference_steps`** तेज प्रीव्यू के लिए इटरेशन के दौरान 15–20 पर
* **बढ़ाएँ `guidance_scale`** (8–12) बेहतर प्रॉम्प्ट पालन के लिए, विविधता के खर्च पर
* **GLB सबसे अच्छा एक्सपोर्ट फॉर्मैट है** — यह ज्यामिति, टेक्सचर और मैटेरियल को एक ही फ़ाइल में बंडल करता है
* **उपयोग करें `--share`** Clore.ai पर Gradio लॉन्च करते समय दूरस्थ ब्राउज़र एक्सेस के लिए
* **मॉडल वेट्स \~15 GB हैं** — पहली बार रन से पहले पर्याप्त डिस्क स्थान सुनिश्चित करें
* **गेम एसेट्स के लिए**, उच्च गुणवत्ता में जनरेट करें फिर LOD स्तरों के लिए Blender में डेसिमेट करें

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

| समस्या                              | समाधान                                                                                    |
| ----------------------------------- | ----------------------------------------------------------------------------------------- |
| `CUDA में आउट ऑफ मेमोरी`            | RTX 3090+ (24 GB) का उपयोग करें। बैच साइज या इन्फेरेंस स्टेप्स कम करें                    |
| मॉडल डाउनलोड अटके हुए               | डिस्क स्पेस चेक करें। उपयोग करें `huggingface-cli download tencent/Hunyuan3D-2` मैन्युअली |
| Gradio UI पहुँच योग्य नहीं          | फ्लैग पास करें `--share` या Clore.ai डैशबोर्ड से पोर्ट 7860 फॉरवर्ड करें                  |
| खराब ज्यामिति गुणवत्ता              | बढ़ाएँ `num_inference_steps` 40+ पर जाएं, अलग सीड आज़माएँ                                 |
| टेक्सचर आर्टिफैक्ट्स                | टेक्सचर चरण से पहले सुनिश्चित करें कि आकृति मेष साफ है                                    |
| ताज़ी इंस्टॉल पर इम्पोर्ट त्रुटियां | चलाएँ `pip install -r requirements.txt` फिर से — कुछ डिप्स स्रोत से कम्पाइल होते हैं      |
| पहली रन पर धीमा जनरेशन              | अपेक्षित — मॉडल कम्पाइलेशन और वेट लोडिंग पहली इन्फेरेंस के बाद कैश हो जाती है             |

## संसाधन

* [Hunyuan3D-2 GitHub](https://github.com/Tencent/Hunyuan3D-2)
* [HuggingFace मॉडल](https://huggingface.co/tencent/Hunyuan3D-2)
* [CLORE.AI मार्केटप्लेस](https://clore.ai/marketplace)


---

# 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/3d-generation/hunyuan3d.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.
