Skip to content

Commit 099aad6

Browse files
cleanup: remove duplicate model dir check in convert_model (handled by cmd_convert)
1 parent 31ab032 commit 099aad6

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

ov_cli/convert.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,6 @@ def _infer_task(model_path):
136136
def convert_model(model_path, output_path, weight_format,
137137
ratio=1.0, group_size=128):
138138
"""用 optimum-cli 导出模型。"""
139-
# 检查模型目录
140-
if not os.path.isdir(model_path):
141-
print(f" {TR('错误: 模型目录不存在', 'Error: model directory not found')}")
142-
print(f" {model_path}")
143-
print(f" {TR('请检查 --model 参数', 'Please check the --model argument')}")
144-
sys.exit(1)
145-
146139
# 检测模型类型并确保 transformers 版本
147140
model_type = _detect_model_type(model_path)
148141
needs_restore = _ensure_transformers(model_type)

0 commit comments

Comments
 (0)