[DEBUG]Add has_preprocess branch to _dummy_run for models with preprocess stage (#4189)

Signed-off-by: Wallbreazzz <110282866+Wallbreazzz@users.noreply.github.com>
This commit is contained in:
Wallbreazzz authored and GitHub committed 2026-06-18 07:56:19 +08:00
1 parent d744940b18
commit 65bc737fd4
2 files changed
+6 -4

No files matched your search

+2 -3
View File
@@ -10,8 +10,7 @@
# codec prefill length (Q * num_frames) exceeds the 32k default.
# * Stage 0 does not set enforce_eager — talker runs cudagraph by default.
# Stage 1 defaults to false so Code2Wav can use its inner cudagraph;
# set true to disable that path in eager mode. NPU platform flips stage 0 to true where
# cudagraph is not yet verified.
# set true to disable that path in eager mode.
async_chunk: true
connectors:
@@ -93,4 +92,4 @@ platforms:
npu:
stages:
- stage_id: 0
enforce_eager: true
enforce_eager: false
@@ -219,7 +219,10 @@ class OmniNPUModelRunner(OmniGPUModelRunner, NPUModelRunner):
):
# Make sure padding doesn't exceed max_num_tokens
assert num_tokens_padded <= self.max_num_tokens
if self.supports_mm_inputs and not self.model_config.is_encoder_decoder or self.enable_prompt_embeds:
if getattr(getattr(self, "model", None), "has_preprocess", False):
input_ids = self.input_ids.gpu[:num_tokens_padded]
inputs_embeds = self.inputs_embeds.gpu[:num_tokens_padded]
elif self.supports_mm_inputs and not self.model_config.is_encoder_decoder or self.enable_prompt_embeds:
input_ids = None
inputs_embeds = self.inputs_embeds.gpu[:num_tokens_padded]
else: