diff --git a/python/sglang/srt/models/deepseek_v4.py b/python/sglang/srt/models/deepseek_v4.py index 0c45035b6..292aa5bfe 100644 --- a/python/sglang/srt/models/deepseek_v4.py +++ b/python/sglang/srt/models/deepseek_v4.py @@ -1262,7 +1262,10 @@ class MQALayer(MqaAttentionBase): envs.SGLANG_OPT_USE_MULTI_STREAM_OVERLAP.get() and self.alt_streams is not None and get_is_capture_mode() - and x.shape[0] <= self._multi_stream_bs_limit + and ( + is_in_breakable_cuda_graph() + or x.shape[0] <= self._multi_stream_bs_limit + ) and not (self.dsa_enable_prefill_cp and dsa_use_prefill_cp(forward_batch)) and not (_is_hip and self.compressor is None) )