inpaintingv1 / ia_devices.py
a7md2del's picture
Upload folder using huggingface_hub
64bafa9 verified
raw
history blame contribute delete
221 Bytes
import torch
class TorchDevices:
def __init__(self):
self.cpu = torch.device("cpu")
self.device = torch.device("cuda") if torch.cuda.is_available() else self.cpu
devices = TorchDevices()