[Feature] Support DiT Layerwise (Blockwise) CPU Offloading (#858)

Signed-off-by: yuanheng <jonathan.zhaoyh@gmail.com>
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-01-30 17:35:09 +08:00
1 parent be580d5c24
commit 2923d5a91e
14 files changed
+613 -41

No files matched your search

+11
View File
@@ -199,6 +199,17 @@ class OmniServeCommand(CLISubcommand):
action="store_true",
help="Enable CPU offloading for diffusion models.",
)
serve_parser.add_argument(
"--enable-layerwise-offload",
action="store_true",
help="Enable layerwise (blockwise) offloading on DiT modules.",
)
serve_parser.add_argument(
"--layerwise-num-gpu-layers",
type=int,
default=1,
help="Number of layers (blocks) to keep on GPU during generation.",
)
# Video model parameters (e.g., Wan2.2) - engine-level
omni_config_group.add_argument(