Misc bugfixes and improvements (#14460)

* only save a fixed number of thumbnails if genai is enabled

* disable cpu_mem_arena to save on memory until its actually needed

* fix search settings pane so it actually saves to the config
This commit is contained in:
Josh Hawkins
2024-10-20 14:14:51 -06:00
committed by GitHub
parent b24d292ade
commit 6c70e56059
3 changed files with 29 additions and 2 deletions
+7 -1
View File
@@ -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]: