Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/en/api/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Cache methods speedup diffusion transformers by storing and reusing intermediate

[[autodoc]] apply_faster_cache

### FirstBlockCacheConfig
## FirstBlockCacheConfig

[[autodoc]] FirstBlockCacheConfig

Expand Down
6 changes: 5 additions & 1 deletion docs/source/en/optimization/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ config = FasterCacheConfig(
tensor_format="BFCHW",
)
pipeline.transformer.enable_cache(config)
```
```

## FirstBlockCache

[First Block 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.
4 changes: 3 additions & 1 deletion src/diffusers/models/cache_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ def enable_cache(self, config) -> None:
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:

Expand Down
Loading