Tencent / Hunyuan3D-1

Tencent Hunyuan3D-1.0: A Unified Framework for Text-to-3D and Image-to-3D Generation
https://3d.hunyuan.tencent.com/
Other
2.21k stars 167 forks source link

for windows user #9

Open jtydhr88 opened 2 weeks ago

jtydhr88 commented 2 weeks ago

Hi, I just run it on Windows 10, here is my step. Env: Windows 10 3090

Prerequisites:

  1. conda
  2. you also need to install c++ build tools from here img_1

Steps:

  1. conda create -n hunyuan3d-py39 python=3.9
  2. conda activate hunyuan3d-py39
  3. pip install torch==2.2.0 torchvision==0.17.0 --index-url https://download.pytorch.org/whl/cu118
  4. pip install diffusers transformers
  5. pip install rembg tqdm omegaconf matplotlib opencv-python imageio jaxtyping einops
  6. pip install SentencePiece accelerate trimesh PyMCubes xatlas libigl
  7. pip install git+https://github.com/facebookresearch/pytorch3d
  8. pip install git+https://github.com/NVlabs/nvdiffrast
  9. pip install open3d
  10. pip install Ninja
  11. pip install gradio
  12. git clone https://github.com/Tencent/Hunyuan3D-1
  13. cd Hunyuan3D-1
  14. pip install "huggingface_hub[cli]"
  15. create folder ./weights and ./weights/hunyuanDiT
  16. huggingface-cli download tencent/Hunyuan3D-1 --local-dir ./weights
  17. huggingface-cli download Tencent-Hunyuan/HunyuanDiT-v1.1-Diffusers-Distilled --local-dir ./weights/hunyuanDiT
  18. go to app.py and change 0.0.0.0 to 127.0.0.1 on line 52
  19. go to demos/example_list.txt and remove the first 3 lines of Chinese prompts.
  20. python app.py

quick test image image

good luck!

h3clikejava commented 2 weeks ago

3090多少显存也能跑?

jtydhr88 commented 2 weeks ago

可以,就是慢点

jtydhr88 commented 2 weeks ago

Update for python 3.11 and cuda 12.4, this repo also works well with them as tested. Prerequisites:

  1. conda
  2. cuda 12.4
  3. you still need to install c++ build tools from here

Different Steps:

  1. conda create -n hunyuan3d-py311 python=3.11
  2. conda activate hunyuan3d-py311
  3. pip install torch torchvision xformers --index-url https://download.pytorch.org/whl/cu121
  4. (optional) you can download trition whl https://huggingface.co/madbuda/triton-windows-builds, as I am using python 3.11, so I will download 3.11 version
  5. (optional) pip install triton-2.1.0-cp311-cp311-win_amd64.whl

other steps are as same as above.

wWzZb commented 2 weeks ago

image 安装SentencePiece accelerate trimesh PyMCubes xatlas libigl等库时报错,可以使用国内镜像, pip install -i https://pypi.tuna.tsinghua.edu.cn/simple SentencePiece accelerate trimesh PyMCubes xatlas libigl, pip install -i https://pypi.tuna.tsinghua.edu.cn/simple git+https://github.com/facebookresearch/pytorch3d

jrc48 commented 2 weeks ago

i'm stuck at installing pytorch3d, can anyone help?

jtydhr88 commented 2 weeks ago

i'm stuck at installing pytorch3d, can anyone help?

please post your error

jrc48 commented 2 weeks ago

Collecting git+https://github.com/facebookresearch/pytorch3d Cloning https://github.com/facebookresearch/pytorch3d to c:\users\jing\appdata\local\temp\pip-req-build-ezsxm3_q Resolved https://github.com/facebookresearch/pytorch3d to commit 81d82980bc82fd605f27cca87f89ba08af94db3d Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Collecting iopath (from pytorch3d==0.7.8) Using cached iopath-0.1.10-py3-none-any.whl Requirement already satisfied: tqdm in c:\programdata\anaconda3\envs\hunyuan3d-py39\lib\site-packages (from iopath->pytorch3d==0.7.8) (4.67.0) Requirement already satisfied: typing-extensions in c:\programdata\anaconda3\envs\hunyuan3d-py39\lib\site-packages (from iopath->pytorch3d==0.7.8) (4.9.0) Collecting portalocker (from iopath->pytorch3d==0.7.8) Using cached portalocker-2.10.1-py3-none-any.whl.metadata (8.5 kB) Collecting pywin32>=226 (from portalocker->iopath->pytorch3d==0.7.8) Using cached pywin32-308-cp39-cp39-win_amd64.whl.metadata (8.3 kB) Requirement already satisfied: colorama in c:\programdata\anaconda3\envs\hunyuan3d-py39\lib\site-packages (from tqdm->iopath->pytorch3d==0.7.8) (0.4.6) Using cached portalocker-2.10.1-py3-none-any.whl (18 kB) Using cached pywin32-308-cp39-cp39-win_amd64.whl (6.6 MB) Building wheels for collected packages: pytorch3d Building wheel for pytorch3d (setup.py): started Building wheel for pytorch3d (setup.py): finished with status 'error' Running setup.py clean for pytorch3d Failed to build pytorch3d

HuiwenShi commented 2 weeks ago

Try git+https://github.com/facebookresearch/pytorch3d@stable

SoftologyPro commented 2 weeks ago

I built a WHL for Pytorch3D to help people having build/install problems pip install https://huggingface.co/datasets/Softology-Pro/VoC/resolve/main/pytorch3d-0.7.8-cp310-cp310-win_amd64.whl

jrc48 commented 2 weeks ago

still the same