mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
Fix GPU init in tests
This commit is contained in:
+2
-2
@@ -7,8 +7,8 @@ from TTS.utils.generic_utils import get_cuda
|
||||
def get_device_id():
|
||||
use_cuda, _ = get_cuda()
|
||||
if use_cuda:
|
||||
if 'CUDA_VISIBLE_DEVICES' in os.environ and os.environ['CUDA_VISIBLE_DEVICES'] != "":
|
||||
GPU_ID = os.environ['CUDA_VISIBLE_DEVICES'].split(',')[0]
|
||||
if "CUDA_VISIBLE_DEVICES" in os.environ and os.environ["CUDA_VISIBLE_DEVICES"] != "":
|
||||
GPU_ID = os.environ["CUDA_VISIBLE_DEVICES"].split(",")[0]
|
||||
else:
|
||||
GPU_ID = "0"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user