Skip to content

Commit 3cc1215

Browse files
committed
fix "minicpmv_projector" default path
1 parent 06bf4a1 commit 3cc1215

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/mtmd/legacy-models/minicpmv-convert-image-encoder-to-gguf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,14 +517,14 @@ def bytes_to_unicode():
517517
# output in the same directory as the model if output_dir is None
518518
dir_model = args.model_dir
519519

520-
# 如果没有指定 minicpmv_projector,但默认路径存在,则使用默认路径
520+
# If minicpmv_projector is not specified but the default path exists, use the default path
521521
if args.minicpmv_projector is None:
522522
default_projector_path = os.path.join(dir_model, "minicpmv.projector")
523-
if os.path.exists(default_projector_path):
523+
if os.path.isfile(default_projector_path):
524524
args.minicpmv_projector = default_projector_path
525525
print(f"Found default projector file: {default_projector_path}")
526526

527-
# 如果没有指定 output_dir,使用 model_dir 作为默认值
527+
# If output_dir is not specified, use model_dir as the default value
528528
if args.output_dir is None:
529529
args.output_dir = dir_model
530530

0 commit comments

Comments
 (0)