3 Commits
Author SHA1 Message Date
Nik Nichols 7cd8fbf4b7 docs(gpu): add Apple Silicon setup guide for MPS support 2026-06-24 16:30:30 -05:00
Nik Nichols 576bb2f6f2 test(gpu): add tests for Apple Silicon MPS device resolution and fallback 2026-06-24 16:30:29 -05:00
Nik Nichols 211c3fcba4 feat(gpu): add device-aware routing for Apple Silicon MPS support
- Add get_torch_device() helper in _shared.py: cuda > mps > cpu
- Guard MPS detection for torch builds lacking torch.backends.mps
- Check both is_built() and is_available() for MPS
- Route load_diffusers_pipeline() to resolved device instead of hardcoded cuda
- Use float32 on CPU (float16 is emulated/unreliable), float16 on MPS, bfloat16 on CUDA
- Guard enable_model_cpu_offload() to CUDA-only; fall back to .to(device) on MPS
- Enable attention slicing for MPS memory safety
- Add inspect-based signature guard for device= arg on RealESRGANer/GFPGANer
- Update install_instructions on all LOCAL_GPU tools to mention MPS/Apple Silicon
2026-06-24 16:29:09 -05:00