From f13e9749300f3944d4b2d31abe925e37bf21a3d5 Mon Sep 17 00:00:00 2001 From: hiyouga <467089858@qq.com> Date: Mon, 2 Sep 2024 01:33:22 +0800 Subject: [PATCH] tiny fix Former-commit-id: 3a6f19f017539a2be31e348845a8ed8712275dcb --- src/llamafactory/data/mm_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llamafactory/data/mm_plugin.py b/src/llamafactory/data/mm_plugin.py index 47682732..c0ac8e42 100644 --- a/src/llamafactory/data/mm_plugin.py +++ b/src/llamafactory/data/mm_plugin.py @@ -208,7 +208,7 @@ class Qwen2vlPlugin(BasePlugin): ) -> List[Dict[str, str]]: image_processor: "BaseImageProcessor" = getattr(processor, "image_processor") merge_length: int = getattr(image_processor, "merge_size") ** 2 - if len(images) > 0: + if len(images) != 0: image_grid_thw = _get_mm_inputs(images, processor)["image_grid_thw"] else: image_grid_thw = []