Skip to content

Commit

Permalink
handle non-RGB images
Browse files Browse the repository at this point in the history
  • Loading branch information
vikhyat committed Dec 5, 2024
1 parent f3304d1 commit 8a622f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions clients/python/moondream/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def create_patches(
resolution. Returns the patches as a numpy array, and the selected patching
template as a tuple of (rows, cols).
"""
image = image.convert("RGB")

# Start off with the global patch.
patches = [im_resize(image, (image_patch_size, image_patch_size))]

Expand Down
2 changes: 1 addition & 1 deletion clients/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "moondream"
version = "0.0.4"
version = "0.0.5"
description = "Python client library for moondream"
authors = ["vik <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 8a622f0

Please sign in to comment.