You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@md5sum -c --quiet md5sum.saved || (printf "\nError: the version dependency table is outdated.\nPlease run 'make fixup' or 'make style' and commit the changes.\n\n"&&exit 1)
* Dreambooth training support for Stable Diffusion 1.x,2.x.
51
54
* LTX-Video text2vid, img2vid (inference).
55
+
* LTX-2 Video text2vid (inference).
52
56
* Wan2.1 text2vid (training and inference).
53
57
* Wan2.2 text2vid (inference).
54
58
@@ -73,6 +77,7 @@ MaxDiffusion supports
73
77
-[Inference](#inference)
74
78
-[Wan](#wan-models)
75
79
-[LTX-Video](#ltx-video)
80
+
-[LTX-2 Video](#ltx-2-video)
76
81
-[Flux](#flux)
77
82
-[Fused Attention for GPU](#fused-attention-for-gpu)
78
83
-[SDXL](#stable-diffusion-xl)
@@ -497,6 +502,33 @@ To generate images, run the following command:
497
502
498
503
Add conditioning image path as conditioning_media_paths in the form of ["IMAGE_PATH"] along with other generation parameters in the ltx_video.yml file. Then follow same instruction as above.
499
504
505
+
## LTX-2 Video
506
+
507
+
Although not required, attaching an external disk is recommended as weights take up a lot of disk space. [Follow these instructions if you would like to attach an external disk](https://cloud.google.com/tpu/docs/attach-durable-block-storage).
Although not required, attaching an external disk is recommended as weights take up a lot of disk space. [Follow these instructions if you would like to attach an external disk](https://cloud.google.com/tpu/docs/attach-durable-block-storage).
@@ -540,6 +572,31 @@ To generate images, run the following command:
540
572
* For Wan2.2 T2V, use `base_wan_27b.yml`.
541
573
* For Wan2.2 I2V, use `base_wan_i2v_27b.yml`.
542
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
+
584
+
To enable a caching mechanism, set the corresponding flag in your config YAML or pass it as a command-line override:
585
+
586
+
```bash
587
+
# Example: enable SenCache for Wan 2.2 T2V
588
+
python src/maxdiffusion/generate_wan.py \
589
+
src/maxdiffusion/configs/base_wan_27b.yml \
590
+
use_sen_cache=True \
591
+
...
592
+
593
+
# Example: enable CFG Cache for Wan 2.2 I2V
594
+
python src/maxdiffusion/generate_wan.py \
595
+
src/maxdiffusion/configs/base_wan_i2v_27b.yml \
596
+
use_cfg_cache=True \
597
+
...
598
+
```
599
+
543
600
## Flux
544
601
545
602
First make sure you have permissions to access the Flux repos in Huggingface.
0 commit comments