Skip to content

Commit 2b819bb

Browse files
authored
[Bugfix] Add the check for a null VllmConfig (#4749)
### What this PR does / why we need it? In vllm-omni, we create the empty `VllmConfig`, which raised the null error in [`vllm-ascend/vllm_ascend/utils.py`](https://github.com/vllm-project/vllm-ascend/blob/a7f91079b8576a846f671c9e6923805e74e35c87/vllm_ascend/utils.py#L833). More details are [here](vllm-project/vllm-omni#208). ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.12.0 - vLLM main: vllm-project/vllm@ad32e3e Signed-off-by: gcanlin <canlinguosdu@gmail.com>
1 parent 7e70da9 commit 2b819bb

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
@@ -810,7 +810,7 @@ def _is_contain_expert(config: Any):
810810
def is_vl_model(vllm_config: VllmConfig):
811811
"""Checks if the model is a VL model by config"""
812812
global _IS_VL_MODEL
813-
if _IS_VL_MODEL is None and vllm_config.model_config:
813+
if _IS_VL_MODEL is None and vllm_config and vllm_config.model_config:
814814
model_configs = vllm_config.model_config.hf_config.to_dict()
815815
_IS_VL_MODEL = "VL" in model_configs["architectures"][0]
816816
return _IS_VL_MODEL

0 commit comments

Comments
 (0)