Finalise Apple Silicon (MPS) support#17
Open
gmorain wants to merge 1 commit into
Open
Conversation
The core paths already had MPS scaffolding (device detection, Metal GGUF
offload, cache clearing, load-then-.to("mps")). This finishes the port.
- backend.py: single get_torch_device() helper (dedupes QwenEngine/SAM3Engine
detection); prefer bfloat16 on MPS (float16 NaNs on bf16-native VLMs);
SAM3 autocast now uses device_type="mps"/float16 instead of nullcontext,
fixing the mixed bf16/fp32 dtype-mismatch on Apple Silicon.
- gui_workers.py + main.py: native macOS memory monitor via torch.mps
allocation vs total unified memory (os.sysconf); relabel VRAM/"No NVIDIA
GPU" to neutral "GPU Mem"/"GPU N/A".
- tab_captions.py: disable Int8/NF4 (BitsAndBytes, CUDA-only) off CUDA.
- requirements.txt: drop unused decord (no arm64 wheels; frames come from cv2).
- README.md: macOS (Apple Silicon) install section + prerequisite; run.sh
message no longer Linux-specific.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most MPS support was already in place; this finishes it so VisionCaptioner runs on Apple Silicon Macs.
vm_stat); GPU load shows N/A (no unprivileged source on macOS)decorddependency; add macOS install docs; makerun.shexecutableExisting test suite passes (165). Transformers captioning and the memory monitor verified on Apple Silicon.
SAM3 masking is untested on MPS: my SAM3 access request was rejected by Meta (as it has been for many other HF users), so I could not obtain the weights. The MPS code path for SAM3 (autocast) is written but unexercised.