asteroid-team / asteroid-team/asteroid
How to use GPU rather than CPU
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 450
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Trying the first example to separate an mp3. ie
```
from asteroid.models import BaseModel
import soundfile as sf
model = BaseModel.from_pretrained("mpariente/DPRNNTasNet-ks2_WHAM_sepclean")
model.separate("music.mp3",resample=True)
```
It worked (well worked as in just made 2 distorted versions of the source music without separating anything it seems) but it uses 100% CPU and seems to ignore the GPU.
How do I tell it to use the GPU?
Thanks.
Contributor guide
Research direction
Start with the shown BaseModel.from_pretrained and model.separate entry points and inspect how device selection is handled for the first example. Document the required GPU usage guidance and verify that the example performs separation on the GPU rather than only using the CPU.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100