mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 23:55:25 +03:00
disable cpu_mem_arena to save on memory until its actually needed
This commit is contained in:
parent
9e37217d85
commit
07c2ec317d
@ -85,8 +85,14 @@ 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, providers=providers, provider_options=options
|
||||
model_path,
|
||||
sess_options=options,
|
||||
providers=providers,
|
||||
provider_options=options,
|
||||
)
|
||||
|
||||
def get_input_names(self) -> list[str]:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user