Add Macos support

This commit is contained in:
NumZ
2025-04-16 21:16:20 +02:00
parent a6e34ff448
commit 86848f0d20
+6 -1
View File
@@ -8,7 +8,12 @@ import queue
model = SNAC.from_pretrained("hubertsiuzdak/snac_24khz").eval()
snac_device = "cuda"
snac_device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# for mps
if torch.backends.mps.is_available():
snac_device = torch.device("cpu")
model = model.to(snac_device)