mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-24 07:44:30 +03:00
Increase number of images
This commit is contained in:
parent
05a4605e76
commit
37565ebb31
@ -45,14 +45,16 @@ class ReviewDescriptionProcessor(PostProcessorApi):
|
|||||||
|
|
||||||
def calculate_frame_count(self) -> int:
|
def calculate_frame_count(self) -> int:
|
||||||
"""Calculate optimal number of frames based on context size."""
|
"""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()
|
context_size = self.genai_client.get_context_size()
|
||||||
|
|
||||||
if context_size > 10000:
|
if context_size > 10000:
|
||||||
return 18
|
return 20
|
||||||
elif context_size > 6000:
|
elif context_size > 6000:
|
||||||
return 14
|
return 16
|
||||||
elif context_size > 4000:
|
elif context_size > 4000:
|
||||||
return 10
|
return 12
|
||||||
else:
|
else:
|
||||||
return 8
|
return 8
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user