From 8002e59031884feaf732c64f2d6c14b0e0c5ff94 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:31:11 -0500 Subject: [PATCH] disable mem arena in options for cpu only --- frigate/util/model.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/frigate/util/model.py b/frigate/util/model.py index b1c85b100..7aefe8b42 100644 --- a/frigate/util/model.py +++ b/frigate/util/model.py @@ -20,7 +20,7 @@ def get_ort_providers( ["CPUExecutionProvider"], [ { - "arena_extend_strategy": "kSameAsRequested", + "enable_cpu_mem_arena": False, } ], ) @@ -53,7 +53,7 @@ def get_ort_providers( providers.append(provider) options.append( { - "arena_extend_strategy": "kSameAsRequested", + "enable_cpu_mem_arena": False, } ) else: @@ -85,12 +85,8 @@ class ONNXModelRunner: else: # Use ONNXRuntime self.type = "ort" - options = ort.SessionOptions() - if device == "CPU": - options.enable_cpu_mem_arena = False self.ort = ort.InferenceSession( model_path, - sess_options=options, providers=providers, provider_options=options, )