Skip to content

Commit

Permalink
fix confusing image width&height
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuan Ye committed Dec 30, 2024
1 parent e42058a commit f1d341a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlmeval/api/siliconflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def resize_image(image: Image.Image, max_height: int, max_width: int) -> Image.I
def encode_image(path: str, max_height: int = 1024, max_width: int = 1024) -> str:
image = Image.open(path).convert("RGB")
image = resize_image(image, max_height, max_width)
height, width = image.size
width, height = image.size
if min(height, width) < 50:
scale = 50 / min(width, height)
image = image.resize((int(width * scale), int(height * scale)))
Expand Down

0 comments on commit f1d341a

Please sign in to comment.