[Feat] Add prefetch for Mooncake cross-stage paged KV transfer in HunyuanImage3 (#7637)

Signed-off-by: Acerak01-fy <wfy2003324@163.com>
This commit is contained in:
Wang fuyin authored and GitHub committed 2026-09-22 02:21:42 -07:00
1 parent f7e28348ad
commit 9ebef4b1d3
11 files changed
+909 -23

No files matched your search

@@ -801,6 +801,9 @@ class DiffusionWorker:
Args:
level: Sleep level. Level 1 offloads weights, level 2 also saves buffers.
"""
progress = getattr(getattr(self, "model_runner", None), "_kv_receive_progress", None)
if progress is not None and progress.submitted:
raise RuntimeError("Cannot sleep with live native KV prefetch reservations; finish requests first")
# The config validator rejects sleep for the native paged path. Keep
# this worker-side guard precise as well: test doubles and legacy
# configs may expose arbitrary attributes through Mock/getattr.