From 751678c845997ae2013b915fbf0df93b56bb701c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 12 Sep 2025 05:41:26 -0600 Subject: [PATCH] Fix cuda graph fallback (#20039) --- frigate/detectors/plugins/onnx.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frigate/detectors/plugins/onnx.py b/frigate/detectors/plugins/onnx.py index 527de7e11..4f903aa1f 100644 --- a/frigate/detectors/plugins/onnx.py +++ b/frigate/detectors/plugins/onnx.py @@ -143,9 +143,10 @@ class ONNXDetector(DetectionApi): try: # Run using CUDA graphs if available tensor_output = self._cg_runner.run(model_input_name, tensor_input) - except Exception: - logger.warning("CUDA Graphs failed, falling back to regular run") + except Exception as e: + logger.warning(f"CUDA Graphs failed, falling back to regular run: {e}") self._cg_runner = None + tensor_output = self.model.run(None, {model_input_name: tensor_input}) else: # Use regular run if CUDA graphs are not available tensor_output = self.model.run(None, {model_input_name: tensor_input})