[Community Contribution]🚀MagCache Support (1.5-2x speedup) #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We sincerely appreciate your excellent work on Wan2.2! 🙌
In this PR, we integrate our MagCache into the Wan2.2 framework. MagCache is a training-free caching strategy to accelerate diffusion models.
🌟 Highlights
1.5-2× speedup on a single NVIDIA L20 GPU compared to the baseline.
Performance is achieved with negligible quality degradation.
MagCache is an enhanced alternative to TeaCache, providing better runtime efficiency while maintaining compatibility and minimal code changes.
The following are the comparisons conducted on a single L20 GPU. The left is the original video, while the right is the video generated with our MagCache.
TI2V_5B_t2v_magcache.mp4
TI2V_5B_i2v_magcache.mp4
T2V_A14B_magcache.mp4
I2V_A14B_magcache.mp4