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