Apple Silicon에서 TRELLIS.2 실행하기
📌 핵심 요약
Microsoft의 TRELLIS.2 모델이 Apple Silicon에서 PyTorch MPS를 통해 실행 가능해졌습니다. 이 모델은 단일 사진으로부터 약 400K의 정점 메쉬를 생성합니다.
📰 상세 내용
TRELLIS.2는 4B 파라미터를 가진 이미지-투-3D(image-to-3D) 모델로, 원래는 CUDA와 여러 라이브러리를 필요로 했습니다. 그러나 Mac에서는 이들이 작동하지 않아, CUDA 관련 연산을 순수 PyTorch 대안으로 대체했습니다. M4 Pro(24GB)에서 단일 사진으로 약 3.5분 만에 400K의 정점 메쉬를 생성할 수 있으며, H100보다 느리지만 클라우드 의존 없이 오프라인에서 작동합니다.
💡 시사점
이러한 포팅 작업은 Apple Silicon 사용자들에게 강력한 3D 생성 도구를 제공하며, Mac 환경에서도 고급 AI 모델을 활용할 수 있는 가능성을 열어줍니다.
📄 Original (English)
Show HN: Run TRELLIS.2 Image-to-3D generation natively on Apple Silicon
I replaced the CUDA-specific ops with pure-PyTorch alternatives: a gather-scatter sparse 3D convolution, SDPA attention for sparse transformers, and a Python-based mesh extraction replacing CUDA hashmap operations. Total changes are a few hundred lines across 9 files.
Generates ~400K vertex meshes from single photos in about 3.5 minutes on M4 Pro (24GB). Not as fast as H100 (where it takes seconds), but it works offline with no cloud dependency.