Comments (4)
Hi, the most of computing time is from source separation (Demucs), so Demucs should support mps.
However, I did a bit search and I guess it's not possible for now sadly 😢
facebookresearch/demucs#432
from all-in-one.
Hi @tae-jun, thanks for clarification. The issue seems to be that mps doesn't support complex number operations or any other float than float32... and then it's a matter of finding a right spot and using .to("cpu") function to drag back processing of that particular math operation back to cpu.
https://github.com/facebookresearch/demucs/blob/main/demucs/htdemucs.py#L628C1-L634C24
# to cpu as mps doesnt support complex numbers
# demucs issue #435 ##432
# NOTE: in this case z already is on cpu
# TODO: remove this when mps supports complex numbers
x_is_mps = x.device.type == "mps"
if x_is_mps:
x = x.cpu()
and then
https://github.com/facebookresearch/demucs/blob/main/demucs/htdemucs.py#L645
# back to mps device
if x_is_mps:
x = x.to("mps")
But then we still have cpu doing most of the work. The real solution would be to not use complex numbers at all... if the algorithm can be adopted to use only real number like for example FFT, can be done with or without complex numbers.
Are there any other source separation alternatives that we could use instead of Demucs?
from all-in-one.
There are many publicly available source separation tools nowadays, such as Spleeter.
However, I have not tested all-in-one on other source separation models, and since all-in-one is trained on outputs of Demucs, I can't guarantee its performance.
But I think it's worth a try!
from all-in-one.
I found this one with MPS support
https://github.com/karaokenerds/python-audio-separator
It seems like with the latest os Sonoma+ it is possible to get complex numbers working
pytorch/pytorch#78044 (comment)
from all-in-one.
Related Issues (12)
- dinat.py - line 109 - natten1dav HOT 2
- Training code HOT 2
- IndexError: index 0 is out of bounds for axis 0 with size 0 HOT 5
- HarmonixSet segment pre-processing? HOT 6
- [macOS] [natten] failed to install natten
- Differences between models on HF
- TypeError: natten1dqkrpb() takes 4 positional arguments but 5 were given HOT 1
- Specifying device for inference gives error HOT 4
- Label Preprocessing Problem HOT 4
- huggingface_hub.utils._errors.LocalEntryNotFoundError HOT 2
- Makefile error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from all-in-one.