diff --git a/python/sglang/srt/managers/scheduler.py b/python/sglang/srt/managers/scheduler.py index 5493c0aa4..1ea27ba24 100644 --- a/python/sglang/srt/managers/scheduler.py +++ b/python/sglang/srt/managers/scheduler.py @@ -3013,6 +3013,12 @@ class Scheduler( if self.disaggregation_mode == DisaggregationMode.DECODE: idle &= len(self.disagg_decode_prealloc_queue.queue) == 0 idle &= len(self.disagg_decode_transfer_queue.queue) == 0 + if self.decode_offload_manager is not None: + idle &= len(self.decode_offload_manager.ongoing_offload) == 0 + + # HiSparse: staging requests transitioning prefill -> decode + if self.enable_hisparse: + idle &= not self.hisparse_coordinator.has_ongoing_staging() # HiCache: in-flight async ops (GPU↔Host↔L3) must drain before # destructive operations like attach/detach/flush_cache.