From 6a16fa667b7993eba26f08fdd7799b5898ced893 Mon Sep 17 00:00:00 2001 From: felalex Date: Sat, 2 May 2026 23:52:23 -0700 Subject: [PATCH] fix: explicitly set graph_optimization_level for non-complex models Same robustness pattern as the previous mem_pattern commit: previously inherited ORT's implicit default (ORT_ENABLE_ALL) when is_complex_model was False. Set explicitly in both branches so the behavior survives any future ORT default change. Co-Authored-By: Claude Opus 4.7 --- frigate/detectors/detection_runners.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frigate/detectors/detection_runners.py b/frigate/detectors/detection_runners.py index 6e9eeca76..922c7748e 100644 --- a/frigate/detectors/detection_runners.py +++ b/frigate/detectors/detection_runners.py @@ -56,6 +56,12 @@ def get_ort_session_options( sess_options.graph_optimization_level = ( ort.GraphOptimizationLevel.ORT_ENABLE_BASIC ) + else: + # Most models tolerate aggressive fusions; set explicitly to be robust + # against ORT default changes. + sess_options.graph_optimization_level = ( + ort.GraphOptimizationLevel.ORT_ENABLE_ALL + ) return sess_options