Update DAM_V2/depth_anything_v2/dpt.py
Browse files
DAM_V2/depth_anything_v2/dpt.py
CHANGED
|
@@ -215,9 +215,9 @@ class DepthAnythingV2(nn.Module):
|
|
| 215 |
image = transform({'image': image})['image']
|
| 216 |
image = torch.from_numpy(image).unsqueeze(0)
|
| 217 |
|
| 218 |
-
DEVICE = 'cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu'
|
| 219 |
|
| 220 |
-
|
| 221 |
image = image.to(DEVICE)
|
| 222 |
|
| 223 |
return image, (h, w)
|
|
|
|
| 215 |
image = transform({'image': image})['image']
|
| 216 |
image = torch.from_numpy(image).unsqueeze(0)
|
| 217 |
|
| 218 |
+
# DEVICE = 'cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu'
|
| 219 |
|
| 220 |
+
DEVICE = "cpu"
|
| 221 |
image = image.to(DEVICE)
|
| 222 |
|
| 223 |
return image, (h, w)
|