From 94758738b6f2bf79a36d44edbf86b15d40d4687c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Tue, 29 Oct 2024 10:53:44 -0600 Subject: [PATCH] Assume rocm model is onnx despite file extension --- frigate/detectors/plugins/rocm.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frigate/detectors/plugins/rocm.py b/frigate/detectors/plugins/rocm.py index 655973dfd..60118d129 100644 --- a/frigate/detectors/plugins/rocm.py +++ b/frigate/detectors/plugins/rocm.py @@ -98,9 +98,7 @@ class ROCmDetector(DetectionApi): else: logger.info(f"AMD/ROCm: loading model from {path}") - if path.endswith(".onnx"): - self.model = migraphx.parse_onnx(path) - elif ( + if ( path.endswith(".tf") or path.endswith(".tf2") or path.endswith(".tflite") @@ -108,7 +106,7 @@ class ROCmDetector(DetectionApi): # untested self.model = migraphx.parse_tf(path) else: - raise Exception(f"AMD/ROCm: unknown model format {path}") + self.model = migraphx.parse_onnx(path) logger.info("AMD/ROCm: compiling the model")