diff --git a/vllm/v1/worker/gpu/model_runner.py b/vllm/v1/worker/gpu/model_runner.py index 091138d9ab5..189cc705154 100644 --- a/vllm/v1/worker/gpu/model_runner.py +++ b/vllm/v1/worker/gpu/model_runner.py @@ -337,6 +337,17 @@ class GPUModelRunner(LoRAModelRunnerMixin): self.reset_encoder_cache() self.reset_mm_cache() + def update_config(self, *args, **kwargs) -> None: + # TODO(Wentao): Use full version instead of import when fully migrated to v2 + from vllm.v1.worker.gpu_model_runner import GPUModelRunner as GPUModelRunnerV1 + + GPUModelRunnerV1.update_config(self, *args, **kwargs) # type: ignore[arg-type] + + # v2 reads config via self.vllm_config (e.g. in load_model), so keep it + # in sync with the attributes the v1 helper just replaced. + self.vllm_config.model_config = self.model_config + self.vllm_config.load_config = self.load_config + @functools.cached_property def main_stream(self) -> torch.cuda.Stream: # Cache the default CUDA stream to avoid lookup overhead.