Hunyuan3D-2 is an advanced system designed for creating high-quality, textured 3D assets with precision and efficiency. It features a two-stage process: first, generating a structured 3D shape using Hunyuan3D-DiT, and then applying detailed textures with Hunyuan3D-Paint. This approach ensures realistic geometry and vibrant textures, making it suitable for various creative and industrial applications.
With strong shape alignment and texture synthesis capabilities, Hunyuan3D-2 surpasses previous models in accuracy, detail, and ease of use. It also includes Hunyuan3D-Studio, a user-friendly platform for refining and manipulating 3D assets. Whether for gaming, design, or production, Hunyuan3D-2 offers a streamlined solution for high-quality 3D creation.
Performance
Model | CMMD(⬇) | FID_CLIP(⬇) | FID(⬇) | CLIP-score(⬆) |
---|
Top Open-source Model1 | 3.591 | 54.639 | 289.287 | 0.787 |
Top Close-source Model1 | 3.600 | 55.866 | 305.922 | 0.779 |
Top Close-source Model2 | 3.368 | 49.744 | 294.628 | 0.806 |
Top Close-source Model3 | 3.218 | 51.574 | 295.691 | 0.799 |
Hunyuan3D 2.0 | 3.193 | 49.165 | 282.429 | 0.809 |
Model Resource
Hugging Face
Link: https://huggingface.co/tencent/Hunyuan3D-2
Prerequisites for Installing Hunyuan3D-2 Model Locally
GPU
- Memory (VRAM):
- Minimum: 24GB (with optimizations for shape generation).
- Recommended: 48GB for efficient texture synthesis and rendering.
- Optimal: 80GB for high-resolution text-to-3D generation and advanced rendering.
- Type: NVIDIA GPUs with Tensor Cores (e.g., RTX 4090, A6000, A100, H100).
Disk Space
- Minimum: 50GB free SSD storage.
- Recommended: 200GB SSD for storing 3D assets, checkpoints, and texture data.
RAM
- Minimum: 32GB.
- Recommended: 64GB for smooth processing of high-resolution 3D models and textures.
CPU
- Minimum: 16 cores.
- Recommended: 32-64 cores for fast 3D asset generation, rendering, and mesh processing.
Step-by-Step Process to Install Hunyuan3D-2 Model Locally
For the purpose of this tutorial, we will use a GPU-powered Virtual Machine offered by NodeShift; however, you can replicate the same steps with any other cloud provider of your choice. NodeShift provides the most affordable Virtual Machines at a scale that meets GDPR, SOC2, and ISO27001 requirements.
Step 1: Sign Up and Set Up a NodeShift Cloud Account
Visit the NodeShift Platform and create an account. Once you’ve signed up, log into your account.
Follow the account setup process and provide the necessary details and information.
Step 2: Create a GPU Node (Virtual Machine)
GPU Nodes are NodeShift’s GPU Virtual Machines, on-demand resources equipped with diverse GPUs ranging from H100s to A100s. These GPU-powered VMs provide enhanced environmental control, allowing configuration adjustments for GPUs, CPUs, RAM, and Storage based on specific requirements.
Navigate to the menu on the left side. Select the GPU Nodes option, create a GPU Node in the Dashboard, click the Create GPU Node button, and create your first Virtual Machine deployment.
Step 3: Select a Model, Region, and Storage
In the “GPU Nodes” tab, select a GPU Model and Storage according to your needs and the geographical region where you want to launch your model.
We will use 1 x H100 SXM GPU for this tutorial to achieve the fastest performance. However, you can choose a more affordable GPU with less VRAM if that better suits your requirements.
Step 4: Select Authentication Method
There are two authentication methods available: Password and SSH Key. SSH keys are a more secure option. To create them, please refer to our official documentation.
Step 5: Choose an Image
Next, you will need to choose an image for your Virtual Machine. We will deploy Hunyuan3D-2 on an NVIDIA Cuda Virtual Machine. This proprietary, closed-source parallel computing platform will allow you to install Hunyuan3D-2 on your GPU Node.
After choosing the image, click the ‘Create’ button, and your Virtual Machine will be deployed.
Step 6: Virtual Machine Successfully Deployed
You will get visual confirmation that your node is up and running.
Step 7: Connect to GPUs using SSH
NodeShift GPUs can be connected to and controlled through a terminal using the SSH key provided during GPU creation.
Once your GPU Node deployment is successfully created and has reached the ‘RUNNING’ status, you can navigate to the page of your GPU Deployment Instance. Then, click the ‘Connect’ button in the top right corner.
Now open your terminal and paste the proxy SSH IP or direct SSH IP.
Next, if you want to check the GPU details, run the command below:
nvidia-smi
Step 8: Check the Available Python version and Install the new version
Run the following commands to check the available Python version.
If you check the version of the python, system has Python 3.8.1 available by default. To install a higher version of Python, you’ll need to use the deadsnakes
PPA.
Run the following commands to add the deadsnakes
PPA:
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
Step 9: Install Python 3.11
Now, run the following command to install Python 3.11 or another desired version:
sudo apt install -y python3.11 python3.11-distutils python3.11-venv
Step 10: Update the Default Python3
Version
Now, run the following command to link the new Python version as the default python3
:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2
sudo update-alternatives --config python3
Then, run the following command to verify that the new Python version is active:
python3 --version
Step 11: Install and Update Pip
Run the following command to install and update the pip:
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip
Then, run the following command to check the version of pip:
pip --version
Step 12: Setup Environment
Run the following command to setup the environment:
python3 -m venv hunyuan3d_env
source hunyuan3d_env/bin/activate
Step 13: Install Pytorch
Run the following command to install the Pytorch:
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
Step 14: Clone the Repository
Run the following command to clone the Hunyuan3D-2 repository:
git clone https://github.com/Tencent/Hunyuan3D-2.git
cd Janus
Step 15: Install Dependencies
Run the following command to install the dependencies:
pip install -r requirements.txt
Step 16: Install Gradio
Run the following command to install the Gradio:
pip install gradio==3.39.0
Step 17: Run Gradio App
Execute the following command to run the gradio app:
python3 gradio_app.py
Step 18: SSH port forwarding
To forward local port 8080 on your windows machine to port 8080 on the VM, use the following command in command prompt or powershell:
ssh -i "C:\Users\Acer\.ssh\id_rsa" -L 8080:localhost:8080 root@45.135.56.12 -p 26856
Step 19: Access the Application
After running the command, you can access the application running on port 8080
of the remote server by visiting http://localhost:8080
in your local web browser.
Example 1
Conclusion
In this guide, we introduced Hunyuan3D-2, a high-resolution 3D asset generation system designed for creating detailed and textured 3D models with efficiency and precision. We provided a step-by-step tutorial on setting up Hunyuan3D-2 on a GPU-powered virtual machine using NodeShift, covering everything from configuring the environment and installing dependencies to running the Gradio app for interactive 3D generation. By following this guide, you’ve learned how to set up the required software, install key tools, and leverage Hunyuan3D-2 for generating and refining high-quality 3D assets. Whether you’re a designer, developer, or researcher, Hunyuan3D-2 offers a streamlined and powerful approach to 3D content creation.