ruslanmv commited on
Commit
10e2779
·
verified ·
1 Parent(s): 9b12079

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -71,6 +71,12 @@ model_path = os.path.join(get_user_data_dir("tts"), model_name.replace("/", "--"
71
  print("XTTS downloaded")
72
 
73
 
 
 
 
 
 
 
74
  print("Loading XTTS")
75
  config = XttsConfig()
76
  config.load_json(os.path.join(model_path, "config.json"))
@@ -81,7 +87,7 @@ model.load_checkpoint(
81
  checkpoint_path=os.path.join(model_path, "model.pth"),
82
  vocab_path=os.path.join(model_path, "vocab.json"),
83
  eval=True,
84
- use_deepspeed=True,
85
  )
86
  if is_gpu:
87
  model.cuda()
 
71
  print("XTTS downloaded")
72
 
73
 
74
+ if is_gpu:
75
+ use_deepspeed=True
76
+ else:
77
+ use_deepspeed=False
78
+
79
+
80
  print("Loading XTTS")
81
  config = XttsConfig()
82
  config.load_json(os.path.join(model_path, "config.json"))
 
87
  checkpoint_path=os.path.join(model_path, "model.pth"),
88
  vocab_path=os.path.join(model_path, "vocab.json"),
89
  eval=True,
90
+ use_deepspeed=use_deepspeed,
91
  )
92
  if is_gpu:
93
  model.cuda()