Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

[pre-commit.ci] auto fixes from pre-commit.com hooks

pre-commit-ci[bot]aa7d812ffb27
diff --git a/kornia/feature/lightglue_onnx/lightglue.py b/kornia/feature/lightglue_onnx/lightglue.py
index 26802f6d3..52f92ca1a 100644
--- a/kornia/feature/lightglue_onnx/lightglue.py
+++ b/kornia/feature/lightglue_onnx/lightglue.py
@@ -196,8 +196,10 @@ class OnnxLightGlue:
_m = getattr(matches, "_ortvalue", matches)
_s = getattr(mscores, "_ortvalue", mscores)
if (
- hasattr(_m, "__dlpack__") and hasattr(_m, "__dlpack_device__") and
- hasattr(_s, "__dlpack__") and hasattr(_s, "__dlpack_device__")
+ hasattr(_m, "__dlpack__")
+ and hasattr(_m, "__dlpack_device__")
+ and hasattr(_s, "__dlpack__")
+ and hasattr(_s, "__dlpack_device__")
):
outputs = {
"matches": torch.from_dlpack(_m),
diff --git a/tests/feature/test_lightglue_onnx.py b/tests/feature/test_lightglue_onnx.py
index f07b1496d..4da71c17d 100644
--- a/tests/feature/test_lightglue_onnx.py
+++ b/tests/feature/test_lightglue_onnx.py
@@ -78,7 +78,7 @@ class TestOnnxLightGlue:
assert outputs["matches"].shape[-1] == 2
assert outputs["scores"].ndim == 1
assert outputs["matches"].shape[0] == outputs["scores"].shape[0]
-
+
def test_normalize_keypoints(self):
kpts = torch.randint(0, 100, (1, 5, 2))
size = torch.tensor([[100, 100]])