Spaces:
Running
Running
michellelychan
commited on
Commit
·
e6d2446
1
Parent(s):
3167341
hello world
Browse files
app.py
CHANGED
@@ -5,12 +5,12 @@ from scipy.io.wavfile import write as write_wav
|
|
5 |
import os
|
6 |
|
7 |
|
8 |
-
|
9 |
# device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
# model = BarkModel.from_pretrained("suno/bark-small", torch_dtype=torch.float16).to(device)
|
11 |
# model.enable_cpu_offload()
|
12 |
|
13 |
-
### if you run on CPU use the following code:
|
14 |
device = "cpu"
|
15 |
# load in fp16
|
16 |
model = BarkModel.from_pretrained("suno/bark-small").to(device)
|
|
|
5 |
import os
|
6 |
|
7 |
|
8 |
+
### if you run on GPU use the following code: ####
|
9 |
# device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
# model = BarkModel.from_pretrained("suno/bark-small", torch_dtype=torch.float16).to(device)
|
11 |
# model.enable_cpu_offload()
|
12 |
|
13 |
+
### if you run on CPU use the following code: ####
|
14 |
device = "cpu"
|
15 |
# load in fp16
|
16 |
model = BarkModel.from_pretrained("suno/bark-small").to(device)
|