π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
removed redundant device copies
Varun Said026e72e6a13
diff --git a/kornia/feature/lightglue_onnx/lightglue.py b/kornia/feature/lightglue_onnx/lightglue.pyindex 195724059..4d3b8815b 100644--- a/kornia/feature/lightglue_onnx/lightglue.py+++ b/kornia/feature/lightglue_onnx/lightglue.py@@ -189,8 +189,8 @@ class OnnxLightGlue:# The fallback path uses NumPy, which incurs a device-to-host copy and is slower.if hasattr(matches, "to_dlpack"):outputs = {- "matches": dlpack.from_dlpack(matches.to_dlpack()).to(self.device),- "scores": dlpack.from_dlpack(mscores.to_dlpack()).to(self.device),+ "matches": dlpack.from_dlpack(matches.to_dlpack()),+ "scores": dlpack.from_dlpack(mscores.to_dlpack()),}else:outputs = {