Spaces:
Running
Running
Curinha
commited on
Commit
·
a008552
1
Parent(s):
f8bd524
Add device information print statement in sound_generator.py
Browse files- sound_generator.py +1 -0
sound_generator.py
CHANGED
@@ -4,6 +4,7 @@ import torch
|
|
4 |
|
5 |
# Load the pretrained models and move them to GPU if available
|
6 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
7 |
|
8 |
sound_model = AudioGen.get_pretrained('facebook/audiogen-medium').to(device)
|
9 |
music_model = MusicGen.get_pretrained('facebook/musicgen-small').to(device)
|
|
|
4 |
|
5 |
# Load the pretrained models and move them to GPU if available
|
6 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
7 |
+
print("Using device:", device)
|
8 |
|
9 |
sound_model = AudioGen.get_pretrained('facebook/audiogen-medium').to(device)
|
10 |
music_model = MusicGen.get_pretrained('facebook/musicgen-small').to(device)
|