Compare commits

...

4 Commits

Author SHA1 Message Date
Sayak Paul d76b744ac3 Merge branch 'main' into cache-docs-fixes 2025-11-26 15:22:39 +05:30
Sayak Paul b26867b628 Merge branch 'main' into cache-docs-fixes 2025-11-20 10:06:19 +05:30
Sayak Paul e3f441648c Update docs/source/en/optimization/cache.md
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
2025-11-20 10:00:46 +05:30
sayakpaul c6cfc5ce1d polish caching docs. 2025-11-19 08:40:28 +05:30
3 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ Cache methods speedup diffusion transformers by storing and reusing intermediate
[[autodoc]] apply_faster_cache
### FirstBlockCacheConfig
## FirstBlockCacheConfig
[[autodoc]] FirstBlockCacheConfig
+4
View File
@@ -67,3 +67,7 @@ config = FasterCacheConfig(
)
pipeline.transformer.enable_cache(config)
```
## FirstBlockCache
[FirstBlock Cache](https://huggingface.co/docs/diffusers/main/en/api/cache#diffusers.FirstBlockCacheConfig) builds on the ideas of [TeaCache](https://huggingface.co/papers/2411.19108). It is much simpler to implement generically for a wide range of models and has been integrated first for experimental purposes.
+3 -1
View File
@@ -41,9 +41,11 @@ class CacheMixin:
Enable caching techniques on the model.
Args:
config (`Union[PyramidAttentionBroadcastConfig]`):
config (`Union[PyramidAttentionBroadcastConfig, FasterCacheConfig, FirstBlockCacheConfig]`):
The configuration for applying the caching technique. Currently supported caching techniques are:
- [`~hooks.PyramidAttentionBroadcastConfig`]
- [`~hooks.FasterCacheConfig`]
- [`~hooks.FirstBlockCacheConfig`]
Example: