cocktailpeanut commited on
Commit
d143d17
·
1 Parent(s): 8b1a278
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -5,7 +5,13 @@ import torch
5
  from parler_tts import ParlerTTSForConditionalGeneration
6
  from transformers import AutoTokenizer, AutoFeatureExtractor, set_seed
7
 
8
- device = "cuda:0" if torch.cuda.is_available() else "cpu"
 
 
 
 
 
 
9
 
10
 
11
  repo_id = "parler-tts/parler_tts_mini_v0.1"
 
5
  from parler_tts import ParlerTTSForConditionalGeneration
6
  from transformers import AutoTokenizer, AutoFeatureExtractor, set_seed
7
 
8
+ #device = "cuda:0" if torch.cuda.is_available() else "cpu"
9
+ if torch.cuda.is_available():
10
+ device = "cuda"
11
+ elif torch.backends.mps.is_available():
12
+ device = "mps"
13
+ else:
14
+ device = "cpu"
15
 
16
 
17
  repo_id = "parler-tts/parler_tts_mini_v0.1"