Oferta por tiempo limitado: Créditos ilimitados en el Plan Max
00:00:00

ComfyUI Trellis 2 Setup: Complete Local Installation Guide (2026)

Why Run Trellis 2 Locally with ComfyUI?

Running trellis-2 through ComfyUI gives you powerful advantages:

  • Unlimited generations — No API limits or costs
  • Custom workflows — Chain with other AI tools
  • Privacy — Your images never leave your computer
  • Speed — No network latency, direct GPU access
  • Control — Fine-tune every parameter

Prerequisites Before You Start

Hardware Requirements

ComponentMinimumRecommended
GPUNVIDIA RTX 3090 (24GB)RTX 4090 / A100
VRAM16GB24GB+
System RAM32GB64GB
Storage100GB freeNVMe SSD

Software Requirements

  • Operating System: Linux (Ubuntu 22.04 recommended)
  • CUDA Toolkit: 11.8 or 12.2
  • Python: 3.10 or 3.11
  • ComfyUI: Latest version
  • Conda/Mamba: For environment management

Step 1: Install ComfyUI (If Not Already Installed)

# Clone ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/Mac
# OR: venv\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt

# Test ComfyUI
python main.py

Visit http://127.0.0.1:8188 to verify ComfyUI is running.

Step 2: Install Trellis 2 Custom Nodes

Method A: ComfyUI Manager (Easiest)

  1. Install ComfyUI Manager if not installed
  2. Open ComfyUI → Manager → Install Custom Nodes
  3. Search for "Trellis" or "TRELLIS"
  4. Click Install
  5. Restart ComfyUI

Method B: Manual Installation

# Navigate to custom nodes directory
cd ComfyUI/custom_nodes

# Clone Trellis nodes
git clone https://github.com/microsoft/TRELLIS.git
cd TRELLIS

# Install dependencies
pip install -r requirements.txt

# Install additional dependencies
. ./setup.sh --basic --xformers --flash-attn --diffoctreerast --spconv --mipgaussian --kaolin --nvdiffrast

Step 3: Download Trellis 2 Models

The models are hosted on Hugging Face. Download these to your ComfyUI models folder:

# Create model directory
mkdir -p ComfyUI/models/trellis

# Download using huggingface-cli
pip install huggingface_hub
huggingface-cli download microsoft/TRELLIS-image-large --local-dir ComfyUI/models/trellis/TRELLIS-image-large

# OR download manually from:
# https://huggingface.co/microsoft/TRELLIS-image-large

Available Models

ModelParametersUse Case
TRELLIS-image-large1.2BBest for image-to-3D
TRELLIS-text-base342MText-to-3D (basic)
TRELLIS-text-large1.1BText-to-3D (quality)
TRELLIS-text-xlarge2.0BText-to-3D (best)

Step 4: Create Your First Trellis 2 Workflow

Basic Image-to-3D Workflow

  1. Load Image Node → Connect to Trellis Input
  2. Trellis Image-to-3D Node → Configure settings
  3. Save 3D Model Node → Export GLB/PLY

Node Configuration

Trellis Image-to-3D Settings:
├── seed: 42 (or random)
├── sparse_structure_steps: 12
├── sparse_structure_cfg: 7.5
├── slat_steps: 12
├── slat_cfg: 3.0
├── simplify: 0.95
└── texture_size: 1024

Step 5: Optimize for Your GPU

For 16GB VRAM (RTX 4080, A4000)

# Add to ComfyUI launch
--lowvram --preview-method auto

Adjust Trellis settings:

  • Reduce texture_size to 512
  • Lower resolution to 768
  • Enable memory optimization flags

For 24GB+ VRAM (RTX 4090, A100)

Run at full settings:

  • texture_size: 2048
  • resolution: 1024
  • All quality options enabled

Advanced Workflow: Chaining Trellis 2 with Other Nodes

Workflow: Image → Remove Background → Trellis 2 → Export

Load Image

Background Removal (RMBG)

Trellis 2 Image-to-3D

[Optional] Mesh Simplification

Save GLB + Preview Video

Workflow: Text → Image (SDXL) → Trellis 2 → 3D

CLIP Text Encode

KSampler (SDXL)

VAE Decode

Trellis 2 Image-to-3D

Save 3D Model

Troubleshooting Common Issues

"CUDA out of memory"

Solutions:

  1. Close other GPU applications
  2. Use --lowvram flag
  3. Reduce texture_size and resolution
  4. Try CPU offloading for some operations

"Module not found" errors

# Reinstall dependencies
cd ComfyUI/custom_nodes/TRELLIS
pip install -r requirements.txt --force-reinstall

"Flash attention not available"

# Install flash-attn manually
pip install flash-attn --no-build-isolation

