From e5409529d34facc0f758440905a3be2b357a4a1e Mon Sep 17 00:00:00 2001 From: CMeteor Date: Tue, 31 Dec 2024 11:50:27 +0800 Subject: [PATCH] [Fix] Fix confusing image width&height (#704) Co-authored-by: Yuan Ye --- vlmeval/api/siliconflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlmeval/api/siliconflow.py b/vlmeval/api/siliconflow.py index 6fea69e2..eeba793f 100644 --- a/vlmeval/api/siliconflow.py +++ b/vlmeval/api/siliconflow.py @@ -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)))