Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/maxdiffusion/configs/base_wan_1_3b.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without mag_ratios_base in the YAML, setting use_magcache=True passes mag_ratios_base=None from WanPipeline2_1 into init_magcache (wan_pipeline.py), which raises TypeError: len() of unsized object (and cannot be overridden from the CLI because pyconfig requires keys to exist in the YAML).

Here is the upstream calibrated T2V-1.3B curve from Zehong-Ma/MagCache (MagCache4Wan2.1/magcache_generate.py, matching how base_wan_14b.yml was seeded; init_magcache interpolates the 50-step curve to num_inference_steps: 30 automatically):

Suggested change
retention_ratio: 0.2
retention_ratio: 0.2
mag_ratios_base: [1.0, 1.0, 1.0124, 1.02213, 1.00166, 1.0041, 0.99791, 1.00061, 0.99682, 0.99762, 0.99634, 0.99685, 0.99567, 0.99586, 0.99416, 0.99422, 0.99578, 0.99575, 0.9957, 0.99563, 0.99511, 0.99506, 0.99535, 0.99531, 0.99552, 0.99549, 0.99541, 0.99539, 0.9954, 0.99536, 0.99489, 0.99485, 0.99518, 0.99514, 0.99484, 0.99478, 0.99481, 0.99479, 0.99415, 0.99413, 0.99419, 0.99416, 0.99396, 0.99393, 0.99388, 0.99386, 0.99349, 0.99349, 0.99309, 0.99304, 0.9927, 0.9927, 0.99228, 0.99226, 0.99171, 0.9917, 0.99137, 0.99135, 0.99068, 0.99063, 0.99005, 0.99003, 0.98944, 0.98942, 0.98849, 0.98849, 0.98758, 0.98757, 0.98644, 0.98643, 0.98504, 0.98503, 0.9836, 0.98359, 0.98202, 0.98201, 0.97977, 0.97978, 0.97717, 0.97718, 0.9741, 0.97411, 0.97003, 0.97002, 0.96538, 0.96541, 0.9593, 0.95933, 0.95086, 0.95089, 0.94013, 0.94019, 0.92402, 0.92414, 0.90241, 0.9026, 0.86821, 0.86868, 0.81838, 0.81939]

# 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.
Expand Down