Spaces:
Sleeping
Sleeping
Update device.py
#2
by
Gosula
- opened
device.py
CHANGED
@@ -14,8 +14,8 @@ from torchvision import transforms as tfms
|
|
14 |
from tqdm.auto import tqdm
|
15 |
from transformers import CLIPTextModel, CLIPTokenizer, logging
|
16 |
import os
|
17 |
-
|
18 |
-
torch_device = "cpu"
|
19 |
|
20 |
|
21 |
# Load the autoencoder model which will be used to decode the latents into image space.
|
|
|
14 |
from tqdm.auto import tqdm
|
15 |
from transformers import CLIPTextModel, CLIPTokenizer, logging
|
16 |
import os
|
17 |
+
torch_device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
18 |
+
#torch_device = "cpu"
|
19 |
|
20 |
|
21 |
# Load the autoencoder model which will be used to decode the latents into image space.
|