Skip to content

Commit cdaf7f4

Browse files
[MM][Bugfix] Minor fix for VL model verification (#4385)
### What this PR does / why we need it? To fix ops test, where `model_config` has been set to `None` and doesn't has `hf_config` attribute, we have added a check for `model_config` to guarantee it is not `None_Type`. cherry-pick from main: #4384. Signed-off-by: shen-shanshan <[email protected]>
1 parent 386a85e commit cdaf7f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm_ascend/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def _is_contain_expert(config: Any):
700700
def is_vl_model(vllm_config: VllmConfig):
701701
"""Checks if the model is a VL model by config"""
702702
global _IS_VL_MODEL
703-
if _IS_VL_MODEL is None:
703+
if _IS_VL_MODEL is None and vllm_config.model_config:
704704
model_configs = vllm_config.model_config.hf_config.to_dict()
705705
_IS_VL_MODEL = "VL" in model_configs["architectures"][0]
706706
return _IS_VL_MODEL

0 commit comments

Comments
 (0)