From 290da87075af179a4f077ca3a6df6feee4644caa Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 8 May 2025 17:39:50 -0600 Subject: [PATCH] Ensure that cache dir exists for Frigate+ --- frigate/detectors/detector_config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frigate/detectors/detector_config.py b/frigate/detectors/detector_config.py index e719e1062..b7cb868e1 100644 --- a/frigate/detectors/detector_config.py +++ b/frigate/detectors/detector_config.py @@ -126,6 +126,10 @@ class ModelConfig(BaseModel): if not self.path or not self.path.startswith("plus://"): return + # ensure that model cache dir exists + if not os.path.exists(MODEL_CACHE_DIR): + os.makedirs(MODEL_CACHE_DIR) + model_id = self.path[7:] self.path = os.path.join(MODEL_CACHE_DIR, model_id) model_info_path = f"{self.path}.json"