moondream icon indicating copy to clipboard operation
moondream copied to clipboard

Should "and" be used here if height <= crop_size or width <= crop_size: return (1, 1)?

Open dyou-dev opened this issue 10 months ago • 1 comments

https://github.com/vikhyat/moondream/blob/f102859c0be76997bbd43e6010dcf8d5583f4b46/moondream/torch/image_crops.py#L15 Should "and" be used here instead of "or"?
if height <= crop_size and width <= crop_size: return (1, 1)

dyou-dev avatar Feb 19 '25 07:02 dyou-dev

With the original input 644x378, expected to get tiling 2x1, but here got 1x1, or 4x2 after using "and".

dyou-dev avatar Feb 19 '25 07:02 dyou-dev