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

TRELLIS on RTX 4090: High-Fidelity Image to 3D

3dintermediate16GB+ VRAMMay 13, 2026
tools
prerequisites
  • NVIDIA GPU with ≥ 16GB VRAM (RTX 4090 recommended)
  • ComfyUI installed
  • Python 3.10+
  • CUDA 11.8+

What You'll Build

Generate detailed 3D models from images using TRELLIS — Microsoft's structured 3D generation model. TRELLIS produces higher-fidelity meshes than most alternatives, making it ideal for detailed objects and architectural pieces.

TRELLIS vs Hunyuan3D-2: TRELLIS tends to produce cleaner topology and better handles thin features (furniture legs, mechanical parts). Hunyuan3D-2 is easier to install and requires less VRAM. Compare options →

Requirements

ComponentMinimumRecommended
GPURTX 4080 (16GB)RTX 4090 (24GB)
VRAM16GB24GB
RAM32GB64GB
Storage25GB25GB
CUDA11.8+12.x

Note: TRELLIS requires more VRAM than Hunyuan3D-2. On 12GB GPUs, use Hunyuan3D-2 instead.

Installation

1. Install ComfyUI

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

2. Install TRELLIS Dependencies

TRELLIS requires specific libraries that must be installed in order:

# Install PyTorch with CUDA first
pip install torch==2.4.0 torchvision==0.19.0 --index-url https://download.pytorch.org/whl/cu118

# Install TRELLIS core dependencies
pip install kaolin==0.17.0 -f https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.4.0_cu118.html

pip install git+https://github.com/EasternJournalist/utils3d.git
pip install spconv-cu118

3. Install ComfyUI-TRELLIS Nodes

cd ComfyUI/custom_nodes
git clone https://github.com/MrForExample/ComfyUI-3D-Pack

Or use the dedicated TRELLIS node if available in ComfyUI Manager.

4. Download TRELLIS Weights

huggingface-cli download microsoft/TRELLIS-image-large \
  --local-dir ./models/trellis/

Running

Start ComfyUI:

python main.py --listen

Load a TRELLIS workflow from ComfyUI-3D-Pack/workflows/

Generation Settings

ParameterValueNotes
Sparse Steps12Structure generation
SLAT Steps12Texture detail pass
Sparse CFG7.5Guidance strength
SeedFixed for reproducibility
Simplify Ratio0.95Mesh complexity (1.0 = max)

Output Formats

TRELLIS produces several output formats:

  • GLB: Best for Blender, Unity, Unreal
  • OBJ + MTL: Universal format, good for older software
  • Gaussian Splat (.ply): For real-time rendering applications

Quality Comparison

ModelBest ForVRAMSpeed
TRELLISDetailed objects, architecture16-24GBMedium
Hunyuan3D-2General objects, lower VRAM12GBFast
Stable Fast 3DSpeed priority8GBVery Fast

Input Image Guidelines

TRELLIS excels with:

  • Architecture and furniture: Clean lines, predictable structure
  • Mechanical objects: Vehicles, tools, electronics
  • Detailed sculptures: Clear silhouette, good lighting

Best practices:

  • White or removed background (use rembg)
  • Front-facing or slight 3/4 angle
  • High resolution (512×512 minimum)
  • Single object per image

Post-Processing in Blender

# Quick Blender cleanup script
import bpy

# Select the imported object
obj = bpy.context.active_object

# Smooth shading
bpy.ops.object.shade_smooth()

# Decimate for lower poly count (game assets)
mod = obj.modifiers.new(name="Decimate", type='DECIMATE')
mod.ratio = 0.5  # Reduce to 50% of original
bpy.ops.object.modifier_apply(modifier="Decimate")

Troubleshooting

CUDA errors during install: Ensure torch version matches your CUDA version exactly. Check nvidia-smi for your CUDA version.

OOM at 16GB: Reduce Simplify Ratio to 0.8, use lower resolution input image

Poor mesh quality: Try a higher quality input image with better lighting and cleaner background

Kaolin install fails: Use a fresh virtual environment — kaolin is sensitive to existing PyTorch installations

Use Cases

  • Game development: Generate assets from concept art
  • Product visualization: 3D-ify product photos for e-commerce
  • Architecture: Turn facade photos into 3D models for renovation planning
  • Prototype design: Rapid 3D prototype from sketches