From ba650af6f26b2433794f38797c3c51257be6b403 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 11 Sep 2025 16:39:34 -0600 Subject: [PATCH] Correctly cast to enum when loading plus config (#20031) --- frigate/detectors/detector_config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frigate/detectors/detector_config.py b/frigate/detectors/detector_config.py index d7883523d..d315f4cd5 100644 --- a/frigate/detectors/detector_config.py +++ b/frigate/detectors/detector_config.py @@ -154,12 +154,12 @@ class ModelConfig(BaseModel): self.width = model_info["width"] self.height = model_info["height"] - self.input_tensor = model_info["inputShape"] - self.input_pixel_format = model_info["pixelFormat"] - self.model_type = model_info["type"] + self.input_tensor = InputTensorEnum(model_info["inputShape"]) + self.input_pixel_format = PixelFormatEnum(model_info["pixelFormat"]) + self.model_type = ModelTypeEnum(model_info["type"]) if model_info.get("inputDataType"): - self.input_dtype = model_info["inputDataType"] + self.input_dtype = InputDTypeEnum(model_info["inputDataType"]) # generate list of attribute labels self.attributes_map = {