From 3f13f5d9660a4cd9ed1547c331397e92e4fcd439 Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Sun, 18 Oct 2026 15:54:20 -0700 Subject: [PATCH] [Fix] scheduler: Drop prefill embedding overrides in `prepare_for_decode` (#45041) --- python/sglang/srt/managers/schedule_batch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/managers/schedule_batch.py b/python/sglang/srt/managers/schedule_batch.py index 3e83f8e787..d429ca6e5e 100755 --- a/python/sglang/srt/managers/schedule_batch.py +++ b/python/sglang/srt/managers/schedule_batch.py @@ -3648,8 +3648,10 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin): self.mamba_track_seqlens_cpu = None self.mamba_prefill_track_mask_cpu = None # Decode embeds the last output token via embed_tokens; clear the stale - # prefill-time tensor so it doesn't leak into ForwardBatch. + # prefill-time tensors so they don't leak into ForwardBatch. self.input_embeds = None + self.replace_embeds = None + self.replace_positions = None self.mamba_cow_src_indices = None self.mamba_cow_dst_indices = None