[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user