From 73601980c232a4558783d0333f1260ef71ccf843 Mon Sep 17 00:00:00 2001 From: sayakpaul Date: Sat, 10 Jan 2026 09:09:44 +0530 Subject: [PATCH] up --- docs/source/en/optimization/cache.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/en/optimization/cache.md b/docs/source/en/optimization/cache.md index b1dc8f7bb9..20bbfc02c7 100644 --- a/docs/source/en/optimization/cache.md +++ b/docs/source/en/optimization/cache.md @@ -72,7 +72,7 @@ pipeline.transformer.enable_cache(config) [FirstBlock Cache](https://huggingface.co/docs/diffusers/main/en/api/cache#diffusers.FirstBlockCacheConfig) checks how much the early layers of the denoiser changes from one timestep to the next. If the change is small, the model skips the expensive later layers and reuses the previous output. -\```py +```py import torch from diffusers import DiffusionPipeline from diffusers.hooks import apply_first_block_cache, FirstBlockCacheConfig @@ -81,4 +81,4 @@ pipeline = DiffusionPipeline.from_pretrained( "Qwen/Qwen-Image", torch_dtype=torch.bfloat16 ) apply_first_block_cache(pipeline.transformer, FirstBlockCacheConfig(threshold=0.2)) -\``` \ No newline at end of file +```