Skip to content

Magcache support for Diffuser#993

Open
quic-amitraj wants to merge 3 commits into
quic:mainfrom
quic-amitraj:first_cache_and_magcache
Open

Magcache support for Diffuser#993
quic-amitraj wants to merge 3 commits into
quic:mainfrom
quic-amitraj:first_cache_and_magcache

Conversation

@quic-amitraj
Copy link
Copy Markdown
Contributor

@quic-amitraj quic-amitraj commented May 18, 2026

Summary

This PR adds MagCache support for WAN text-to-video in QEfficient Diffusers.

MagCache is a training-free, inference-time caching strategy that uses magnitude-aware dynamics to decide when cached denoising residuals can be reused, reducing expensive model calls while preserving generation quality.

In our WAN setup, we observe around ~30% inference-time reduction for 180p video generation.

Without cache 180p video-

180p_without_cache.mp4

With Cache 180p Video-

180p_with_magcache.mp4

Design Notes

  • No training required.
  • No ONNX/QPC signature change for MagCache path.
  • Default behavior remains unchanged when use_magcache=False.

Performance Note

  • WAN text-to-video at 180p shows ~30% reduction in inference time in our measurements.

References

@quic-amitraj quic-amitraj changed the title Magcache support for diffuser Magcache support for #Diffuser May 18, 2026
@quic-amitraj quic-amitraj changed the title Magcache support for #Diffuser Magcache support for Diffuser May 18, 2026
Signed-off-by: Amit Raj <amitraj@qti.qualcomm.com>
Signed-off-by: Amit Raj <amitraj@qti.qualcomm.com>
@quic-amitraj quic-amitraj force-pushed the first_cache_and_magcache branch from d12c5ee to 7041338 Compare May 18, 2026 09:28
@quic-amitraj quic-amitraj self-assigned this May 18, 2026
@quic-amitraj quic-amitraj added the Diffusers Use for PR related to diffusers in efficient-transformers. label May 18, 2026
Signed-off-by: Amit Raj <amitraj@qti.qualcomm.com>
@quic-amitraj quic-amitraj requested a review from vbaddi May 18, 2026 09:51
@quic-amitraj
Copy link
Copy Markdown
Contributor Author

Without cache 180p video-

180p_without_cache.mp4
image

With Cache 180p Video-

180p_with_magcache.mp4
image

@quic-amitraj quic-amitraj marked this pull request as ready for review May 20, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Diffusers Use for PR related to diffusers in efficient-transformers. performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant