From f203a9d78e0a5eb40f08c9bdff930a76ee60858b 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: 8b4f408da110d74285bae20bbd969013a979964b --- 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 = []