soho-clip / test-platform.py
sohojoe's picture
runs on mac but generation is wrong
7d22699
raw
history blame
266 Bytes
import torch
# set device to mps if avaliable, cude if avaliable, cpu otherwise
device = torch.device("mps" if torch.backends.mps.is_available() else "cuda:0" if torch.cuda.is_available() else "cpu")
print (device)
x = torch.zeros(1, device=device)
print (str(x))