mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
Compare commits
No commits in common. "735d400bebf44e006f36fd0d733a32dcf9361483" and "67b40d3e0488038b244fed1e8e818636800abb45" have entirely different histories.
735d400beb
...
67b40d3e04
@ -86,11 +86,7 @@ class ObjectDescriptionProcessor(PostProcessorApi):
|
|||||||
and data["id"] not in self.early_request_sent
|
and data["id"] not in self.early_request_sent
|
||||||
):
|
):
|
||||||
if data["has_clip"] and data["has_snapshot"]:
|
if data["has_clip"] and data["has_snapshot"]:
|
||||||
try:
|
event: Event = Event.get(Event.id == data["id"])
|
||||||
event: Event = Event.get(Event.id == data["id"])
|
|
||||||
except DoesNotExist:
|
|
||||||
logger.error(f"Event {data['id']} not found")
|
|
||||||
return
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
not camera_config.objects.genai.objects
|
not camera_config.objects.genai.objects
|
||||||
|
|||||||
@ -92,7 +92,7 @@ class ReviewDescriptionProcessor(PostProcessorApi):
|
|||||||
|
|
||||||
pixels_per_image = width * height
|
pixels_per_image = width * height
|
||||||
tokens_per_image = pixels_per_image / 1250
|
tokens_per_image = pixels_per_image / 1250
|
||||||
prompt_tokens = 3800
|
prompt_tokens = 3500
|
||||||
response_tokens = 300
|
response_tokens = 300
|
||||||
available_tokens = context_size - prompt_tokens - response_tokens
|
available_tokens = context_size - prompt_tokens - response_tokens
|
||||||
max_frames = int(available_tokens / tokens_per_image)
|
max_frames = int(available_tokens / tokens_per_image)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user