From 540dc850558a62742e1bce591ea732b6f1898389 Mon Sep 17 00:00:00 2001 From: Deepolar Date: Mon, 23 Nov 2026 23:50:17 -0500 Subject: [PATCH] fix(wan): add the MagCache keys to the Wan 2.1 1.3B config generate_wan.py passes use_magcache, magcache_thresh, magcache_K and retention_ratio to the Wan 2.1 T2V pipeline on every run, but base_wan_1_3b.yml never got these keys when MagCache support landed (aba5f6a6), so generate_wan.py with this config fails with "Requested key use_magcache, not in config". The keys can't be passed on the command line either, since only keys in the yml can be overridden. Add them with the base_wan_14b.yml values, MagCache off. --- src/maxdiffusion/configs/base_wan_1_3b.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/maxdiffusion/configs/base_wan_1_3b.yml b/src/maxdiffusion/configs/base_wan_1_3b.yml index 97c1317c7..70ae18db6 100644 --- a/src/maxdiffusion/configs/base_wan_1_3b.yml +++ b/src/maxdiffusion/configs/base_wan_1_3b.yml @@ -420,6 +420,11 @@ flow_shift: 3.0 # Diffusion CFG cache (FasterCache-style, WAN 2.1 T2V only) use_cfg_cache: False use_kv_cache: False +# MagCache (WAN 2.1 T2V); generate_wan.py reads these keys on every T2V run. +use_magcache: False +magcache_thresh: 0.12 +magcache_K: 2 +retention_ratio: 0.2 # WAN-VACE training: compute the VACE hints from zero latents at timestep 999, the first inference timestep, # instead of from the noisy latents. This fine-tunes the model for use_vace_cache=True in the VACE pipeline, which # computes the hints once and reuses them at every denoising step.