Skip to content

fix: support Intel Macs (torch pin + MPS STFT probe) - #9

Open
dooburt wants to merge 1 commit into
danvelope:mainfrom
dooburt:fix/intel-mac-torch-pin-and-mps-stft
Open

fix: support Intel Macs (torch pin + MPS STFT probe)#9
dooburt wants to merge 1 commit into
danvelope:mainfrom
dooburt:fix/intel-mac-torch-pin-and-mps-stft

Conversation

@dooburt

@dooburt dooburt commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Setup failed outright on macOS x86_64, and would have failed again later on Intel Macs that do have a Metal-capable GPU.

torch pin: PyTorch shipped its last macOS x86_64 wheels in 2.2.2, so the 2.5.1 pin cannot resolve on an Intel Mac and the whole engine install aborts:

ERROR: Could not find a version that satisfies the requirement
torch==2.5.1 (from versions: 2.0.0 ... 2.2.2)

torchPins() now selects 2.2.2 on macOS x86_64 and keeps 2.5.1 everywhere else. It probes the interpreter's platform.machine() rather than process.arch, since a system python can be a different architecture to Electron (and to Rosetta).

GPU probe: hasGpuAcceleration() asked whether a GPU exists, but what it means is whether the roformer engine can run. Intel Macs with AMD graphics report MPS as available while lacking aten::_fft_r2c, and roformer runs its STFT on-device -- so the probe returned true, the 913MB vocals checkpoint downloaded, and the split then died with NotImplementedError. The probe now attempts a torch.stft on the chosen device, so such machines fall through to the existing demucs path. demucs is unaffected either way: its spectro() already moves the STFT to the CPU when the tensor is on MPS.

Apple Silicon and Windows behaviour is unchanged.

Verified on a 2019 Intel MacBook Pro (macOS 15.7.5, Radeon Pro 560X): engine installs clean on torch 2.2.2, probe returns 0, and splits run through demucs on MPS.

Setup failed outright on macOS x86_64, and would have failed again later
on Intel Macs that do have a Metal-capable GPU.

torch pin: PyTorch shipped its last macOS x86_64 wheels in 2.2.2, so the
2.5.1 pin cannot resolve on an Intel Mac and the whole engine install
aborts:

  ERROR: Could not find a version that satisfies the requirement
  torch==2.5.1 (from versions: 2.0.0 ... 2.2.2)

torchPins() now selects 2.2.2 on macOS x86_64 and keeps 2.5.1 everywhere
else. It probes the interpreter's platform.machine() rather than
process.arch, since a system python can be a different architecture to
Electron (and to Rosetta).

GPU probe: hasGpuAcceleration() asked whether a GPU exists, but what it
means is whether the roformer engine can run. Intel Macs with AMD
graphics report MPS as available while lacking aten::_fft_r2c, and
roformer runs its STFT on-device -- so the probe returned true, the
913MB vocals checkpoint downloaded, and the split then died with
NotImplementedError. The probe now attempts a torch.stft on the chosen
device, so such machines fall through to the existing demucs path.
demucs is unaffected either way: its spectro() already moves the STFT to
the CPU when the tensor is on MPS.

Apple Silicon and Windows behaviour is unchanged.

Verified on a 2019 Intel MacBook Pro (macOS 15.7.5, Radeon Pro 560X):
engine installs clean on torch 2.2.2, probe returns 0, and splits run
through demucs on MPS.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@danvelope

Copy link
Copy Markdown
Owner

Thanks for the PR! Sorry about the merge conflicts, get those resolved and we can merge this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants