[Feat] Support MagCache (#1287)

Signed-off-by: Lancer <maruixiang6688@gmail.com>
Co-authored-by: 汪志鹏 <wangzhipeng628@gmail.com>
Co-authored-by: Gao Han <hgaoaf@connect.ust.hk>
This commit is contained in:
authored and GitHub committed 2026-05-29 22:26:23 +08:00
1 parent eba5617c95
commit b690a10e3a
13 files changed
+1677 -11

No files matched your search

+5 -2
View File
@@ -507,13 +507,16 @@ class OmniServeCommand(CLISubcommand):
"--cache-backend",
type=str,
default="none",
help="Cache backend for diffusion models, options: 'tea_cache', 'cache_dit'",
help="Cache backend for diffusion models, options: 'tea_cache', 'cache_dit', 'mag_cache'",
)
omni_config_group.add_argument(
"--cache-config",
type=str,
default=None,
help="JSON string of cache configuration (e.g., '{\"rel_l1_thresh\": 0.2}').",
help="JSON string of cache configuration. "
"TeaCache: '{\"rel_l1_thresh\": 0.2}'. "
'MagCache: \'{"mag_threshold": 0.24, "mag_max_skip_steps": 5, "mag_retention_ratio": 0.1}\'. '
"Calibration mode: add '\"mag_calibrate\": true'",
)
omni_config_group.add_argument(
"--enable-cache-dit-summary",