Developer Tools

Show HN: Run TRELLIS.2 Image-to-3D generation natively on Apple Silicon

Generates 400K+ vertex 3D meshes from photos in ~3.5 minutes on M4 Pro, no NVIDIA GPU required.

Deep Dive

A developer has successfully ported Microsoft Research's state-of-the-art TRELLIS.2 image-to-3D generation model to run natively on Apple Silicon Macs. The project, created by Shivam Kumar, replaces CUDA-only dependencies with pure-PyTorch implementations using the Metal Performance Shaders (MPS) backend. This allows the 4B-parameter model to generate detailed 3D meshes with over 400,000 vertices from a single input image in approximately 3.5 minutes on an M4 Pro Mac with 24GB unified memory. The output includes textured OBJ and GLB files complete with PBR materials, making them production-ready for 3D applications.

The port required significant engineering work to replace CUDA-specific components like flex_gemm for sparse 3D convolution and specialized hashmap operations for mesh extraction. Kumar implemented custom backends in pure Python and PyTorch, including a spatial hash system for sparse convolution and dictionary-based mesh extraction algorithms. While the current implementation is about 10x slower than the original CUDA version and lacks some advanced features like texture baking (which requires the CUDA-only nvdiffrast library), it represents a major breakthrough for running cutting-edge 3D AI locally on Apple hardware. The project is available on GitHub with MIT-licensed code, though the underlying model weights from Microsoft, Meta, and BRIA AI have their own licensing requirements.

Key Points
  • Generates production-ready 3D meshes (400K+ vertices) from single images in ~3.5 minutes on M4 Pro Macs
  • Replaces CUDA dependencies with pure-PyTorch MPS implementation, requiring 24GB+ unified memory and ~15GB disk space
  • Outputs textured OBJ/GLB files with PBR materials, though texture baking and hole filling features are currently disabled

Why It Matters

Democratizes high-quality 3D content creation by enabling state-of-the-art AI generation on consumer Apple hardware without expensive NVIDIA GPUs.