[Refactor][Model Runner V2][Multimodal] Move the encoder-only path out of the shared runner (#53176)

Signed-off-by: Tianyu Guo <guoty@inferact.ai>
This commit is contained in:
Tianyu Guo
2026-08-22 05:11:44 +00:00
committed by GitHub
parent e9d1398d9e
commit 7ca49fbe4b
7 changed files with 169 additions and 42 deletions
+8 -3
View File
@@ -423,9 +423,14 @@ class Worker(WorkerBase):
# Construct the model runner
if self.use_v2_model_runner:
from vllm.v1.worker.gpu.model_runner import (
GPUModelRunner as GPUModelRunnerV2,
)
if self.vllm_config.is_mm_encoder_only:
from vllm.v1.worker.mm_encoder_model_runner import (
MMEncoderModelRunner as GPUModelRunnerV2,
)
else:
from vllm.v1.worker.gpu.model_runner import ( # type: ignore[assignment]
GPUModelRunner as GPUModelRunnerV2,
)
# HACK(woosuk): This is a temporary fix to avoid type errors.
self.model_runner: GPUModelRunner = GPUModelRunnerV2( # type: ignore