From 37565ebb311aeba1b90acc09752bbaa8c75b6d1f Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 2 Oct 2025 08:50:12 -0600 Subject: [PATCH] Increase number of images --- frigate/data_processing/post/review_descriptions.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/frigate/data_processing/post/review_descriptions.py b/frigate/data_processing/post/review_descriptions.py index 27c3a2612..3f32fd8b2 100644 --- a/frigate/data_processing/post/review_descriptions.py +++ b/frigate/data_processing/post/review_descriptions.py @@ -45,14 +45,16 @@ class ReviewDescriptionProcessor(PostProcessorApi): def calculate_frame_count(self) -> int: """Calculate optimal number of frames based on context size.""" + # With our preview images (height of 180px) each image should be ~100 tokens per image + # We want to be conservative to not have too long of query times with too many images context_size = self.genai_client.get_context_size() if context_size > 10000: - return 18 + return 20 elif context_size > 6000: - return 14 + return 16 elif context_size > 4000: - return 10 + return 12 else: return 8