From 2b819bb35b64690f032dc1e77d12b169e22a4eb5 Mon Sep 17 00:00:00 2001 From: Canlin Guo Date: Tue, 9 Dec 2025 09:21:17 +0800 Subject: [PATCH] [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](https://github.com/vllm-project/vllm-omni/issues/208). ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.12.0 - vLLM main: https://github.com/vllm-project/vllm/commit/ad32e3e19ccf0526cb6744a5fed09a138a5fb2f9 Signed-off-by: gcanlin --- vllm_ascend/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm_ascend/utils.py b/vllm_ascend/utils.py index 00014c80..7e207c7d 100644 --- a/vllm_ascend/utils.py +++ b/vllm_ascend/utils.py @@ -810,7 +810,7 @@ def _is_contain_expert(config: Any): def is_vl_model(vllm_config: VllmConfig): """Checks if the model is a VL model by config""" global _IS_VL_MODEL - if _IS_VL_MODEL is None and vllm_config.model_config: + if _IS_VL_MODEL is None and vllm_config and vllm_config.model_config: model_configs = vllm_config.model_config.hf_config.to_dict() _IS_VL_MODEL = "VL" in model_configs["architectures"][0] return _IS_VL_MODEL