Skip to content

Commit fbd2f54

Browse files
committed
check if cuda is available
1 parent 675d8ae commit fbd2f54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

inference.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
img_size=64, # image size to use
2626
num_random_experiments = 2, # we will perform inference multiple times on the same inputs
2727
seed=42,
28-
# device="cuda:0",
29-
device="mps",
28+
device="cuda" if torch.cuda.is_available() else "cpu",
29+
# device="mps",
3030
sampler="ddim",
3131
future_frames=10, # number of future frames
3232
bs=8, # how many samples

0 commit comments

Comments
 (0)