From 8832fff972b2f2c4a653f6cc10d3c77013b8326a Mon Sep 17 00:00:00 2001 From: Nick Hill Date: Wed, 12 Nov 2025 19:06:03 -0800 Subject: [PATCH] [BugFix] Fix `mm_encoder_attn_backend` arg type checking (#28599) Signed-off-by: Nick Hill --- .buildkite/test-pipeline.yaml | 4 +++- vllm/config/multimodal.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.buildkite/test-pipeline.yaml b/.buildkite/test-pipeline.yaml index 36a867f1addb..be1b79ddc432 100644 --- a/.buildkite/test-pipeline.yaml +++ b/.buildkite/test-pipeline.yaml @@ -57,7 +57,7 @@ steps: - pytest -v -s -m 'not cpu_test' multimodal - pytest -v -s utils_ -- label: Async Engine, Inputs, Utils, Worker Test (CPU) # 4 mins +- label: Async Engine, Inputs, Utils, Worker, Config Test (CPU) # 4 mins timeout_in_minutes: 10 source_file_dependencies: - vllm/ @@ -66,6 +66,7 @@ steps: - tests/multimodal - tests/standalone_tests/lazy_imports.py - tests/transformers_utils + - tests/config no_gpu: true commands: - python3 standalone_tests/lazy_imports.py @@ -73,6 +74,7 @@ steps: - pytest -v -s test_outputs.py - pytest -v -s -m 'cpu_test' multimodal - pytest -v -s transformers_utils + - pytest -v -s config - label: Python-only Installation Test # 10min timeout_in_minutes: 20 diff --git a/vllm/config/multimodal.py b/vllm/config/multimodal.py index 9348c1b2af8c..9f62b35ed515 100644 --- a/vllm/config/multimodal.py +++ b/vllm/config/multimodal.py @@ -170,6 +170,9 @@ class MultiModalConfig: def _validate_mm_encoder_attn_backend( cls, value: str | AttentionBackendEnum | None ) -> AttentionBackendEnum | None: + # We need to import the real type here (deferred to avoid circular import). + from vllm.attention.backends.registry import AttentionBackendEnum + if value is None or isinstance(value, AttentionBackendEnum): return value