[diffusion] feat: support lightweight e2e warmup for benchmarking (#16213)

This commit is contained in:
Mick
2026-01-02 20:10:27 +08:00
committed by GitHub
parent 698629d1f2
commit 5062537b67
15 changed files with 205 additions and 135 deletions
@@ -206,6 +206,7 @@ class ServerArgs:
# Compilation
enable_torch_compile: bool = False
enable_warmup: bool = False
disable_autocast: bool | None = None
@@ -456,6 +457,14 @@ class ServerArgs:
help="Use torch.compile to speed up DiT inference."
+ "However, will likely cause precision drifts. See (https://github.com/pytorch/pytorch/issues/145213)",
)
parser.add_argument(
"--enable-warmup",
action=StoreBoolean,
default=ServerArgs.enable_warmup,
help="Perform a 1-step end-to-end warmup request before the actual request. "
"Recommended to enable when benchmarking to ensure fair comparison and best performance."
"When enabled, look for the line ending with `with warmup excluded` for actual processing time.",
)
parser.add_argument(
"--dit-cpu-offload",
action=StoreBoolean,