self-hosted/ai
§01·recipe · 3d

Hunyuan3D-2 on RTX 4090: Image to 3D Model Guide

3dintermediate12GB+ VRAMMay 13, 2026
tools
prerequisites
  • NVIDIA GPU with ≥ 12GB VRAM (RTX 4090 recommended)
  • ComfyUI installed
  • Python 3.10+
  • Blender 4.0+ (for viewing and editing output)

What You'll Build

Convert any image into a high-quality 3D model locally using Hunyuan3D-2 from Tencent. Generate game-ready assets, product mockups, or character models from a single photo — entirely offline.

Why this matters: Cloud 3D generation services charge $0.10–$1.00 per asset. With a local setup, generate unlimited 3D assets for free.

What Hunyuan3D-2 Produces

  • GLB format: Ready to import into Blender, Unity, Unreal Engine
  • Textured mesh: UV-unwrapped with diffuse texture
  • Generation time: 30–90 seconds per model on RTX 4090

Niche advantage: 3D generation has very little local tutorial content. See why this is strategic →

Requirements

ComponentMinimumRecommended
GPURTX 4070 (12GB)RTX 4090 (24GB)
VRAM12GB24GB
RAM16GB32GB
Storage20GB20GB
SoftwareBlender 4.0+Blender 4.2+

Installation

1. Install ComfyUI

git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt

2. Install Hunyuan3D ComfyUI Nodes

cd ComfyUI/custom_nodes
git clone https://github.com/sdbds/Hunyuan3D-2-for-ComfyUI
cd Hunyuan3D-2-for-ComfyUI
pip install -r requirements.txt

3. Install Additional Dependencies

Hunyuan3D requires some specialized libraries:

pip install trimesh open3d rembg

4. Download Model Weights

huggingface-cli download tencent/Hunyuan3D-2 \
  --local-dir ./models/hunyuan3d-2/

The download is ~15GB. Weights go in ComfyUI/models/hunyuan3d/

Running

Start ComfyUI:

python main.py --listen

Basic Image-to-3D Workflow

  1. Load the hunyuan3d_i2mesh.json workflow
  2. Upload your input image
  3. Set Remove Background to Auto (for product shots) or Off (if already transparent)
  4. Run generation

Workflow Settings

ParameterValueNotes
Steps50Don't reduce below 30
Octree Resolution380Higher = more detail, more VRAM
Marching Cubes Resolution256Mesh density
SeedAnySet for reproducibility

Input Image Tips

Best inputs for Hunyuan3D-2:

  • Single object with clear silhouette
  • White or transparent background
  • Good lighting from front or 3/4 angle
  • Square crop (1:1)

Works well:

  • Product shots (sneakers, furniture, electronics)
  • Toys and figurines
  • Characters from 2D art
  • Architecture models

Doesn't work well:

  • Complex scenes with multiple objects
  • Photos of people (legal/ethical considerations)
  • Abstract shapes without clear structure

Processing the Output in Blender

Import GLB

  1. Open Blender 4.0+
  2. File → Import → glTF 2.0 (.glb)
  3. Select your generated file

Quick Cleanup

# Blender Python console — remove doubles and recalculate normals
import bpy

obj = bpy.context.active_object
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.remove_doubles(threshold=0.001)
bpy.ops.mesh.normals_make_consistent(inside=False)
bpy.ops.object.mode_set(mode='OBJECT')

Texture Baking

If you need a specific texture resolution:

  1. Add a new Image Texture node in the material
  2. Create a 2048×2048 image
  3. Use Cycles → Bake → Diffuse to bake at higher resolution

Generation Speed

Octree ResMesh ResTimeVRAMQuality
380256~30s12GBGood
380512~60s18GBBetter
512256~45s16GBBest detail

RTX 4090, approximate values. Community data pending.

Using with Blender MCP (Advanced)

Combine Hunyuan3D-2 with blender-mcp and a local LLM for AI-assisted 3D workflows:

  1. Install blender-mcp in Blender
  2. Connect Claude Code or a local LLM
  3. Generate 3D assets via natural language: "Create a low-poly tree from this reference image"

This pipeline — image → Hunyuan3D-2 → Blender → LLM editing — represents one of the most unique self-hosted AI workflows available.

Troubleshooting

OOM at 12GB: Reduce Octree Resolution to 256, Marching Cubes to 128

Mesh has holes or artifacts: Input image may have ambiguous depth cues. Try a more front-facing angle.

Texture looks wrong: Enable "Remove Background" and ensure the object is centered in frame

Slow generation: Check GPU is being used with nvidia-smi. If CPU fallback: add --gpu-only flag

Related 3D Models

ModelBest ForNotes
Hunyuan3D-2General objects, productsBest quality overall
TRELLISDetailed objectsMicrosoft, higher VRAM
Stable Fast 3DSpeed priorityLower quality, 2-5s

This is one of the few detailed local 3D generation guides available. The cloud bias in most AI tutorials means self-hosted 3D content is an underserved niche.