From 48e4f6a38504bc236a28d06e7c2837594c64e46f Mon Sep 17 00:00:00 2001 From: amy-why-3459 Date: Thu, 20 Aug 2026 16:24:08 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix][MiniCPM-o][NPU]=20Skip=20Code2Wav=20dy?= =?UTF-8?q?namo=20unwrap=20when=20flow.encode=E2=80=A6=20(#6397)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: amy-why-3459 --- .../model_executor/models/minicpmo_4_5/batched_token2wav.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vllm_omni/model_executor/models/minicpmo_4_5/batched_token2wav.py b/vllm_omni/model_executor/models/minicpmo_4_5/batched_token2wav.py index 1553a5921..f8692f349 100644 --- a/vllm_omni/model_executor/models/minicpmo_4_5/batched_token2wav.py +++ b/vllm_omni/model_executor/models/minicpmo_4_5/batched_token2wav.py @@ -160,7 +160,9 @@ class BatchedToken2Wav(nn.Module): self._trt_stepper = trt_stepper self.flow = token2wav.flow self.hift = token2wav.hift - _undecorate_dynamo(self.flow.encoder, "forward_chunk") + encoder = getattr(self.flow, "encoder", None) + if encoder is not None: + _undecorate_dynamo(encoder, "forward_chunk") hift_parameter = next(self.hift.parameters(), None) if hift_parameter is not None and hift_parameter.device.type == "cuda": # Prime the CUDA state used by HiFT during backend construction.