From eac29745da04122710c94a9c926dc8216c6c8329 Mon Sep 17 00:00:00 2001 From: DJY <954128653@qq.com> Date: Wed, 1 Apr 2026 15:11:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20eval=5Fvlm.py=20?= =?UTF-8?q?=E4=B8=AD=20f-string=20=E5=BC=95=E5=8F=B7=E5=B5=8C=E5=A5=97?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E8=AF=AD=E6=B3=95=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修正第 66 行 print 语句中单双引号嵌套冲突的问题。 - 解决在部分 Python 版本下因反斜杠处理导致的 SyntaxError。 --- eval_vlm.py | 3 ++- model/siglip2-base-p16-ve | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 160000 model/siglip2-base-p16-ve diff --git a/eval_vlm.py b/eval_vlm.py index cec1512..b610d37 100644 --- a/eval_vlm.py +++ b/eval_vlm.py @@ -63,7 +63,8 @@ def main(): inputs = tokenizer(inputs_text, return_tensors="pt", truncation=True).to(args.device) print(f'[图像]: {image_file}') - print(f'💬: {prompt.replace('\n', '\\n')}') + display_prompt = prompt.replace('\n', '\\n') + print(f'💬: {display_prompt}') print('🤖: ', end='') st = time.time() generated_ids = model.generate( diff --git a/model/siglip2-base-p16-ve b/model/siglip2-base-p16-ve new file mode 160000 index 0000000..9327b4f --- /dev/null +++ b/model/siglip2-base-p16-ve @@ -0,0 +1 @@ +Subproject commit 9327b4fe10ef8352fa3a32eddc8d3c8bff984286