From 0ec2da08de2ea413f536e70009fc8351b6962cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=BF=97=E9=B9=8F?= Date: Sat, 10 Jan 2026 20:36:37 +0800 Subject: [PATCH] [BugFix] Fix assuming all stage model have talker (#730) Signed-off-by: princepride --- vllm_omni/worker/gpu_model_runner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vllm_omni/worker/gpu_model_runner.py b/vllm_omni/worker/gpu_model_runner.py index 3ceed5bde..69729d954 100644 --- a/vllm_omni/worker/gpu_model_runner.py +++ b/vllm_omni/worker/gpu_model_runner.py @@ -563,7 +563,11 @@ class OmniGPUModelRunner(GPUModelRunner): ubatch_slices=ubatch_slices, ), ): - if self.model.talker is not None and hasattr(self.model, "talker_mtp") and num_tokens_padded == 1: + if ( + getattr(self.model, "talker", None) is not None + and hasattr(self.model, "talker_mtp") + and num_tokens_padded == 1 + ): outputs = self.talker_mtp( self.talker_mtp_input_ids.gpu[:num_tokens_padded], self.talker_mtp_inputs_embeds.gpu[:num_tokens_padded],