support cuda
Browse files- README.md +2 -1
- save_audioMAE_self_sustainable.ipynb +0 -0
README.md
CHANGED
@@ -19,7 +19,8 @@ See `requirements.txt`
|
|
19 |
```python
|
20 |
from transformers import AutoModel
|
21 |
|
22 |
-
|
|
|
23 |
z = model('path/audio_fname.wav') # (768, 8, 64) = (latent_dim_size, latent_freq_dim, latent_temporal_dim)
|
24 |
```
|
25 |
|
|
|
19 |
```python
|
20 |
from transformers import AutoModel
|
21 |
|
22 |
+
device = 'cpu' # 'cpu' or 'cuda'
|
23 |
+
model = AutoModel.from_pretrained("hance-ai/audiomae", trust_remote_code=True).to(device) # load the pretrained model
|
24 |
z = model('path/audio_fname.wav') # (768, 8, 64) = (latent_dim_size, latent_freq_dim, latent_temporal_dim)
|
25 |
```
|
26 |
|
save_audioMAE_self_sustainable.ipynb
CHANGED
The diff for this file is too large to render.
See raw diff
|
|