Installing Hunyuan3DWrapper can be tricky, especially if you want to texturize 3D models. Prebuilt rasterizer wheels may fail on certain GPUs, and DLL errors are common. This guide walks you step-by-step through a reliable setup.


💻 Ready-to-Run Setup Script

Windows (Install_ComfyUI_with_Hunyuan3D-2.bat)

@echo off
setlocal enabledelayedexpansion

:: ——————————
:: 0. Check if Python is available
:: ——————————
echo ——————————
echo 0. Check if Python is available
echo ——————————
where python >nul 2>&1
if errorlevel 1 (
echo [ERROR] Python is not installed or not in PATH.
echo Opening Python 3.12.11 download page…
start https://www.python.org/downloads/release/python-31211/
exit /b 1
)

:: ——————————
:: 1. Get Python path and check version
:: ——————————
echo ——————————
echo 1. Get Python path and check version
echo ——————————
for /f “delims=” %%P in (‘where python’) do (
set PYTHON_FOUND=%%P
goto :found
)

:found
echo Found Python: %PYTHON_FOUND%

:: Optionally verify version is 3.12
for /f “tokens=2 delims= ” %%V in (‘python –version’) do (
set PY_VERSION=%%V
)

echo Python version: %PY_VERSION%
echo.

:: ——————————
:: 2. Set up paths
:: ——————————
echo ——————————
echo 2. Set up paths
echo ——————————
set ROOT_DIR=%CD%
set VENV_DIR=%ROOT_DIR%\venv
set PYTHON_EXE=%VENV_DIR%\Scripts\python.exe

:: ——————————
:: 3. Create virtual environment
:: ——————————
echo ——————————
echo 3. Create virtual environment
echo ——————————
if not exist “%PYTHON_EXE%” (
echo Creating virtual environment…
python -m venv “%VENV_DIR%”
)

:: ——————————
:: 4. Upgrade pip
:: ——————————
echo ——————————
echo 4. Upgrade pip
echo ——————————
“%PYTHON_EXE%” -m pip install –upgrade pip

:: ——————————
:: 5. Clone ComfyUI
:: ——————————
echo ——————————
echo 5. Clone ComfyUI
echo ——————————
if not exist “%ROOT_DIR%\ComfyUI” (
git clone https://github.com/comfyanonymous/ComfyUI.git “%ROOT_DIR%\ComfyUI”
)

:: ——————————
:: 6. Clone Hunyuan3D-2
:: ——————————
echo ——————————
echo 6. Clone Hunyuan3D-2
echo ——————————
if not exist “%ROOT_DIR%\ComfyUI\custom_nodes\Hunyuan3D-2” (
git clone https://github.com/Tencent-Hunyuan/Hunyuan3D-2.git “%ROOT_DIR%\ComfyUI\custom_nodes\Hunyuan3D-2”
)

:: ——————————
:: 7. Install Hunyuan3D-2 dependencies
:: ——————————
echo ——————————
echo 7. Install Hunyuan3D-2 dependencies
echo ——————————
echo Installing Hunyuan3D-2 dependencies…
“%PYTHON_EXE%” -m pip install -r “%ROOT_DIR%\ComfyUI\custom_nodes\Hunyuan3D-2\requirements.txt”

:: ——————————
:: 8. Clone Hunyuan3DWrapper
:: ——————————
echo ——————————
echo 8. Clone Hunyuan3DWrapper
echo ——————————
if not exist “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper” (
git clone https://github.com/kijai/ComfyUI-Hunyuan3DWrapper.git “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper”
)

:: ——————————
:: 9. Install dependencies
:: ——————————
echo ——————————
echo 9. Install dependencies
echo ——————————
echo Installing additional dependencies…

:: Required for some builds
“%PYTHON_EXE%” -m pip install ninja

timeout /t 5

:: PyTorch 2.6.0 + CUDA 12.6
“%PYTHON_EXE%” -m pip install torch==2.6.0+cu126 torchvision==0.21.0+cu126 torchaudio==2.6.0+cu126 –extra-index-url https://download.pytorch.org/whl/cu126

:: ComfyUI dependencies
“%PYTHON_EXE%” -m pip install -r “%ROOT_DIR%\ComfyUI\requirements.txt”

:: Hunyuan3DWrapper dependencies
“%PYTHON_EXE%” -m pip install -r “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\requirements.txt”

:: Extra dependency
“%PYTHON_EXE%” -m pip install transparent_background

:: ——————————
:: 10. Install prebuilt rasterizer wheel (if available)
:: ——————————
echo ——————————
echo 10. Install prebuilt rasterizer wheel (if available)
echo ——————————
set WHEEL_PATH=%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\wheels\custom_rasterizer-0.1.0+torch260.cuda126-cp312-cp312-win_amd64.whl

if exist “%WHEEL_PATH%” (
echo Installing prebuilt rasterizer wheel…
“%PYTHON_EXE%” -m pip install “%WHEEL_PATH%”
)

:: ——————————
:: 10.1. Build and install the custom rasterizer
:: ——————————
echo Installing prebuilt rasterizer wheel fails, remove the :: in the batch file
:: echo Installing custom_rasterizer from source…
:: set TORCH_CUDA_ARCH_LIST=8.6
:: set DISTUTILS_USE_SDK=1
:: call “C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat”

:: cd “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\hy3dgen\texgen\custom_rasterizer”
:: echo Checking the content of custom_rasterizer_kernel directory…
:: dir “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\hy3dgen\texgen\custom_rasterizer\lib\custom_rasterizer_kernel”

:: :: Install the package using pip
:: :: “%PYTHON_EXE%” -m pip install . –force-reinstall
:: :: Install the package using the legacy version
:: “%PYTHON_EXE%” “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\hy3dgen\texgen\custom_rasterizer\setup.py” install –force

:: ——————————
:: 11. Install ComfyUI Manager
:: ——————————
echo ——————————
echo 11. Install ComfyUI Manager
echo ——————————
if not exist “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Manager” (
echo Installing ComfyUI-Manager…
git clone https://github.com/Comfy-Org/ComfyUI-Manager.git “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI-Manager”
)

:: ——————————
:: 12. Install ComfyUI Essentials
:: ——————————
echo ——————————
echo 12. Install ComfyUI Essentials
echo ——————————
if not exist “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI_essentials” (
echo Installing ComfyUI-Essentials…
git clone https://github.com/cubiq/ComfyUI_essentials.git “%ROOT_DIR%\ComfyUI\custom_nodes\ComfyUI_essentials”
)

:: ——————————
:: 13. Launch ComfyUI
:: ——————————
echo ——————————
echo 13. Launch ComfyUI
echo ——————————
echo Launching ComfyUI…
“%PYTHON_EXE%” “%ROOT_DIR%\ComfyUI\main.py” –windows-standalone-build

pause

 

 


1️⃣ System Prerequisites

Component Version / Notes
CUDA Toolkit 12.6 (runtime DLLs accessible)
NVIDIA GPU Driver Latest compatible with CUDA 12.6
Python 3.12.11 (64-bit)
Git Recent version
Windows 10/11, 64-bit
Visual C++ Redistributable (x64) 2022

⚠️ Missing any of these can lead to DLL load errors.

 

Make sure you have a ton of free space available in your Disk:

  • Python venv: ~6GB
  • ComfyUI: ~375MB (without models) ~45GB (with models)

2️⃣ Python Virtual Environment

Run in the root directory where python_embeded is located:

python_embeded\python.exe -m venv venv
call venv\Scripts\activate

3️⃣ PyTorch 2.6 + CUDA 12.6

Run inside the activated venv, in any directory:

pip install torch==2.6.0+cu126 torchvision==0.21.0+cu126 torchaudio==2.6.0+cu126 --extra-index-url https://download.pytorch.org/whl/cu126

4️⃣ Install ComfyUI and Hunyuan3DWrapper

Run in the root directory where ComfyUI folder exists:

git clone https://github.com/comfyanonymous/ComfyUI.git
git clone https://github.com/kijai/ComfyUI-Hunyuan3DWrapper.git ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper

pip install -r ComfyUI\requirements.txt
pip install -r ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\requirements.txt
pip install transparent_background

:: Optional prebuilt rasterizer wheel
pip install ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\wheels\custom_rasterizer-0.1.0+torch260.cuda126-cp312-cp312-win_amd64.whl

5️⃣ Build Rasterizer from Source (for 3090 / Ampere)

Run inside the folder:

ComfyUI\custom_nodes\ComfyUI-Hunyuan3DWrapper\custom_rasterizer

Steps:

set TORCH_CUDA_ARCH_LIST=8.6
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
python -m pip install . --force-reinstall

✅ Fixes “no kernel image available” and DLL errors.


6️⃣ Launch ComfyUI

Run in the root directory of ComfyUI:

call venv\Scripts\activate
python ComfyUI\main.py --windows-standalone-build

7️⃣ 3D Model Workflow

  1. Provide Input
    • 2D image (analyzed for depth)
    • Or rough 3D base shape (sphere, cube, cylinder)
  2. Generate 3D Model
    • Adjust resolution, mesh detail, textures
    • Click Generate
  3. Refine & Texturize
    • Enhance mesh
    • Apply custom textures
  4. Export
    • OBJ, FBX, STL
  5. Blender Cleanup
    • Merge vertices: M → By Distance
    • Convert triangles to quads: Alt+J
    • Shade Auto Smooth

8️⃣ Lessons Learned

  • Prebuilt wheels can fail; rebuild from source for Ampere GPUs.
  • Match PyTorch, CUDA, Python, and wheel versions.
  • Use venv for isolation.
  • Ensure MSVC Build Tools + Ninja are installed.

TL;DR

  1. Install CUDA 12.6, NVIDIA drivers, Git, VC++ redistributable
  2. Use a venv
  3. Install PyTorch 2.6 + CUDA 12.6, ComfyUI, Hunyuan3DWrapper, transparent_background
  4. If rasterizer fails, build from source (TORCH_CUDA_ARCH_LIST=8.6)
  5. Launch ComfyUI from venv

ComfyUI-BlenderAI-node

Used for AI model generation, next-generation Blender rendering engine, texture enhancement&generation (based on ComfyUI)

Download: https://github.com/AIGODLIKE/ComfyUI-BlenderAI-node

    https://unsplash.com/photos/YS_FCbcD5KM

    https://unsplash.com/photos/YS_FCbcD5KM

    https://unsplash.com/photos/YS_FCbcD5KM

    https://unsplash.com/photos/YS_FCbcD5KM

    https://unsplash.com/photos/YS_FCbcD5KM