diff --git a/nbs/homography.ipynb b/nbs/homography.ipynb index 92aaf3a..78500f9 100644 --- a/nbs/homography.ipynb +++ b/nbs/homography.ipynb @@ -115,7 +115,7 @@ "error_tol: float = 1e-8 # the optimisation error tolerance\n", "\n", "log_interval: int = 100 # print log every N iterations\n", - "device = K.utils.get_cuda_device_if_available()\n", + "device = K.utils.get_cuda_or_mps_device_if_available()\n", "print(\"Using \", device)" ] }, diff --git a/nbs/image_matching_adalam.ipynb b/nbs/image_matching_adalam.ipynb index 46368a7..d78c614 100644 --- a/nbs/image_matching_adalam.ipynb +++ b/nbs/image_matching_adalam.ipynb @@ -98,7 +98,7 @@ "import torch\n", "from kornia_moons.viz import *\n", "\n", - "# device = K.utils.get_cuda_device_if_available()\n", + "# device = K.utils.get_cuda_or_mps_device_if_available()\n", "device = torch.device(\"cpu\")" ] }, diff --git a/nbs/image_matching_disk.ipynb b/nbs/image_matching_disk.ipynb index da0533b..367c6a9 100644 --- a/nbs/image_matching_disk.ipynb +++ b/nbs/image_matching_disk.ipynb @@ -107,8 +107,7 @@ "from kornia.feature.adalam import AdalamFilter\n", "from kornia_moons.viz import *\n", "\n", - "# device = torch.device(\"mps\") # it works also for Apple M1/M2\n", - "device = K.utils.get_cuda_device_if_available()\n", + "device = K.utils.get_cuda_or_mps_device_if_available()\n", "print(device)" ] }, diff --git a/nbs/image_prompter.ipynb b/nbs/image_prompter.ipynb index e1251f1..e00998b 100644 --- a/nbs/image_prompter.ipynb +++ b/nbs/image_prompter.ipynb @@ -115,7 +115,7 @@ "from kornia.geometry.boxes import Boxes\n", "from kornia.geometry.keypoints import Keypoints\n", "from kornia.io import ImageLoadType, load_image\n", - "from kornia.utils import get_cuda_device_if_available, tensor_to_image" + "from kornia.utils import get_cuda_or_mps_device_if_available, tensor_to_image" ] }, { @@ -132,7 +132,7 @@ } ], "source": [ - "device = get_cuda_device_if_available()\n", + "device = get_cuda_or_mps_device_if_available()\n", "print(device)" ] },