# OR use xformers backend
export ATTN_BACKEND=xformers

Slow generation speed

  • Ensure CUDA is properly detected: python -c "import torch; print(torch.cuda.is_available())"
  • Use SSD storage for models
  • Close background applications

Performance Optimization Tips

Speed Optimization

TechniqueSpeed GainTrade-off
Lower texture_size2x fasterLess texture detail
Reduce steps1.5x fasterSlightly lower quality
Enable xformers20% fasterRequires installation
Use FP161.5x fasterMinimal quality loss

Quality Optimization

TechniqueQuality GainTrade-off
Higher texture_sizeSharper texturesSlower, more VRAM
More stepsBetter detailsSlower generation
Multiple seedsBest result selectionMore generations needed

FAQ: ComfyUI + Trellis 2

Can I run Trellis 2 on Windows?

Windows support is experimental. Linux is strongly recommended. If you must use Windows, consider WSL2 with Ubuntu.

How much disk space do I need?

Plan for 50-100GB: ~15GB for models, ~30GB for dependencies, plus working space for outputs.

Can I use Trellis 2 with ControlNet?

Yes! Preprocess your image with ControlNet first, then feed the result to Trellis 2 for 3D generation.

Does ComfyUI Trellis support batch processing?

Yes, connect multiple images to process them in sequence. Useful for creating asset libraries.

Can I fine-tune Trellis 2 in ComfyUI?

Training requires separate setup outside ComfyUI. Use the official training scripts from the TRELLIS repository.

Next Steps

Now that you have trellis-2 running locally with ComfyUI:

  1. Experiment with different image types and settings
  2. Build custom workflows combining multiple AI tools
  3. Join the community — Share your workflows on ComfyUI forums
  4. Optimize your setup for your specific hardware

Ready to create 3D assets without limits? Your local trellis-2 setup is now complete!

📝

Best Free 3D AI Generators in 2026: Why Trellis 2 Leads the Pack

Discover the top free AI 3D generators in 2026. Compare trellis-2, Hunyuan 3D, TripoSR, and more. Create professional 3D models without spending a dime.

📝

ComfyUI Trellis 2 Setup: Complete Local Installation Guide (2026)

Learn how to install and run trellis-2 locally with ComfyUI. Step-by-step guide for GPU setup, node installation, and creating your first 3D model workflow.

📝

Microsoft's Trellis 2: Best Open-Source 3D AI in 2026? Full Review

Deep dive into Microsoft's Trellis 2 - the open-source AI that's changing 3D generation. Learn why this MIT-licensed tool is outperforming paid alternatives.

📝

Trellis 2 for Blender: Export GLB, Import, and Edit 3D Models (2026)

Complete guide to using trellis-2 with Blender. Learn to export GLB files, import 3D models, clean meshes, and create game-ready assets from AI generation.

📝

Trellis 2 Complete Tutorial: Image to 3D Model Generation (2026 Guide)

Master trellis-2 image-to-3D generation with this step-by-step tutorial. Learn how to create stunning 3D models from any image using Microsoft's Trellis 2 AI.

📝

Can Trellis 2 Create 3D Print-Ready Models? AI Mesh Quality Test

Testing trellis-2 AI for 3D printing: mesh quality, watertightness, and real-world printability. See if AI-generated 3D models from Trellis 2 are good enough for your printer.

📝

Trellis 2 for VFX: A Professional 3D Artist's Honest Review

15-year VFX veteran tests trellis-2 for real production work. Discover if Microsoft's AI 3D generator is ready for professional pipelines.

📝

Trellis 2 Quickstart: Image to 3D in Under 5 Minutes

The fastest way to start using trellis-2. Go from zero to 3D model in 5 minutes with this beginner-friendly quickstart guide.

📝

Trellis 2 vs Meshy vs Hunyuan 3D: Best AI 3D Generator Comparison (2026)

Comprehensive comparison of trellis-2, Meshy AI, and Hunyuan 3D. Discover which AI 3D generator is best for your workflow with real examples and benchmarks.

📝

TRELLIS.2 (trellis-2) Complete Guide: Image-to-3D, PBR Textures, GLB Export

A practical trellis-2 / trellis 2 / trellis.2 guide: what TRELLIS.2 is, how image-to-3D works, best inputs, key settings, and how to export/import GLB assets.

📝

Tripo 3D vs Trellis vs Rodin: Ultimate Image-to-3D Comparison (2026)

In-depth comparison of Tripo 3D, Trellis 2, and Rodin AI for image-to-3D generation. See real results, pricing, and find out which tool is best for game dev and 3D artists.

← Swipe →
ComfyUI Trellis 2 Setup: Complete Local Installation...