Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass device to demucs calls to ensure correct device is used #284

Merged
merged 1 commit into from
Dec 15, 2024

Conversation

jrhe
Copy link
Contributor

@jrhe jrhe commented Dec 13, 2024

Currently, the calls to demucs do not specify the device to be used, allowing demucs to decide the device itself. This PR modifies the code to ensure that the device used by the rest of whisper-diarization is passed to demucs.

This bug affects Mac users because demucs attempts to use the MPS backend regardless of the device set at the command line. However, the MPS backend is incompatible with demucs, resulting in the following error:

NotImplementedError: Output channels > 65536 not supported at the MPS device. As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

The changes in this PR pass the default device of cpu through to demucs, resolving the error.

@MahmoudAshraf97 MahmoudAshraf97 merged commit 2d0745e into MahmoudAshraf97:main Dec 15, 2024
9 checks passed
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