
Step-by-step guide to installing TRELLIS 2 locally on Windows, Linux, and macOS. Covers GPU requirements, Python setup, ComfyUI integration, Docker, and troubleshooting common installation issues.
Last updated: April 14, 2026
TRELLIS 2 by Microsoft Research is an open-source AI model for generating high-quality 3D assets from text or images. This guide walks through every installation method — from a quick local setup to Docker and ComfyUI integration — so you can start generating 3D models on your own hardware.
If you'd rather skip the setup, you can use TRELLIS 2 online with no installation required.
Before installing TRELLIS 2, verify your system meets these requirements:
| Component | Minimum | Recommended |
|---|---|---|
| GPU | NVIDIA with 8GB VRAM | NVIDIA with 16GB+ VRAM |
| RAM | 16 GB | 32 GB |
| Storage | 10 GB free | 20 GB free (SSD preferred) |
| Python | 3.10 | 3.11 |
| CUDA | 11.8 | 12.1+ |
| OS | Linux (Ubuntu 20.04+) | Linux (Ubuntu 22.04+) |
| GPU Series | Example GPUs | Max Resolution | Performance |
|---|---|---|---|
| RTX 30/40 Series | RTX 3060, 4070, 4080, 4090 | 1536³ | Excellent |
| RTX 20 Series | RTX 2060, 2070, 2080 | 1024³ | Good |
| GTX 16/10 Series | GTX 1660, 1080, 1080 Ti | 512³ | Acceptable |
| Server GPUs | A100, V100, H100 | 1536³ | Excellent |
Note: AMD and Apple Silicon GPUs are not officially supported. AMD users can try the ROCm build, but expect limited compatibility. Mac users should use TRELLIS 2 online instead.
Choose the method that fits your setup:
| Method | Difficulty | Best For | Setup Time |
|---|---|---|---|
| Linux (Native) | Intermediate | Most setups | 15-30 min |
| Windows (Native) | Intermediate | Windows users | 15-30 min |
| ComfyUI Integration | Intermediate | ComfyUI users | 20-40 min |
| Docker | Advanced | Reproducible environments | 10-20 min |
| One-Click Installer | Beginner | Windows, quick setup | 5-10 min |
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install Python 3.11 and pip
sudo apt install python3.11 python3.11-venv python3-pip -y
# Install CUDA toolkit (if not already installed)
# For CUDA 12.1:
wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda_12.1.0_530.32.01_linux.run
sudo sh cuda_12.1.0_530.32.01_linux.run
# Verify CUDA installation
nvcc --version
nvidia-smi# Clone TRELLIS 2
git clone https://github.com/microsoft/TRELLIS.2.git
cd TRELLIS.2# Create and activate virtual environment
python3.11 -m venv venv
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip# Install PyTorch with CUDA support
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
# Install TRELLIS 2 dependencies
pip install -r requirements.txt# Download pre-trained weights from Hugging Face
python download_weights.pyThis downloads approximately 8 GB of model weights. The weights are saved to the weights/ directory.
# Run a quick test
python infer.py --text_prompt "a red cube" --output_path test_output.glbIf the installation is successful, you'll find test_output.glb in the project directory.
The community provides a one-click installer that handles most setup automatically:
C:\TRELLIS2)install.bat as administratorrun.bat to start the web interface# Clone the repository
git clone https://github.com/microsoft/TRELLIS.2.git
cd TRELLIS.2
# Create virtual environment
python -m venv venv
.\venv\Scripts\activate
# Upgrade pip
pip install --upgrade pip# Install PyTorch with CUDA support
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
# Install dependencies
pip install -r requirements.txt# Download model weights
python download_weights.py
# Run test
python infer.py --text_prompt "a red cube" --output_path test_output.glbTRELLIS 2 can be integrated into ComfyUI for node-based 3D generation workflows.
If you don't have ComfyUI installed:
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txtcd ComfyUI/custom_nodes/
git clone https://github.com/comfyui-extensions/ComfyUI-TRELLIS.2.git
cd ComfyUI-TRELLIS.2
pip install -r requirements.txtPlace the TRELLIS 2 weights in the ComfyUI models directory:
# Create directory if it doesn't exist
mkdir -p ComfyUI/models/trellis/
# Download weights
python ComfyUI/custom_nodes/ComfyUI-TRELLIS.2/download_weights.py \
--output_dir ComfyUI/models/trellis/cd ComfyUI
python main.pyAccess the ComfyUI web interface at http://localhost:8188 and search for TRELLIS nodes in the node browser.
| Node | Input | Output | Description |
|---|---|---|---|
| TRELLIS Image to 3D | Image | 3D Model (GLB) | Convert a single image to 3D |
| TRELLIS Text to 3D | Text prompt | 3D Model (GLB) | Generate 3D from description |
| TRELLIS Multi-View | Multiple images | 3D Model (GLB) | Use multiple views for better quality |
| TRELLIS Export | 3D Model | File | Export to various formats |
Docker provides a reproducible environment that works across platforms.
# Ubuntu
sudo apt install docker.io docker-compose -y
sudo usermod -aG docker $USER
# Start Docker
sudo systemctl start docker
sudo systemctl enable dockergit clone https://github.com/microsoft/TRELLIS.2.git
cd TRELLIS.2
# Build the image (includes CUDA support)
docker build -t trellis2 .# Run with GPU support
docker run --gpus all -p 7860:7860 -v ./outputs:/app/outputs trellis2Access the web interface at http://localhost:7860.
After installation, you can configure TRELLIS 2 through a config file or command-line arguments.
model:
name: "trellis2-4b"
weights_path: "./weights/"
generation:
default_resolution: 512
default_sampling_steps: 12
default_guidance_scale: 7.5
server:
host: "0.0.0.0"
port: 7860
max_batch_size: 4
output:
default_format: "glb"
save_intermediates: falsepython infer.py \
--image_path input.png \
--output_path output.glb \
--resolution 1024 \
--sampling_steps 25 \
--guidance_scale 10.0 \
--seed 42Symptom: RuntimeError: CUDA out of memory
Solutions:
--resolution 256 or --resolution 512--sampling_steps 4Symptom: ModuleNotFoundError or syntax errors
Solution: Ensure Python 3.10 or 3.11 is being used:
python --version # Should be 3.10.x or 3.11.xSymptom: RuntimeError: CUDA version mismatch
Solution: Reinstall PyTorch matching your CUDA version:
# For CUDA 11.8
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
# For CUDA 12.1
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121Symptom: Download timeout or corrupted files
Solution: Download weights manually from Hugging Face:
# Using huggingface-cli
pip install huggingface-hub
huggingface-cli download microsoft/TRELLIS.2-4B --local-dir ./weights/Symptom: Generation takes much longer than expected
Solutions:
nvidia-smi should work)python -c "import torch; print(torch.cuda.is_available())"Expected generation times by GPU (512 resolution, 12 sampling steps):
| GPU | Generation Time | VRAM Usage |
|---|---|---|
| RTX 4090 | ~2.5s | ~6 GB |
| RTX 4080 | ~3s | ~7 GB |
| RTX 3090 | ~4s | ~8 GB |
| RTX 3080 | ~5s | ~8 GB |
| RTX 4070 | ~4s | ~6 GB |
| RTX 3060 | ~8s | ~8 GB |
| GTX 1080 Ti | ~12s | ~8 GB |
| A100 | ~2s | ~6 GB |
To update to the latest version:
cd TRELLIS.2
# Pull latest changes
git pull origin main
# Update dependencies
pip install -r requirements.txt
# Download new weights if available
python download_weights.pyIf your hardware doesn't meet the requirements or you prefer not to install locally:
| Feature | Local | Online Platform |
|---|---|---|
| Setup time | 15-60 min | 0 min |
| GPU needed | Yes (NVIDIA) | No |
| Max resolution | GPU-dependent | Up to 1536³ |
| Batch processing | Yes | Yes |
| Cost | Hardware + electricity | Free tier available |
| Updates | Manual | Automatic |
After installation, learn how to use TRELLIS 2 effectively:
Related articles:
3D technology specialists focused on AI-powered 3D model generation, format conversion, and browser-based 3D rendering. We test and review 3D tools so you don't have to.

Complete guide to using Microsoft TRELLIS 2 online for free. Covers Hugging Face Spaces, Google Colab, and other cloud platforms — no GPU or Python installation needed.

Turn any photo into a 3D-printable model. Covers AI tool selection, mesh repair in Blender, STL export settings, slicer configuration, and troubleshooting common print failures. Works with TRELLIS 2, Meshy AI, and Tripo AI.

How to generate production-quality PBR textures (Base Color, Roughness, Metallic, Normal maps) with TRELLIS 2 in ComfyUI. Covers texture baking nodes, parameter tuning, and export for Unity/Unreal.
Join the community
Subscribe to our newsletter for the latest news and updates