From 73654910fe41726682c0f820bf2091485ed1345c Mon Sep 17 00:00:00 2001 From: Robert Haase Date: Fri, 21 Mar 2025 13:58:46 +0100 Subject: [PATCH] make max_points configurable --- clients/python/moondream/onnx_vl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/python/moondream/onnx_vl.py b/clients/python/moondream/onnx_vl.py index d591d7f8..2240064a 100644 --- a/clients/python/moondream/onnx_vl.py +++ b/clients/python/moondream/onnx_vl.py @@ -374,6 +374,7 @@ def point( self, image: Union[Image.Image, EncodedImage], object: str, + max_points: int = 50 ) -> PointOutput: if not ( hasattr(self, "coord_decoder") @@ -395,7 +396,7 @@ def point( points = [] pos = encoded_image.pos - max_points = 50 + while len(points) < max_points: logits, hidden = run_decoder(self.text_decoder, hidden, kv_cache, pos)