[来源关键摘录] 仓库记录 2024 年 11 月 5 日开放文生三维、图生三维演示,并给出约 10 秒和 25 秒的生成结果。
[正文前段节选] Skip to content
Navigation Menu
Appearance settings
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Repository navigation
NotificationsYou must be signed in to change notification settings
Fork282 (282)
Star3.5k (3.5k)You must be signed in to star a repository
Tencent Hunyuan3D-1.0: A Unified Framework for Text-to-3D and Image-to-3D Generation
3d.hunyuan.tencent.com/
3d3dgengenerationtext
Custom properties
Report repository
BranchesTags
Open more actions menu
Latest commit
Folders and files
Last commit message
Last commit date
README_zh_cn.md
env_install.sh
requirements.txt
View all files
Repository files navigation
English | 简体中文
Jul 26, 2025: 🤗 We release the first open-source, simulation-capable, immersive 3D world generation model, HunyuanWorld-1.0!
Jun 13, 2025: 🤗 We release the first production-ready 3D asset generation model Hunyuan3D 2.1!
Jan 21, 2025: 🤗 Enjoy exciting 3D generation on our website Hunyuan3D Studio!
Jan 21, 2025: 🤗 Release inference code and pretrained models of Hunyuan3D 2.0.
Jan 21, 2025: 🤗 Release Hunyuan3D 2.0. Please give it a try via huggingface space our official site!
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][2][3]
Nov 5, 2024: 🤗 We support demo running image_to_3d generation now. Please check the script below.
Nov 5, 2024: 🤗 We support demo running text_to_3d generation now. Please check the script below.
📑 Open-source Plan
Distillation Version
TensorRT Version
While 3D generative models have greatly improved artists' workflows, the existing diffusion models for 3D generation suffer from slow generation and poor generalization. To address this issue, we propose a two-stage approach named Hunyuan3D-1.0 including a lite version and a standard version, that both support text- and image-conditioned generation.
In the first stage, we employ a multi-view diffusion model that efficiently generates multi-view RGB in approximately 4 seconds. These multi-view images capture rich details of the 3D asset from different viewpoints, relaxing the tasks from single-view to multi-view reconstruction. In the second stage, we introduce a feed-forward reconstruction model that rapidly and faithfully reconstructs the 3D asset given the generated multi-view images in approximately 7 seconds. The reconstruction network learns to handle noises and in-consistency introduced by the multi-view diffusion and leverages the available information from the condition image to efficiently recover the 3D structure.
Our framework involves the text-to-image model, i.e., Hunyuan-DiT, making it a unified framework to support both text- and image-conditioned 3D generation. Our standard version has 3x more parameters than our lite and other existing model. Our Hunyuan3D-1.0 achieves an impressive balance between speed and quality, significantly reducing generation time while maintaining the quality and diversity of the produced assets.
🎉 Hunyuan3D-1 Architecture
📈 Comparisons
We have evaluated Hunyuan3D-1.0 with other open-source 3d-generation methods, our Hunyuan3D-1.0 received the highest user preference across 5 metrics. Details in the picture on the lower left.
The lite model takes around 10 seconds to produce a 3D mesh from a single image, while the standard model takes roughly 25 seconds. The plot laid out in the lower right demonstrates that Hunyuan3D-1.0 achieves an optimal balance between quality and efficiency.
Begin by cloning the repository:
git clone https://github.com/tencent/Hunyuan3D-1
cd Hunyuan3D-1
Installation Guide for Linux
We provide an env_install.sh script file for setting up environment.
conda create -n hunyuan3d-1 python=3.9 or 3.10 or 3.11 or 3.12
conda activate hunyuan3d-1
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu121
bash env_install.sh
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:
cd third_party
git clone --recursive https://github.com/naver/dust3r.git
cd ../third_party/weights
wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth
💡Other tips for envrionment installation
Optionally, you can install xformers or flash_attn to acclerate computation:
pip install xformers --index-url https://download.pytorch.org/whl/cu121
pip install flash_attn
Match PyTorch, torchvision, CUDA and compiled extensions when resolving environment errors. Avoid downgrading to old PyTorch releases to work around installation issues.
Load model weights only from trusted sources. Explicit weights_only=True restricts pickle loading, but it is not a sandbox and does not replace PyTorch security updates. The historical torch==2.6.0 pin in requirements.txt is affected by CVE-2026-24747, which is fixed in PyTorch 2.10.0 and later. Updating that pin requires validating the corresponding torchvision, CUDA and compiled extensions; it must not be treated as a safe baseline for untrusted checkpoints.
when install pytorch3d, the gcc version is preferably greater than 9, and the gpu driver should not be too old.
Download Pretrained Models
The models are available at https://huggingface.co/tencent/Hunyuan3D-1:
Hunyuan3D-1/lite, lite model for multi-view generation.
Hunyuan3D-1/std, standard model for multi-view generation.
Hunyuan3D-1/svrm, sparse-view reconstruction model.
To download the model, first install the huggingface-cli. (Detailed instructions are available here.)
python3 -m pip install "huggingface_hub[cli]"
Then download the model using the following commands:
mkdir weights
huggingface-cli download tencent/Hunyuan3D-1 --local-dir ./weights
mkdir weights/hunyuanDiT
huggingface-cli download Tencent-Hunyuan/HunyuanDiT-v1.1-Diffusers-Distilled --local-dir ./weights/hunyuanDiT
For text to 3d generation, we supports bilingual Chinese and English, you can use the following command to inference.
python3 main.py \
--text_prompt "a lovely rabbit" \
--save_folder ./outputs/test/ \
--max_faces_num 90000 \
--do_texture_mapping \
For image to 3d generation, you can use the following command to inference.
--image_prompt "/path/to/your/image" \
We list some more useful configurations for easy usage:
--text_prompt
The text prompt for 3D generation
--image_prompt
The image prompt for 3D generation
The random seed for generating images
The number of steps for sampling of text to image
The random seed for generating 3d generation
The number of steps for sampling of 3d generation
--max_faces_numm
The limit number of faces of 3d mesh
--save_memory
module will move to cpu automatically
--do_texture_mapping
Change vertex shadding to texture shading
We have also prepared scripts with different configurations for reference
Inference Std-pipeline requires 30GB VRAM (24G VRAM with --save_memory).
Inference Lite-pipeline requires 22GB VRAM (18G VRAM with --save_memory).
Note: --save_memory will increase inference time
bash scripts/text_to_3d_std.sh
bash scripts/text_to_3d_lite.sh
bash scripts/image_to_3d_std.sh
bash scripts/image_to_3d_lite.sh
If your gpu memory is 16G, you can try to run modules in pipeline seperately:
bash scripts/text_to_3d_std_separately.sh 'a lovely rabbit' ./outputs/test # >= 16G
bash scripts/text_to_3d_lite_separately.sh 'a lovely rabbit' ./outputs/test # >= 14G
bash scripts/image_to_3d_std_separately.sh ./demos/example_000.png ./outputs/test # >= 16G
[...内容已截断,完整版请查看原文或 Wayback 快照]