YeOldeCut / director /device.py
atlasmoth's picture
some cleanup
a888389
Raw
History Blame Contribute Delete
217 Bytes
import torch
def pick_device():
if torch.cuda.is_available():
return "cuda", torch.float16
if torch.backends.mps.is_available():
return "mps", torch.float16
return "cpu", torch.float32