Skip to content

Commit

Permalink
[Fix] Fix confusing image width&height (#704)
Browse files Browse the repository at this point in the history
Co-authored-by: Yuan Ye <[email protected]>
  • Loading branch information
CMeteor and Yuan Ye authored Dec 31, 2024
1 parent e42058a commit ea28715
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 ea28715

Please sign in to comment.