Update 2-get-hubert-wav32k.py

This commit is contained in:
RVC-Boss 2024-01-25 23:28:08 +08:00 committed by GitHub
parent 56fef8a59c
commit d796bd40b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,12 @@ os.makedirs(wav32dir,exist_ok=True)
maxx=0.95
alpha=0.5
device="cuda:0" if torch.cuda.is_available() else "mps"
if torch.cuda.is_available():
device = "cuda:0"
elif torch.backends.mps.is_available():
device = "mps"
else:
device = "cpu"
model=cnhubert.get_model()
# is_half=False
if(is_half==True):