You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a macOS (Apple Silicon) user, I want the generation models to run on my Mac, so I can generate 3D meshes without a CUDA GPU.
The backend currently assumes CUDA (torch.cuda.is_available() in api/services/generators/base.py), so the four models only run on Windows. macOS needs the Metal (MPS) backend, with a CPU fallback. This ticket adds device detection and makes each model run on macOS.
Models
TripoSG
Trellis2
Hunyuan3D
Pixal3D
Scope
Auto-detect device: CUDA → MPS → CPU based on the platform.
Each model runs on MPS and produces a valid GLB on Apple Silicon.
Handle MPS-specific issues (dtype, unsupported ops) with a CPU fallback where needed.
Weights download and load correctly on macOS.
Implementation
api/services/generators/base.py: replace the CUDA-only assumption with a shared device-selection helper (cuda → mps → cpu).
Each model extension (generator.py): use the selected device instead of hardcoded .cuda(); guard ops that MPS doesn't support.
Reuse the same helper across all four models so device logic lives in one place, not duplicated per extension.
No frontend, store, or API surface changes.
Acceptance criteria
Each of the four models generates a valid GLB on an Apple Silicon Mac.
No device-related errors on macOS (falls back to CPU when MPS is missing an op).
Activity
Enable PyTorch's MPS CPU-fallback for extension subprocesses on macOS
Avoid MPS's max_pool3d gap by rewriting the dilation as conv3d
Add shared cuda->mps->cpu device-selection helper for generators
Merge pull request #254 from MarcBarnaba/macos-mps-support