Skip to content

NVR with realtime local object detection for IP cameras

Fix embeddings failing to start

Nicolas Mowen3428baa3fac0
diff --git a/frigate/events/cleanup.py b/frigate/events/cleanup.py
index 12b00f620b..674833d2b5 100644
--- a/frigate/events/cleanup.py
+++ b/frigate/events/cleanup.py
@@ -27,11 +27,13 @@ class EventCleanup(threading.Thread):
self.name = "event_cleanup"
self.config = config
self.stop_event = stop_event
- self.embeddings = Embeddings()
self.camera_keys = list(self.config.cameras.keys())
self.removed_camera_labels: list[str] = None
self.camera_labels: dict[str, dict[str, any]] = {}
+ if self.config.semantic_search.enabled:
+ self.embeddings = Embeddings()
+
def get_removed_camera_labels(self) -> list[Event]:
"""Get a list of distinct labels for removed cameras."""
if self.removed_camera_labels is None: