Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
seanxhyang committed Nov 21, 2024
1 parent 134c9d2 commit 49e6341
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 88 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

## 🔥🔥🔥 News!!

* Nov 21, 2024: 💬 We have introduced the new Baking module. Please give it a try!
* Nov 20, 2024: 💬 We have added a Chinese version of the README.
* Nov 18, 2024: 💬 Third-party developers have uploaded their ComfyUI. We appreciate their contributions! [[1]](https://github.com/jtydhr88/ComfyUI-Hunyuan3D-1-wrapper)[[2]](https://github.com/MrForExample/ComfyUI-3D-Pack)[[3]](https://github.com/TTPlanetPig/Comfyui_Hunyuan3D)
* Nov 5, 2024: 💬 We support demo running image_to_3d generation now. Please check the [script](#using-gradio) below.
* Nov 5, 2024: 💬 We support demo running text_to_3d generation now. Please check the [script](#using-gradio) below.

Expand All @@ -27,14 +30,13 @@

- [x] Inference
- [x] Checkpoints
- [ ] Baking related
- [ ] Training
- [x] Baking
- [ ] ComfyUI
- [ ] Training
- [ ] Distillation Version
- [ ] TensorRT Version



## **Abstract**
<p align="center">
<img src="./assets/teaser.png" height=450>
Expand Down Expand Up @@ -79,16 +81,16 @@ cd Hunyuan3D-1
We provide an env_install.sh script file for setting up environment.

```
# step 1, create conda env
conda create -n hunyuan3d-1 python=3.9 or 3.10 or 3.11 or 3.12
conda activate hunyuan3d-1
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
bash env_install.sh
# or
pip install -r requirements.txt --index-url https://download.pytorch.org/whl/cu121
pip3 install -r requirements.txt --index-url https://download.pytorch.org/whl/cu121
pip3 install git+https://github.com/facebookresearch/pytorch3d@stable
pip3 install git+https://github.com/NVlabs/nvdiffrast
```

because of dust3r, we offer a guide:
Expand All @@ -102,7 +104,6 @@ wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge
```


<details>
<summary>💡Other tips for envrionment installation</summary>

Expand Down Expand Up @@ -206,7 +207,7 @@ bash scripts/image_to_3d_std_separately.sh ./demos/example_000.png ./outputs/tes
bash scripts/image_to_3d_lite_separately.sh ./demos/example_000.png ./outputs/test # >= 10G
```

#### Baking related
#### Baking
We have provided the texture baking module here. The matching and warpping processes are completed using Dust3R, which is licensed under the CC BY-NC-SA 4.0 license. Please note that this is a non-commercial license, and therefore, this module cannot be used for commercial purposes.

```bash
Expand Down
48 changes: 38 additions & 10 deletions README_zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

## 🔥🔥🔥 更新!!

* Nov 21, 2024: 💬 我们上传了新的纹理烘焙模块!
* Nov 20, 2024: 💬 我们添加了中文版的 README。
* Nov 18, 2024: 💬 感谢第三方开发者实现ComfyUI![[1]](https://github.com/jtydhr88/ComfyUI-Hunyuan3D-1-wrapper)[[2]](https://github.com/MrForExample/ComfyUI-3D-Pack)[[3]](https://github.com/TTPlanetPig/Comfyui_Hunyuan3D)
* Nov 5, 2024: 💬 已经支持图生3D。请在[script](#using-gradio)体验。
* Nov 5, 2024: 💬 已经支持文生3D,请在[script](#using-gradio)体验。

Expand All @@ -27,9 +30,9 @@

- [x] Inference
- [x] Checkpoints
- [ ] Baking related
- [ ] Training
- [x] Baking
- [ ] ComfyUI
- [ ] Training
- [ ] Distillation Version
- [ ] TensorRT Version

Expand Down Expand Up @@ -75,18 +78,16 @@ cd Hunyuan3D-1
env_install.sh 脚本提供了如何安装环境:

```
# 第一步:创建环境
conda create -n hunyuan3d-1 python=3.9 or 3.10 or 3.11 or 3.12
conda activate hunyuan3d-1
# 第二部:安装torch和相关依赖包
which pip # check pip corresponds to python
# modify the cuda version according to your machine (recommended)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
# 第三步:安装其他相关依赖包
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
bash env_install.sh
# or
pip3 install -r requirements.txt --index-url https://download.pytorch.org/whl/cu121
pip3 install git+https://github.com/facebookresearch/pytorch3d@stable
pip3 install git+https://github.com/NVlabs/nvdiffrast
```

由于dust3r的许可证限制, 我们仅提供其安装途径:
Expand Down Expand Up @@ -204,6 +205,33 @@ bash scripts/image_to_3d_std_separately.sh ./demos/example_000.png ./outputs/tes
bash scripts/image_to_3d_lite_separately.sh ./demos/example_000.png ./outputs/test # >= 10G
```

#### 纹理烘焙

我们提供了纹理烘焙模块。对齐和变形过程是使用Dust3R完成的,遵守CC BY-NC-SA 4.0许可。请注意,这是一个非商业许可证,因此该模块不能用于商业目的。

```bash
mkdir -p ./third_party/weights/DUSt3R_ViTLarge_BaseDecoder_512_dpt
huggingface-cli download naver/DUSt3R_ViTLarge_BaseDecoder_512_dpt \
--local-dir ./third_party/weights/DUSt3R_ViTLarge_BaseDecoder_512_dpt

cd ./third_party
git clone --recursive https://github.com/naver/dust3r.git

cd ..
```
如果您使用相关代码和权重,我们也列出一些烘焙相关参数:

| Argument | Default | Description |
|:------------------:|:---------:|:---------------------------------------------------:|
|`--do_bake` | False | baking multi-view images onto mesh |
|`--bake_align_times` | 3 | alignment number of image and mesh |


注意:如果需要烘焙,请确保`--do_bake`设置为`True`并且`--do_texture_mapping`也设置为`True`

```bash
python main.py ... --do_texture_mapping --do_bake (--do_render)

#### Gradio界面部署

我们分别提供轻量版和标准版界面:
Expand Down
Loading

0 comments on commit 49e6341

Please sign in to comment.