|
17 | 17 | [](https://github.com/AI-Hypercomputer/maxdiffusion/actions/workflows/UnitTests.yml) |
18 | 18 |
|
19 | 19 | # What's new? |
| 20 | +- **`2026/03/31`**: Wan2.2 SenCache inference is now supported for T2V and I2V (up to 1.4x speedup) |
20 | 21 | - **`2026/03/25`**: Wan2.1 and Wan2.2 Magcache inference is now supported |
21 | 22 | - **`2026/03/25`**: LTX-2 Video Inference is now supported |
22 | 23 | - **`2026/01/29`**: Wan LoRA for inference is now supported |
@@ -571,6 +572,32 @@ To generate images, run the following command: |
571 | 572 | * For Wan2.2 T2V, use `base_wan_27b.yml`. |
572 | 573 | * For Wan2.2 I2V, use `base_wan_i2v_27b.yml`. |
573 | 574 |
|
| 575 | + ### Caching Mechanisms |
| 576 | + |
| 577 | + Wan 2.x pipelines support several caching strategies to accelerate inference by skipping redundant transformer forward passes. These are **mutually exclusive** — enable only one at a time. |
| 578 | + |
| 579 | + | Cache Type | Config Flag | Supported Pipelines | Speedup | Description | |
| 580 | + | --- | --- | --- | --- | --- | |
| 581 | + | **CFG Cache** | `use_cfg_cache: True` | Wan 2.1 T2V, Wan 2.2 T2V/I2V | ~1.2x | FasterCache-style: caches the unconditional branch and applies FFT frequency-domain compensation on skipped steps. | |
| 582 | + | **SenCache** | `use_sen_cache: True` | Wan 2.2 T2V/I2V | ~1.4x | Sensitivity-Aware Caching ([arXiv:2602.24208](https://arxiv.org/abs/2602.24208)): predicts output change via first-order sensitivity S = α_x·‖Δx‖ + α_t·\|Δt\|. Skips the full CFG forward pass when predicted change is below tolerance ε. | |
| 583 | + | **MagCache** | `use_magcache: True` | Wan 2.1 T2V | ~1.3x | Magnitude-based caching with configurable threshold and retention ratio. | |
| 584 | + |
| 585 | + To enable a caching mechanism, set the corresponding flag in your config YAML or pass it as a command-line override: |
| 586 | + |
| 587 | + ```bash |
| 588 | + # Example: enable SenCache for Wan 2.2 T2V |
| 589 | + python src/maxdiffusion/generate_wan.py \ |
| 590 | + src/maxdiffusion/configs/base_wan_27b.yml \ |
| 591 | + use_sen_cache=True \ |
| 592 | + ... |
| 593 | + |
| 594 | + # Example: enable CFG Cache for Wan 2.2 I2V |
| 595 | + python src/maxdiffusion/generate_wan.py \ |
| 596 | + src/maxdiffusion/configs/base_wan_i2v_27b.yml \ |
| 597 | + use_cfg_cache=True \ |
| 598 | + ... |
| 599 | + ``` |
| 600 | + |
574 | 601 | ## Flux |
575 | 602 |
|
576 | 603 | First make sure you have permissions to access the Flux repos in Huggingface. |
|
0 commit comments