Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
@@ -1,5 +1,203 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: hunyuan3d-2.0
|
3 |
+
license: other
|
4 |
+
license_name: tencent-hunyuan-community
|
5 |
+
license_link: https://huggingface.co/tencent/Hunyuan3D-2/blob/main/LICENSE.txt
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
- zh
|
9 |
+
tags:
|
10 |
+
- image-to-3d
|
11 |
+
- text-to-3d
|
12 |
+
pipeline_tag: text-to-3d
|
13 |
+
---
|
14 |
+
|
15 |
+
[中文阅读](README_zh_cn.md)
|
16 |
+
|
17 |
+
<p align="center">
|
18 |
+
<img src="./assets/images/teaser.jpg">
|
19 |
+
|
20 |
+
|
21 |
+
</p>
|
22 |
+
|
23 |
+
<div align="center">
|
24 |
+
<a href=https://3d.hunyuan.tencent.com target="_blank"><img src=https://img.shields.io/badge/Hunyuan3D-black.svg?logo=homepage height=22px></a>
|
25 |
+
<a href=https://huggingface.co/spaces/tencent/Hunyuan3D-2 target="_blank"><img src=https://img.shields.io/badge/%F0%9F%A4%97%20Demo-276cb4.svg height=22px></a>
|
26 |
+
<a href=https://huggingface.co/tencent/Hunyuan3D-2 target="_blank"><img src=https://img.shields.io/badge/%F0%9F%A4%97%20Models-d96902.svg height=22px></a>
|
27 |
+
<a href=https://3d-models.hunyuan.tencent.com/ target="_blank"><img src= https://img.shields.io/badge/Page-bb8a2e.svg?logo=github height=22px></a>
|
28 |
+
<a href=https://discord.gg/GuaWYwzKbX target="_blank"><img src= https://img.shields.io/badge/Page-white.svg?logo=discord height=22px></a>
|
29 |
+
</div>
|
30 |
+
|
31 |
+
|
32 |
+
[//]: # ( <a href=# target="_blank"><img src=https://img.shields.io/badge/Report-b5212f.svg?logo=arxiv height=22px></a>)
|
33 |
+
|
34 |
+
[//]: # ( <a href=# target="_blank"><img src= https://img.shields.io/badge/Colab-8f2628.svg?logo=googlecolab height=22px></a>)
|
35 |
+
|
36 |
+
[//]: # ( <a href="#"><img alt="PyPI - Downloads" src="https://img.shields.io/pypi/v/mulankit?logo=pypi" height=22px></a>)
|
37 |
+
|
38 |
+
<br>
|
39 |
+
<p align="center">
|
40 |
+
“ Living out everyone’s imagination on creating and manipulating 3D assets.”
|
41 |
+
</p>
|
42 |
+
|
43 |
+
## 🔥 News
|
44 |
+
|
45 |
+
- Jan 21, 2025: 💬 Release [Hunyuan3D 2.0](https://huggingface.co/spaces/tencent/Hunyuan3D-2). Please give it a try!
|
46 |
+
|
47 |
+
## **Abstract**
|
48 |
+
|
49 |
+
We present Hunyuan3D 2.0, an advanced large-scale 3D synthesis system for generating high-resolution textured 3D assets.
|
50 |
+
This system includes two foundation components: a large-scale shape generation model - Hunyuan3D-DiT, and a large-scale
|
51 |
+
texture synthesis model - Hunyuan3D-Paint.
|
52 |
+
The shape generative model, built on a scalable flow-based diffusion transformer, aims to create geometry that properly
|
53 |
+
aligns with a given condition image, laying a solid foundation for downstream applications.
|
54 |
+
The texture synthesis model, benefiting from strong geometric and diffusion priors, produces high-resolution and vibrant
|
55 |
+
texture maps for either generated or hand-crafted meshes.
|
56 |
+
Furthermore, we build Hunyuan3D-Studio - a versatile, user-friendly production platform that simplifies the re-creation
|
57 |
+
process of 3D assets. It allows both professional and amateur users to manipulate or even animate their meshes
|
58 |
+
efficiently.
|
59 |
+
We systematically evaluate our models, showing that Hunyuan3D 2.0 outperforms previous state-of-the-art models,
|
60 |
+
including the open-source models and closed-source models in geometry details, condition alignment, texture quality, and
|
61 |
+
e.t.c.
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
<p align="center">
|
66 |
+
<img src="assets/images/system.jpg">
|
67 |
+
</p>
|
68 |
+
|
69 |
+
## ☯️ **Hunyuan3D 2.0**
|
70 |
+
|
71 |
+
### Architecture
|
72 |
+
|
73 |
+
Hunyuan3D 2.0 features a two-stage generation pipeline, starting with the creation of a bare mesh, followed by the
|
74 |
+
synthesis of a texture map for that mesh. This strategy is effective for decoupling the difficulties of shape and
|
75 |
+
texture generation and also provides flexibility for texturing either generated or handcrafted meshes.
|
76 |
+
|
77 |
+
<p align="left">
|
78 |
+
<img src="assets/images/arch.jpg">
|
79 |
+
</p>
|
80 |
+
|
81 |
+
### Performance
|
82 |
+
|
83 |
+
We have evaluated Hunyuan3D 2.0 with other open-source as well as close-source 3d-generation methods.
|
84 |
+
The numerical results indicate that Hunyuan3D 2.0 surpasses all baselines in the quality of generated textured 3D assets
|
85 |
+
and the condition following ability.
|
86 |
+
|
87 |
+
| Model | CMMD(⬇) | FID_CLIP(⬇) | FID(⬇) | CLIP-score(⬆) |
|
88 |
+
|-------------------------|-----------|-------------|-------------|---------------|
|
89 |
+
| Top Open-source Model1 | 3.591 | 54.639 | 289.287 | 0.787 |
|
90 |
+
| Top Close-source Model1 | 3.600 | 55.866 | 305.922 | 0.779 |
|
91 |
+
| Top Close-source Model2 | 3.368 | 49.744 | 294.628 | 0.806 |
|
92 |
+
| Top Close-source Model3 | 3.218 | 51.574 | 295.691 | 0.799 |
|
93 |
+
| Hunyuan3D 2.0 | **3.193** | **49.165** | **282.429** | **0.809** |
|
94 |
+
|
95 |
+
Generation results of Hunyuan3D 2.0:
|
96 |
+
<p align="left">
|
97 |
+
<img src="assets/images/e2e-1.gif" height=300>
|
98 |
+
<img src="assets/images/e2e-2.gif" height=300>
|
99 |
+
</p>
|
100 |
+
|
101 |
+
### Pretrained Models
|
102 |
+
|
103 |
+
| Model | Date | Huggingface |
|
104 |
+
|----------------------|------------|--------------------------------------------------------|
|
105 |
+
| Hunyuan3D-DiT-v2-0 | 2025-01-21 | [Download](https://huggingface.co/tencent/Hunyuan3D-2) |
|
106 |
+
| Hunyuan3D-Paint-v2-0 | 2025-01-21 | [Download](https://huggingface.co/tencent/Hunyuan3D-2) |
|
107 |
+
|
108 |
+
## 🤗 Get Started with Hunyuan3D 2.0
|
109 |
+
|
110 |
+
You may follow the next steps to use Hunyuan3D 2.0 via code or the Gradio App.
|
111 |
+
|
112 |
+
### Install Requirements
|
113 |
+
|
114 |
+
Please install Pytorch via the [official](https://pytorch.org/) site. Then install the other requirements via
|
115 |
+
|
116 |
+
```bash
|
117 |
+
pip install -r requirements.txt
|
118 |
+
# for texture
|
119 |
+
cd hy3dgen/texgen/custom_rasterizer
|
120 |
+
python3 setup.py install
|
121 |
+
cd hy3dgen/texgen/differentiable_renderer
|
122 |
+
bash compile_mesh_painter.sh
|
123 |
+
```
|
124 |
+
|
125 |
+
### API Usage
|
126 |
+
|
127 |
+
We designed a diffusers-like API to use our shape generation model - Hunyuan3D-DiT and texture synthesis model -
|
128 |
+
Hunyuan3D-Paint.
|
129 |
+
|
130 |
+
You could assess **Hunyuan3D-DiT** via:
|
131 |
+
|
132 |
+
```python
|
133 |
+
from hy3dgen.shapegen import Hunyuan3DDiTFlowMatchingPipeline
|
134 |
+
|
135 |
+
pipeline = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained('tencent/Hunyuan3D-2')
|
136 |
+
mesh = pipeline(image='assets/demo.png')[0]
|
137 |
+
```
|
138 |
+
|
139 |
+
The output mesh is a [trimesh object](https://trimesh.org/trimesh.html), which you could save to glb/obj (or other
|
140 |
+
format) file.
|
141 |
+
|
142 |
+
For **Hunyuan3D-Paint**, do the following:
|
143 |
+
|
144 |
+
```python
|
145 |
+
from hy3dgen.texgen import Hunyuan3DPaintPipeline
|
146 |
+
from hy3dgen.shapegen import Hunyuan3DDiTFlowMatchingPipeline
|
147 |
+
|
148 |
+
# let's generate a mesh first
|
149 |
+
pipeline = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained('tencent/Hunyuan3D-2')
|
150 |
+
mesh = pipeline(image='assets/demo.png')[0]
|
151 |
+
|
152 |
+
pipeline = Hunyuan3DPaintPipeline.from_pretrained('tencent/Hunyuan3D-2')
|
153 |
+
mesh = pipeline(mesh, image='assets/demo.png')
|
154 |
+
```
|
155 |
+
|
156 |
+
Please visit [minimal_demo.py](minimal_demo.py) for more advanced usage, such as **text to 3D** and **texture generation
|
157 |
+
for handcrafted mesh**.
|
158 |
+
|
159 |
+
### Gradio App
|
160 |
+
|
161 |
+
You could also host a [Gradio](https://www.gradio.app/) App in your own computer via:
|
162 |
+
|
163 |
+
```bash
|
164 |
+
pip3 install gradio==3.39.0
|
165 |
+
python3 gradio_app.py
|
166 |
+
```
|
167 |
+
|
168 |
+
Don't forget to visit [Hunyuan3D](https://3d.hunyuan.tencent.com) for quick use, if you don't want to host yourself.
|
169 |
+
|
170 |
+
## 📑 Open-Source Plan
|
171 |
+
|
172 |
+
- [x] Inference Code
|
173 |
+
- [x] Model Checkpoints
|
174 |
+
- [ ] ComfyUI
|
175 |
+
- [ ] TensorRT Version
|
176 |
+
|
177 |
+
## 🔗 BibTeX
|
178 |
+
|
179 |
+
If you found this repository helpful, please cite our report:
|
180 |
+
|
181 |
+
```bibtex
|
182 |
+
@misc{hunyuan3d22025tencent,
|
183 |
+
title={Hunyuan3D 2.0: Scaling Diffusion Models for High Resolution Textured 3D Assets Generation},
|
184 |
+
author={Tencent Hunyuan3D Team},
|
185 |
+
year={2025},
|
186 |
+
}
|
187 |
+
```
|
188 |
+
|
189 |
+
## Acknowledgements
|
190 |
+
|
191 |
+
We would like to thank the contributors to
|
192 |
+
the [DINOv2](https://github.com/facebookresearch/dinov2), [Stable Diffusion](https://github.com/Stability-AI/stablediffusion), [FLUX](https://github.com/black-forest-labs/flux), [diffusers](https://github.com/huggingface/diffusers)
|
193 |
+
and [HuggingFace](https://huggingface.co) repositories, for their open research and exploration.
|
194 |
+
|
195 |
+
## Star History
|
196 |
+
|
197 |
+
<a href="https://star-history.com/#Tencent/Hunyuan3D-2&Date">
|
198 |
+
<picture>
|
199 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Tencent/Hunyuan3D-2&type=Date&theme=dark" />
|
200 |
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Tencent/Hunyuan3D-2&type=Date" />
|
201 |
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Tencent/Hunyuan3D-2&type=Date" />
|
202 |
+
</picture>
|
203 |
+
</a>
|