From 7ab42cb5827116d6da7705a4eb72e9ee481cbce2 Mon Sep 17 00:00:00 2001 From: BUAADreamer <1428195643@qq.com> Date: Sat, 28 Sep 2024 01:07:38 +0800 Subject: [PATCH] modify some style Former-commit-id: 1b21793543f4a03252e81a86e06ec91fd2a51fa5 --- src/llamafactory/data/mm_plugin.py | 2 -- tests/data/test_mm_plugin.py | 1 - 2 files changed, 3 deletions(-) diff --git a/src/llamafactory/data/mm_plugin.py b/src/llamafactory/data/mm_plugin.py index fbcfd46a..bb008ae8 100644 --- a/src/llamafactory/data/mm_plugin.py +++ b/src/llamafactory/data/mm_plugin.py @@ -294,14 +294,12 @@ class LlavaNextPlugin(BasePlugin): if processor.vision_feature_select_strategy == "default": image_seqlen -= 1 num_image_tokens += 1 - print(image_seqlen) content = content.replace(self.image_token, "{{image}}" * image_seqlen, 1) message['content'] = content.replace("{{image}}", self.image_token) if len(images) != num_image_tokens: raise ValueError("The number of images does not match the number of {} tokens".format(IMAGE_PLACEHOLDER)) - print(messages) return messages @override diff --git a/tests/data/test_mm_plugin.py b/tests/data/test_mm_plugin.py index a48ad795..6cce2c4c 100644 --- a/tests/data/test_mm_plugin.py +++ b/tests/data/test_mm_plugin.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import copy import os from typing import TYPE_CHECKING, Any, Dict, List, Sequence, Tuple