Spaces:
Paused
Paused
Anton Forsman
commited on
Commit
·
94539f6
1
Parent(s):
9efd988
fix device issue
Browse files- inference.py +1 -2
inference.py
CHANGED
@@ -11,8 +11,7 @@ from unet import Unet, ConditionalUnet
|
|
11 |
|
12 |
from diffusion import GaussianDiffusion, DiffusionImageAPI
|
13 |
|
14 |
-
|
15 |
-
device = torch.device("mps")
|
16 |
|
17 |
def inference1():
|
18 |
# new image from web page
|
|
|
11 |
|
12 |
from diffusion import GaussianDiffusion, DiffusionImageAPI
|
13 |
|
14 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
15 |
|
16 |
def inference1():
|
17 |
# new image from web page
|