import{s as wt,o as kt,n as Ie}from"../chunks/scheduler.8c3d61f6.js";import{S as Ct,i as $t,g as p,s as o,r as u,A as Mt,h as d,f as n,c as i,j as x,u as g,x as k,k as J,y as r,a as c,v as _,d as b,t as y,w}from"../chunks/index.da70eac4.js";import{D as N}from"../chunks/Docstring.c021b19a.js";import{C as Re}from"../chunks/CodeBlock.a9c4becf.js";import{E as Ge}from"../chunks/ExampleCodeBlock.56b4589c.js";import{H as ke,E as Tt}from"../chunks/getInferenceSnippets.725ed3d4.js";function vt(B){let s,$="Example:",f,l,h;return l=new Re({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlkZW9YUGlwZWxpbmUlMkMlMjBQeXJhbWlkQXR0ZW50aW9uQnJvYWRjYXN0Q29uZmlnJTBBJTBBcGlwZSUyMCUzRCUyMENvZ1ZpZGVvWFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJUSFVETSUyRkNvZ1ZpZGVvWC01YiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQWNvbmZpZyUyMCUzRCUyMFB5cmFtaWRBdHRlbnRpb25Ccm9hZGNhc3RDb25maWcoJTBBJTIwJTIwJTIwJTIwc3BhdGlhbF9hdHRlbnRpb25fYmxvY2tfc2tpcF9yYW5nZSUzRDIlMkMlMEElMjAlMjAlMjAlMjBzcGF0aWFsX2F0dGVudGlvbl90aW1lc3RlcF9za2lwX3JhbmdlJTNEKDEwMCUyQyUyMDgwMCklMkMlMEElMjAlMjAlMjAlMjBjdXJyZW50X3RpbWVzdGVwX2NhbGxiYWNrJTNEbGFtYmRhJTNBJTIwcGlwZS5jdXJyZW50X3RpbWVzdGVwJTJDJTBBKSUwQXBpcGUudHJhbnNmb3JtZXIuZW5hYmxlX2NhY2hlKGNvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXPipeline, PyramidAttentionBroadcastConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = CogVideoXPipeline.from_pretrained(<span class="hljs-string">&quot;THUDM/CogVideoX-5b&quot;</span>, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>config = PyramidAttentionBroadcastConfig(
<span class="hljs-meta">... </span>    spatial_attention_block_skip_range=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>    spatial_attention_timestep_skip_range=(<span class="hljs-number">100</span>, <span class="hljs-number">800</span>),
<span class="hljs-meta">... </span>    current_timestep_callback=<span class="hljs-keyword">lambda</span>: pipe.current_timestep,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.transformer.enable_cache(config)`,wrap:!1}}),{c(){s=p("p"),s.textContent=$,f=o(),u(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),g(l.$$.fragment,t)},m(t,m){c(t,s,m),c(t,f,m),_(l,t,m),h=!0},p:Ie,i(t){h||(b(l.$$.fragment,t),h=!0)},o(t){y(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),w(l,t)}}}function jt(B){let s,$="Example:",f,l,h;return l=new Re({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlkZW9YUGlwZWxpbmUlMkMlMjBQeXJhbWlkQXR0ZW50aW9uQnJvYWRjYXN0Q29uZmlnJTJDJTIwYXBwbHlfcHlyYW1pZF9hdHRlbnRpb25fYnJvYWRjYXN0JTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBDb2dWaWRlb1hQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyVEhVRE0lMkZDb2dWaWRlb1gtNWIlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFjb25maWclMjAlM0QlMjBQeXJhbWlkQXR0ZW50aW9uQnJvYWRjYXN0Q29uZmlnKCUwQSUyMCUyMCUyMCUyMHNwYXRpYWxfYXR0ZW50aW9uX2Jsb2NrX3NraXBfcmFuZ2UlM0QyJTJDJTBBJTIwJTIwJTIwJTIwc3BhdGlhbF9hdHRlbnRpb25fdGltZXN0ZXBfc2tpcF9yYW5nZSUzRCgxMDAlMkMlMjA4MDApJTJDJTBBJTIwJTIwJTIwJTIwY3VycmVudF90aW1lc3RlcF9jYWxsYmFjayUzRGxhbWJkYSUzQSUyMHBpcGUuY3VycmVudF90aW1lc3RlcCUyQyUwQSklMEFhcHBseV9weXJhbWlkX2F0dGVudGlvbl9icm9hZGNhc3QocGlwZS50cmFuc2Zvcm1lciUyQyUyMGNvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXPipeline, PyramidAttentionBroadcastConfig, apply_pyramid_attention_broadcast
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = CogVideoXPipeline.from_pretrained(<span class="hljs-string">&quot;THUDM/CogVideoX-5b&quot;</span>, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>config = PyramidAttentionBroadcastConfig(
<span class="hljs-meta">... </span>    spatial_attention_block_skip_range=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>    spatial_attention_timestep_skip_range=(<span class="hljs-number">100</span>, <span class="hljs-number">800</span>),
<span class="hljs-meta">... </span>    current_timestep_callback=<span class="hljs-keyword">lambda</span>: pipe.current_timestep,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>apply_pyramid_attention_broadcast(pipe.transformer, config)`,wrap:!1}}),{c(){s=p("p"),s.textContent=$,f=o(),u(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),g(l.$$.fragment,t)},m(t,m){c(t,s,m),c(t,f,m),_(l,t,m),h=!0},p:Ie,i(t){h||(b(l.$$.fragment,t),h=!0)},o(t){y(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),w(l,t)}}}function xt(B){let s,$="Example:",f,l,h;return l=new Re({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlkZW9YUGlwZWxpbmUlMkMlMjBGYXN0ZXJDYWNoZUNvbmZpZyUyQyUyMGFwcGx5X2Zhc3Rlcl9jYWNoZSUwQSUwQXBpcGUlMjAlM0QlMjBDb2dWaWRlb1hQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyVEhVRE0lMkZDb2dWaWRlb1gtNWIlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFjb25maWclMjAlM0QlMjBGYXN0ZXJDYWNoZUNvbmZpZyglMEElMjAlMjAlMjAlMjBzcGF0aWFsX2F0dGVudGlvbl9ibG9ja19za2lwX3JhbmdlJTNEMiUyQyUwQSUyMCUyMCUyMCUyMHNwYXRpYWxfYXR0ZW50aW9uX3RpbWVzdGVwX3NraXBfcmFuZ2UlM0QoLTElMkMlMjA2ODEpJTJDJTBBJTIwJTIwJTIwJTIwbG93X2ZyZXF1ZW5jeV93ZWlnaHRfdXBkYXRlX3RpbWVzdGVwX3JhbmdlJTNEKDk5JTJDJTIwNjQxKSUyQyUwQSUyMCUyMCUyMCUyMGhpZ2hfZnJlcXVlbmN5X3dlaWdodF91cGRhdGVfdGltZXN0ZXBfcmFuZ2UlM0QoLTElMkMlMjAzMDEpJTJDJTBBJTIwJTIwJTIwJTIwc3BhdGlhbF9hdHRlbnRpb25fYmxvY2tfaWRlbnRpZmllcnMlM0QlNUIlMjJ0cmFuc2Zvcm1lcl9ibG9ja3MlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBhdHRlbnRpb25fd2VpZ2h0X2NhbGxiYWNrJTNEbGFtYmRhJTIwXyUzQSUyMDAuMyUyQyUwQSUyMCUyMCUyMCUyMHRlbnNvcl9mb3JtYXQlM0QlMjJCRkNIVyUyMiUyQyUwQSklMEFhcHBseV9mYXN0ZXJfY2FjaGUocGlwZS50cmFuc2Zvcm1lciUyQyUyMGNvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXPipeline, FasterCacheConfig, apply_faster_cache

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = CogVideoXPipeline.from_pretrained(<span class="hljs-string">&quot;THUDM/CogVideoX-5b&quot;</span>, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>config = FasterCacheConfig(
<span class="hljs-meta">... </span>    spatial_attention_block_skip_range=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>    spatial_attention_timestep_skip_range=(-<span class="hljs-number">1</span>, <span class="hljs-number">681</span>),
<span class="hljs-meta">... </span>    low_frequency_weight_update_timestep_range=(<span class="hljs-number">99</span>, <span class="hljs-number">641</span>),
<span class="hljs-meta">... </span>    high_frequency_weight_update_timestep_range=(-<span class="hljs-number">1</span>, <span class="hljs-number">301</span>),
<span class="hljs-meta">... </span>    spatial_attention_block_identifiers=[<span class="hljs-string">&quot;transformer_blocks&quot;</span>],
<span class="hljs-meta">... </span>    attention_weight_callback=<span class="hljs-keyword">lambda</span> _: <span class="hljs-number">0.3</span>,
<span class="hljs-meta">... </span>    tensor_format=<span class="hljs-string">&quot;BFCHW&quot;</span>,
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>apply_faster_cache(pipe.transformer, config)`,wrap:!1}}),{c(){s=p("p"),s.textContent=$,f=o(),u(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),g(l.$$.fragment,t)},m(t,m){c(t,s,m),c(t,f,m),_(l,t,m),h=!0},p:Ie,i(t){h||(b(l.$$.fragment,t),h=!0)},o(t){y(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),w(l,t)}}}function Jt(B){let s,$="Example:",f,l,h;return l=new Re({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlldzRQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMuaG9va3MlMjBpbXBvcnQlMjBhcHBseV9maXJzdF9ibG9ja19jYWNoZSUyQyUyMEZpcnN0QmxvY2tDYWNoZUNvbmZpZyUwQSUwQXBpcGUlMjAlM0QlMjBDb2dWaWV3NFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJUSFVETSUyRkNvZ1ZpZXc0LTZCJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBYXBwbHlfZmlyc3RfYmxvY2tfY2FjaGUocGlwZS50cmFuc2Zvcm1lciUyQyUyMEZpcnN0QmxvY2tDYWNoZUNvbmZpZyh0aHJlc2hvbGQlM0QwLjIpKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwZ2VuZXJhdG9yJTNEdG9yY2guR2VuZXJhdG9yKCkubWFudWFsX3NlZWQoNDIpKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJvdXRwdXQucG5nJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogView4Pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.hooks <span class="hljs-keyword">import</span> apply_first_block_cache, FirstBlockCacheConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = CogView4Pipeline.from_pretrained(<span class="hljs-string">&quot;THUDM/CogView4-6B&quot;</span>, torch_dtype=torch.bfloat16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>apply_first_block_cache(pipe.transformer, FirstBlockCacheConfig(threshold=<span class="hljs-number">0.2</span>))

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;A photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt, generator=torch.Generator().manual_seed(<span class="hljs-number">42</span>)).images[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>image.save(<span class="hljs-string">&quot;output.png&quot;</span>)`,wrap:!1}}),{c(){s=p("p"),s.textContent=$,f=o(),u(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),g(l.$$.fragment,t)},m(t,m){c(t,s,m),c(t,f,m),_(l,t,m),h=!0},p:Ie,i(t){h||(b(l.$$.fragment,t),h=!0)},o(t){y(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),w(l,t)}}}function Bt(B){let s,$,f,l,h,t,m,it="Cache methods speedup diffusion transformers by storing and reusing intermediate outputs of specific layers, such as attention and feedforward layers, instead of recalculating them at each inference step.",Ce,V,$e,C,A,Qe,ie,lt="A class for enable/disabling caching techniques on diffusion models.",Ee,le,rt="Supported caching techniques:",Ye,re,ct='<li><a href="https://huggingface.co/papers/2408.12588" rel="nofollow">Pyramid Attention Broadcast</a></li> <li><a href="https://huggingface.co/papers/2410.19355" rel="nofollow">FasterCache</a></li> <li><a href="https://github.com/chengzeyi/ParaAttention/blob/7a266123671b55e7e5a2fe9af3121f07a36afc78/README.md#first-block-cache-our-dynamic-caching" rel="nofollow">FirstBlockCache</a></li>',Ve,q,P,Ae,ce,pt="Context manager that provides additional methods for cache management.",Pe,Z,D,De,pe,dt="Enable caching techniques on the model.",He,G,Me,H,Te,U,S,Se,de,ht="Configuration for Pyramid Attention Broadcast.",ve,T,L,Le,he,ft='Apply <a href="https://huggingface.co/papers/2408.12588" rel="nofollow">Pyramid Attention Broadcast</a> to a given pipeline.',ze,fe,mt=`PAB is an attention approximation method that leverages the similarity in attention states between timesteps to
reduce the computational cost of attention computation. The key takeaway from the paper is that the attention
similarity in the cross-attention layers between timesteps is high, followed by less similarity in the temporal and
spatial layers. This allows for the skipping of attention computation in the cross-attention layers more frequently
than in the temporal and spatial layers. Applying PAB will, therefore, speedup the inference process.`,Ke,I,je,z,xe,F,K,Oe,me,ut='Configuration for <a href="https://huggingface.co/papers/2410.19355" rel="nofollow">FasterCache</a>.',Je,j,O,et,ue,gt='Applies <a href="https://huggingface.co/papers/2410.19355" rel="nofollow">FasterCache</a> to a given pipeline.',tt,R,Be,ee,Ze,W,te,nt,ge,_t=`Configuration for <a href="https://github.com/chengzeyi/ParaAttention/blob/7a266123671b55e7e5a2fe9af3121f07a36afc78/README.md#first-block-cache-our-dynamic-caching" rel="nofollow">First Block
Cache</a>.`,Ue,v,ne,at,_e,bt=`Applies <a href="https://github.com/chengzeyi/ParaAttention/blob/4de137c5b96416489f06e43e19f2c14a772e28fd/README.md#first-block-cache-our-dynamic-caching" rel="nofollow">First Block
Cache</a>
to a given module.`,st,be,yt=`First Block Cache builds on the ideas of <a href="https://huggingface.co/papers/2411.19108" rel="nofollow">TeaCache</a>. It is much simpler
to implement generically for a wide range of models and has been integrated first for experimental purposes.`,ot,Q,Fe,ae,We,we,Xe;return h=new ke({props:{title:"Caching methods",local:"caching-methods",headingTag:"h1"}}),V=new ke({props:{title:"CacheMixin",local:"diffusers.CacheMixin",headingTag:"h2"}}),A=new N({props:{name:"class diffusers.CacheMixin",anchor:"diffusers.CacheMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cache_utils.py#L23"}}),P=new N({props:{name:"cache_context",anchor:"diffusers.CacheMixin.cache_context",parameters:[{name:"name",val:": str"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cache_utils.py#L120"}}),D=new N({props:{name:"enable_cache",anchor:"diffusers.CacheMixin.enable_cache",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"diffusers.CacheMixin.enable_cache.config",description:`<strong>config</strong> (<code>Union[PyramidAttentionBroadcastConfig]</code>) &#x2014;
The configuration for applying the caching technique. Currently supported caching techniques are:<ul>
<li><a href="/docs/diffusers/main/en/api/cache#diffusers.PyramidAttentionBroadcastConfig">PyramidAttentionBroadcastConfig</a></li>
</ul>`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cache_utils.py#L39"}}),G=new Ge({props:{anchor:"diffusers.CacheMixin.enable_cache.example",$$slots:{default:[vt]},$$scope:{ctx:B}}}),H=new ke({props:{title:"PyramidAttentionBroadcastConfig",local:"diffusers.PyramidAttentionBroadcastConfig",headingTag:"h2"}}),S=new N({props:{name:"class diffusers.PyramidAttentionBroadcastConfig",anchor:"diffusers.PyramidAttentionBroadcastConfig",parameters:[{name:"spatial_attention_block_skip_range",val:": typing.Optional[int] = None"},{name:"temporal_attention_block_skip_range",val:": typing.Optional[int] = None"},{name:"cross_attention_block_skip_range",val:": typing.Optional[int] = None"},{name:"spatial_attention_timestep_skip_range",val:": typing.Tuple[int, int] = (100, 800)"},{name:"temporal_attention_timestep_skip_range",val:": typing.Tuple[int, int] = (100, 800)"},{name:"cross_attention_timestep_skip_range",val:": typing.Tuple[int, int] = (100, 800)"},{name:"spatial_attention_block_identifiers",val:": typing.Tuple[str, ...] = ('blocks', 'transformer_blocks', 'single_transformer_blocks', 'layers')"},{name:"temporal_attention_block_identifiers",val:": typing.Tuple[str, ...] = ('temporal_transformer_blocks',)"},{name:"cross_attention_block_identifiers",val:": typing.Tuple[str, ...] = ('blocks', 'transformer_blocks', 'layers')"},{name:"current_timestep_callback",val:": typing.Callable[[], int] = None"}],parametersDescription:[{anchor:"diffusers.PyramidAttentionBroadcastConfig.spatial_attention_block_skip_range",description:`<strong>spatial_attention_block_skip_range</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of times a specific spatial attention broadcast is skipped before computing the attention states
to re-use. If this is set to the value <code>N</code>, the attention computation will be skipped <code>N - 1</code> times (i.e.,
old attention states will be re-used) before computing the new attention states again.`,name:"spatial_attention_block_skip_range"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.temporal_attention_block_skip_range",description:`<strong>temporal_attention_block_skip_range</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of times a specific temporal attention broadcast is skipped before computing the attention
states to re-use. If this is set to the value <code>N</code>, the attention computation will be skipped <code>N - 1</code> times
(i.e., old attention states will be re-used) before computing the new attention states again.`,name:"temporal_attention_block_skip_range"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.cross_attention_block_skip_range",description:`<strong>cross_attention_block_skip_range</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The number of times a specific cross-attention broadcast is skipped before computing the attention states
to re-use. If this is set to the value <code>N</code>, the attention computation will be skipped <code>N - 1</code> times (i.e.,
old attention states will be re-used) before computing the new attention states again.`,name:"cross_attention_block_skip_range"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.spatial_attention_timestep_skip_range",description:`<strong>spatial_attention_timestep_skip_range</strong> (<code>Tuple[int, int]</code>, defaults to <code>(100, 800)</code>) &#x2014;
The range of timesteps to skip in the spatial attention layer. The attention computations will be
conditionally skipped if the current timestep is within the specified range.`,name:"spatial_attention_timestep_skip_range"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.temporal_attention_timestep_skip_range",description:`<strong>temporal_attention_timestep_skip_range</strong> (<code>Tuple[int, int]</code>, defaults to <code>(100, 800)</code>) &#x2014;
The range of timesteps to skip in the temporal attention layer. The attention computations will be
conditionally skipped if the current timestep is within the specified range.`,name:"temporal_attention_timestep_skip_range"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.cross_attention_timestep_skip_range",description:`<strong>cross_attention_timestep_skip_range</strong> (<code>Tuple[int, int]</code>, defaults to <code>(100, 800)</code>) &#x2014;
The range of timesteps to skip in the cross-attention layer. The attention computations will be
conditionally skipped if the current timestep is within the specified range.`,name:"cross_attention_timestep_skip_range"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.spatial_attention_block_identifiers",description:`<strong>spatial_attention_block_identifiers</strong> (<code>Tuple[str, ...]</code>) &#x2014;
The identifiers to match against the layer names to determine if the layer is a spatial attention layer.`,name:"spatial_attention_block_identifiers"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.temporal_attention_block_identifiers",description:`<strong>temporal_attention_block_identifiers</strong> (<code>Tuple[str, ...]</code>) &#x2014;
The identifiers to match against the layer names to determine if the layer is a temporal attention layer.`,name:"temporal_attention_block_identifiers"},{anchor:"diffusers.PyramidAttentionBroadcastConfig.cross_attention_block_identifiers",description:`<strong>cross_attention_block_identifiers</strong> (<code>Tuple[str, ...]</code>) &#x2014;
The identifiers to match against the layer names to determine if the layer is a cross-attention layer.`,name:"cross_attention_block_identifiers"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/hooks/pyramid_attention_broadcast.py#L39"}}),L=new N({props:{name:"diffusers.apply_pyramid_attention_broadcast",anchor:"diffusers.apply_pyramid_attention_broadcast",parameters:[{name:"module",val:": Module"},{name:"config",val:": PyramidAttentionBroadcastConfig"}],parametersDescription:[{anchor:"diffusers.apply_pyramid_attention_broadcast.module",description:`<strong>module</strong> (<code>torch.nn.Module</code>) &#x2014;
The module to apply Pyramid Attention Broadcast to.`,name:"module"},{anchor:"diffusers.apply_pyramid_attention_broadcast.config",description:`<strong>config</strong> (<code>Optional[PyramidAttentionBroadcastConfig]</code>, <code>optional</code>, defaults to <code>None</code>) &#x2014;
The configuration to use for Pyramid Attention Broadcast.`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/hooks/pyramid_attention_broadcast.py#L181"}}),I=new Ge({props:{anchor:"diffusers.apply_pyramid_attention_broadcast.example",$$slots:{default:[jt]},$$scope:{ctx:B}}}),z=new ke({props:{title:"FasterCacheConfig",local:"diffusers.FasterCacheConfig",headingTag:"h2"}}),K=new N({props:{name:"class diffusers.FasterCacheConfig",anchor:"diffusers.FasterCacheConfig",parameters:[{name:"spatial_attention_block_skip_range",val:": int = 2"},{name:"temporal_attention_block_skip_range",val:": typing.Optional[int] = None"},{name:"spatial_attention_timestep_skip_range",val:": typing.Tuple[int, int] = (-1, 681)"},{name:"temporal_attention_timestep_skip_range",val:": typing.Tuple[int, int] = (-1, 681)"},{name:"low_frequency_weight_update_timestep_range",val:": typing.Tuple[int, int] = (99, 901)"},{name:"high_frequency_weight_update_timestep_range",val:": typing.Tuple[int, int] = (-1, 301)"},{name:"alpha_low_frequency",val:": float = 1.1"},{name:"alpha_high_frequency",val:": float = 1.1"},{name:"unconditional_batch_skip_range",val:": int = 5"},{name:"unconditional_batch_timestep_skip_range",val:": typing.Tuple[int, int] = (-1, 641)"},{name:"spatial_attention_block_identifiers",val:": typing.Tuple[str, ...] = ('^blocks.*attn', '^transformer_blocks.*attn', '^single_transformer_blocks.*attn')"},{name:"temporal_attention_block_identifiers",val:": typing.Tuple[str, ...] = ('^temporal_transformer_blocks.*attn',)"},{name:"attention_weight_callback",val:": typing.Callable[[torch.nn.modules.module.Module], float] = None"},{name:"low_frequency_weight_callback",val:": typing.Callable[[torch.nn.modules.module.Module], float] = None"},{name:"high_frequency_weight_callback",val:": typing.Callable[[torch.nn.modules.module.Module], float] = None"},{name:"tensor_format",val:": str = 'BCFHW'"},{name:"is_guidance_distilled",val:": bool = False"},{name:"current_timestep_callback",val:": typing.Callable[[], int] = None"},{name:"_unconditional_conditional_input_kwargs_identifiers",val:": typing.List[str] = ('hidden_states', 'encoder_hidden_states', 'timestep', 'attention_mask', 'encoder_attention_mask')"}],parametersDescription:[{anchor:"diffusers.FasterCacheConfig.spatial_attention_block_skip_range",description:`<strong>spatial_attention_block_skip_range</strong> (<code>int</code>, defaults to <code>2</code>) &#x2014;
Calculate the attention states every <code>N</code> iterations. If this is set to <code>N</code>, the attention computation will
be skipped <code>N - 1</code> times (i.e., cached attention states will be re-used) before computing the new attention
states again.`,name:"spatial_attention_block_skip_range"},{anchor:"diffusers.FasterCacheConfig.temporal_attention_block_skip_range",description:`<strong>temporal_attention_block_skip_range</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Calculate the attention states every <code>N</code> iterations. If this is set to <code>N</code>, the attention computation will
be skipped <code>N - 1</code> times (i.e., cached attention states will be re-used) before computing the new attention
states again.`,name:"temporal_attention_block_skip_range"},{anchor:"diffusers.FasterCacheConfig.spatial_attention_timestep_skip_range",description:`<strong>spatial_attention_timestep_skip_range</strong> (<code>Tuple[float, float]</code>, defaults to <code>(-1, 681)</code>) &#x2014;
The timestep range within which the spatial attention computation can be skipped without a significant loss
in quality. This is to be determined by the user based on the underlying model. The first value in the
tuple is the lower bound and the second value is the upper bound. Typically, diffusion timesteps for
denoising are in the reversed range of 0 to 1000 (i.e. denoising starts at timestep 1000 and ends at
timestep 0). For the default values, this would mean that the spatial attention computation skipping will
be applicable only after denoising timestep 681 is reached, and continue until the end of the denoising
process.`,name:"spatial_attention_timestep_skip_range"},{anchor:"diffusers.FasterCacheConfig.temporal_attention_timestep_skip_range",description:`<strong>temporal_attention_timestep_skip_range</strong> (<code>Tuple[float, float]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
The timestep range within which the temporal attention computation can be skipped without a significant
loss in quality. This is to be determined by the user based on the underlying model. The first value in the
tuple is the lower bound and the second value is the upper bound. Typically, diffusion timesteps for
denoising are in the reversed range of 0 to 1000 (i.e. denoising starts at timestep 1000 and ends at
timestep 0).`,name:"temporal_attention_timestep_skip_range"},{anchor:"diffusers.FasterCacheConfig.low_frequency_weight_update_timestep_range",description:`<strong>low_frequency_weight_update_timestep_range</strong> (<code>Tuple[int, int]</code>, defaults to <code>(99, 901)</code>) &#x2014;
The timestep range within which the low frequency weight scaling update is applied. The first value in the
tuple is the lower bound and the second value is the upper bound of the timestep range. The callback
function for the update is called only within this range.`,name:"low_frequency_weight_update_timestep_range"},{anchor:"diffusers.FasterCacheConfig.high_frequency_weight_update_timestep_range",description:`<strong>high_frequency_weight_update_timestep_range</strong> (<code>Tuple[int, int]</code>, defaults to <code>(-1, 301)</code>) &#x2014;
The timestep range within which the high frequency weight scaling update is applied. The first value in the
tuple is the lower bound and the second value is the upper bound of the timestep range. The callback
function for the update is called only within this range.`,name:"high_frequency_weight_update_timestep_range"},{anchor:"diffusers.FasterCacheConfig.alpha_low_frequency",description:`<strong>alpha_low_frequency</strong> (<code>float</code>, defaults to <code>1.1</code>) &#x2014;
The weight to scale the low frequency updates by. This is used to approximate the unconditional branch from
the conditional branch outputs.`,name:"alpha_low_frequency"},{anchor:"diffusers.FasterCacheConfig.alpha_high_frequency",description:`<strong>alpha_high_frequency</strong> (<code>float</code>, defaults to <code>1.1</code>) &#x2014;
The weight to scale the high frequency updates by. This is used to approximate the unconditional branch
from the conditional branch outputs.`,name:"alpha_high_frequency"},{anchor:"diffusers.FasterCacheConfig.unconditional_batch_skip_range",description:`<strong>unconditional_batch_skip_range</strong> (<code>int</code>, defaults to <code>5</code>) &#x2014;
Process the unconditional branch every <code>N</code> iterations. If this is set to <code>N</code>, the unconditional branch
computation will be skipped <code>N - 1</code> times (i.e., cached unconditional branch states will be re-used) before
computing the new unconditional branch states again.`,name:"unconditional_batch_skip_range"},{anchor:"diffusers.FasterCacheConfig.unconditional_batch_timestep_skip_range",description:`<strong>unconditional_batch_timestep_skip_range</strong> (<code>Tuple[float, float]</code>, defaults to <code>(-1, 641)</code>) &#x2014;
The timestep range within which the unconditional branch computation can be skipped without a significant
loss in quality. This is to be determined by the user based on the underlying model. The first value in the
tuple is the lower bound and the second value is the upper bound.`,name:"unconditional_batch_timestep_skip_range"},{anchor:"diffusers.FasterCacheConfig.spatial_attention_block_identifiers",description:`<strong>spatial_attention_block_identifiers</strong> (<code>Tuple[str, ...]</code>, defaults to <code>(&quot;blocks.*attn1&quot;, &quot;transformer_blocks.*attn1&quot;, &quot;single_transformer_blocks.*attn1&quot;)</code>) &#x2014;
The identifiers to match the spatial attention blocks in the model. If the name of the block contains any
of these identifiers, FasterCache will be applied to that block. This can either be the full layer names,
partial layer names, or regex patterns. Matching will always be done using a regex match.`,name:"spatial_attention_block_identifiers"},{anchor:"diffusers.FasterCacheConfig.temporal_attention_block_identifiers",description:`<strong>temporal_attention_block_identifiers</strong> (<code>Tuple[str, ...]</code>, defaults to <code>(&quot;temporal_transformer_blocks.*attn1&quot;,)</code>) &#x2014;
The identifiers to match the temporal attention blocks in the model. If the name of the block contains any
of these identifiers, FasterCache will be applied to that block. This can either be the full layer names,
partial layer names, or regex patterns. Matching will always be done using a regex match.`,name:"temporal_attention_block_identifiers"},{anchor:"diffusers.FasterCacheConfig.attention_weight_callback",description:`<strong>attention_weight_callback</strong> (<code>Callable[[torch.nn.Module], float]</code>, defaults to <code>None</code>) &#x2014;
The callback function to determine the weight to scale the attention outputs by. This function should take
the attention module as input and return a float value. This is used to approximate the unconditional
branch from the conditional branch outputs. If not provided, the default weight is 0.5 for all timesteps.
Typically, as described in the paper, this weight should gradually increase from 0 to 1 as the inference
progresses. Users are encouraged to experiment and provide custom weight schedules that take into account
the number of inference steps and underlying model behaviour as denoising progresses.`,name:"attention_weight_callback"},{anchor:"diffusers.FasterCacheConfig.low_frequency_weight_callback",description:`<strong>low_frequency_weight_callback</strong> (<code>Callable[[torch.nn.Module], float]</code>, defaults to <code>None</code>) &#x2014;
The callback function to determine the weight to scale the low frequency updates by. If not provided, the
default weight is 1.1 for timesteps within the range specified (as described in the paper).`,name:"low_frequency_weight_callback"},{anchor:"diffusers.FasterCacheConfig.high_frequency_weight_callback",description:`<strong>high_frequency_weight_callback</strong> (<code>Callable[[torch.nn.Module], float]</code>, defaults to <code>None</code>) &#x2014;
The callback function to determine the weight to scale the high frequency updates by. If not provided, the
default weight is 1.1 for timesteps within the range specified (as described in the paper).`,name:"high_frequency_weight_callback"},{anchor:"diffusers.FasterCacheConfig.tensor_format",description:`<strong>tensor_format</strong> (<code>str</code>, defaults to <code>&quot;BCFHW&quot;</code>) &#x2014;
The format of the input tensors. This should be one of <code>&quot;BCFHW&quot;</code>, <code>&quot;BFCHW&quot;</code>, or <code>&quot;BCHW&quot;</code>. The format is
used to split individual latent frames in order for low and high frequency components to be computed.`,name:"tensor_format"},{anchor:"diffusers.FasterCacheConfig.is_guidance_distilled",description:`<strong>is_guidance_distilled</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether the model is guidance distilled or not. If the model is guidance distilled, FasterCache will not be
applied at the denoiser-level to skip the unconditional branch computation (as there is none).`,name:"is_guidance_distilled"},{anchor:"diffusers.FasterCacheConfig._unconditional_conditional_input_kwargs_identifiers",description:`<strong>_unconditional_conditional_input_kwargs_identifiers</strong> (<code>List[str]</code>, defaults to <code>(&quot;hidden_states&quot;, &quot;encoder_hidden_states&quot;, &quot;timestep&quot;, &quot;attention_mask&quot;, &quot;encoder_attention_mask&quot;)</code>) &#x2014;
The identifiers to match the input kwargs that contain the batchwise-concatenated unconditional and
conditional inputs. If the name of the input kwargs contains any of these identifiers, FasterCache will
split the inputs into unconditional and conditional branches. This must be a list of exact input kwargs
names that contain the batchwise-concatenated unconditional and conditional inputs.`,name:"_unconditional_conditional_input_kwargs_identifiers"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/hooks/faster_cache.py#L49"}}),O=new N({props:{name:"diffusers.apply_faster_cache",anchor:"diffusers.apply_faster_cache",parameters:[{name:"module",val:": Module"},{name:"config",val:": FasterCacheConfig"}],parametersDescription:[{anchor:"diffusers.apply_faster_cache.module",description:`<strong>module</strong> (<code>torch.nn.Module</code>) &#x2014;
The pytorch module to apply FasterCache to. Typically, this should be a transformer architecture supported
in Diffusers, such as <code>CogVideoXTransformer3DModel</code>, but external implementations may also work.`,name:"module"},{anchor:"diffusers.apply_faster_cache.config",description:`<strong>config</strong> (<code>FasterCacheConfig</code>) &#x2014;
The configuration to use for FasterCache.`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/hooks/faster_cache.py#L486"}}),R=new Ge({props:{anchor:"diffusers.apply_faster_cache.example",$$slots:{default:[xt]},$$scope:{ctx:B}}}),ee=new ke({props:{title:"FirstBlockCacheConfig",local:"diffusers.FirstBlockCacheConfig",headingTag:"h3"}}),te=new N({props:{name:"class diffusers.FirstBlockCacheConfig",anchor:"diffusers.FirstBlockCacheConfig",parameters:[{name:"threshold",val:": float = 0.05"}],parametersDescription:[{anchor:"diffusers.FirstBlockCacheConfig.threshold",description:`<strong>threshold</strong> (<code>float</code>, defaults to <code>0.05</code>) &#x2014;
The threshold to determine whether or not a forward pass through all layers of the model is required. A
higher threshold usually results in a forward pass through a lower number of layers and faster inference,
but might lead to poorer generation quality. A lower threshold may not result in significant generation
speedup. The threshold is compared against the absmean difference of the residuals between the current and
cached outputs from the first transformer block. If the difference is below the threshold, the forward pass
is skipped.`,name:"threshold"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/hooks/first_block_cache.py#L33"}}),ne=new N({props:{name:"diffusers.apply_first_block_cache",anchor:"diffusers.apply_first_block_cache",parameters:[{name:"module",val:": Module"},{name:"config",val:": FirstBlockCacheConfig"}],parametersDescription:[{anchor:"diffusers.apply_first_block_cache.module",description:`<strong>module</strong> (<code>torch.nn.Module</code>) &#x2014;
The pytorch module to apply FBCache to. Typically, this should be a transformer architecture supported in
Diffusers, such as <code>CogVideoXTransformer3DModel</code>, but external implementations may also work.`,name:"module"},{anchor:"diffusers.apply_first_block_cache.config",description:`<strong>config</strong> (<code>FirstBlockCacheConfig</code>) &#x2014;
The configuration to use for applying the FBCache method.`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/hooks/first_block_cache.py#L194"}}),Q=new Ge({props:{anchor:"diffusers.apply_first_block_cache.example",$$slots:{default:[Jt]},$$scope:{ctx:B}}}),ae=new Tt({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/cache.md"}}),{c(){s=p("meta"),$=o(),f=p("p"),l=o(),u(h.$$.fragment),t=o(),m=p("p"),m.textContent=it,Ce=o(),u(V.$$.fragment),$e=o(),C=p("div"),u(A.$$.fragment),Qe=o(),ie=p("p"),ie.textContent=lt,Ee=o(),le=p("p"),le.textContent=rt,Ye=o(),re=p("ul"),re.innerHTML=ct,Ve=o(),q=p("div"),u(P.$$.fragment),Ae=o(),ce=p("p"),ce.textContent=pt,Pe=o(),Z=p("div"),u(D.$$.fragment),De=o(),pe=p("p"),pe.textContent=dt,He=o(),u(G.$$.fragment),Me=o(),u(H.$$.fragment),Te=o(),U=p("div"),u(S.$$.fragment),Se=o(),de=p("p"),de.textContent=ht,ve=o(),T=p("div"),u(L.$$.fragment),Le=o(),he=p("p"),he.innerHTML=ft,ze=o(),fe=p("p"),fe.textContent=mt,Ke=o(),u(I.$$.fragment),je=o(),u(z.$$.fragment),xe=o(),F=p("div"),u(K.$$.fragment),Oe=o(),me=p("p"),me.innerHTML=ut,Je=o(),j=p("div"),u(O.$$.fragment),et=o(),ue=p("p"),ue.innerHTML=gt,tt=o(),u(R.$$.fragment),Be=o(),u(ee.$$.fragment),Ze=o(),W=p("div"),u(te.$$.fragment),nt=o(),ge=p("p"),ge.innerHTML=_t,Ue=o(),v=p("div"),u(ne.$$.fragment),at=o(),_e=p("p"),_e.innerHTML=bt,st=o(),be=p("p"),be.innerHTML=yt,ot=o(),u(Q.$$.fragment),Fe=o(),u(ae.$$.fragment),We=o(),we=p("p"),this.h()},l(e){const a=Mt("svelte-u9bgzb",document.head);s=d(a,"META",{name:!0,content:!0}),a.forEach(n),$=i(e),f=d(e,"P",{}),x(f).forEach(n),l=i(e),g(h.$$.fragment,e),t=i(e),m=d(e,"P",{"data-svelte-h":!0}),k(m)!=="svelte-1oer4hj"&&(m.textContent=it),Ce=i(e),g(V.$$.fragment,e),$e=i(e),C=d(e,"DIV",{class:!0});var M=x(C);g(A.$$.fragment,M),Qe=i(M),ie=d(M,"P",{"data-svelte-h":!0}),k(ie)!=="svelte-1jkm0k7"&&(ie.textContent=lt),Ee=i(M),le=d(M,"P",{"data-svelte-h":!0}),k(le)!=="svelte-x25y7s"&&(le.textContent=rt),Ye=i(M),re=d(M,"UL",{"data-svelte-h":!0}),k(re)!=="svelte-ub5q43"&&(re.innerHTML=ct),Ve=i(M),q=d(M,"DIV",{class:!0});var se=x(q);g(P.$$.fragment,se),Ae=i(se),ce=d(se,"P",{"data-svelte-h":!0}),k(ce)!=="svelte-121bmd6"&&(ce.textContent=pt),se.forEach(n),Pe=i(M),Z=d(M,"DIV",{class:!0});var X=x(Z);g(D.$$.fragment,X),De=i(X),pe=d(X,"P",{"data-svelte-h":!0}),k(pe)!=="svelte-1jqtd9a"&&(pe.textContent=dt),He=i(X),g(G.$$.fragment,X),X.forEach(n),M.forEach(n),Me=i(e),g(H.$$.fragment,e),Te=i(e),U=d(e,"DIV",{class:!0});var oe=x(U);g(S.$$.fragment,oe),Se=i(oe),de=d(oe,"P",{"data-svelte-h":!0}),k(de)!=="svelte-g9nrp2"&&(de.textContent=ht),oe.forEach(n),ve=i(e),T=d(e,"DIV",{class:!0});var E=x(T);g(L.$$.fragment,E),Le=i(E),he=d(E,"P",{"data-svelte-h":!0}),k(he)!=="svelte-1k6n7qf"&&(he.innerHTML=ft),ze=i(E),fe=d(E,"P",{"data-svelte-h":!0}),k(fe)!=="svelte-1n2zwuf"&&(fe.textContent=mt),Ke=i(E),g(I.$$.fragment,E),E.forEach(n),je=i(e),g(z.$$.fragment,e),xe=i(e),F=d(e,"DIV",{class:!0});var Ne=x(F);g(K.$$.fragment,Ne),Oe=i(Ne),me=d(Ne,"P",{"data-svelte-h":!0}),k(me)!=="svelte-38u0u9"&&(me.innerHTML=ut),Ne.forEach(n),Je=i(e),j=d(e,"DIV",{class:!0});var ye=x(j);g(O.$$.fragment,ye),et=i(ye),ue=d(ye,"P",{"data-svelte-h":!0}),k(ue)!=="svelte-1v5ielx"&&(ue.innerHTML=gt),tt=i(ye),g(R.$$.fragment,ye),ye.forEach(n),Be=i(e),g(ee.$$.fragment,e),Ze=i(e),W=d(e,"DIV",{class:!0});var qe=x(W);g(te.$$.fragment,qe),nt=i(qe),ge=d(qe,"P",{"data-svelte-h":!0}),k(ge)!=="svelte-360v39"&&(ge.innerHTML=_t),qe.forEach(n),Ue=i(e),v=d(e,"DIV",{class:!0});var Y=x(v);g(ne.$$.fragment,Y),at=i(Y),_e=d(Y,"P",{"data-svelte-h":!0}),k(_e)!=="svelte-1p02a6y"&&(_e.innerHTML=bt),st=i(Y),be=d(Y,"P",{"data-svelte-h":!0}),k(be)!=="svelte-1xnxpcr"&&(be.innerHTML=yt),ot=i(Y),g(Q.$$.fragment,Y),Y.forEach(n),Fe=i(e),g(ae.$$.fragment,e),We=i(e),we=d(e,"P",{}),x(we).forEach(n),this.h()},h(){J(s,"name","hf:doc:metadata"),J(s,"content",Zt),J(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,a){r(document.head,s),c(e,$,a),c(e,f,a),c(e,l,a),_(h,e,a),c(e,t,a),c(e,m,a),c(e,Ce,a),_(V,e,a),c(e,$e,a),c(e,C,a),_(A,C,null),r(C,Qe),r(C,ie),r(C,Ee),r(C,le),r(C,Ye),r(C,re),r(C,Ve),r(C,q),_(P,q,null),r(q,Ae),r(q,ce),r(C,Pe),r(C,Z),_(D,Z,null),r(Z,De),r(Z,pe),r(Z,He),_(G,Z,null),c(e,Me,a),_(H,e,a),c(e,Te,a),c(e,U,a),_(S,U,null),r(U,Se),r(U,de),c(e,ve,a),c(e,T,a),_(L,T,null),r(T,Le),r(T,he),r(T,ze),r(T,fe),r(T,Ke),_(I,T,null),c(e,je,a),_(z,e,a),c(e,xe,a),c(e,F,a),_(K,F,null),r(F,Oe),r(F,me),c(e,Je,a),c(e,j,a),_(O,j,null),r(j,et),r(j,ue),r(j,tt),_(R,j,null),c(e,Be,a),_(ee,e,a),c(e,Ze,a),c(e,W,a),_(te,W,null),r(W,nt),r(W,ge),c(e,Ue,a),c(e,v,a),_(ne,v,null),r(v,at),r(v,_e),r(v,st),r(v,be),r(v,ot),_(Q,v,null),c(e,Fe,a),_(ae,e,a),c(e,We,a),c(e,we,a),Xe=!0},p(e,[a]){const M={};a&2&&(M.$$scope={dirty:a,ctx:e}),G.$set(M);const se={};a&2&&(se.$$scope={dirty:a,ctx:e}),I.$set(se);const X={};a&2&&(X.$$scope={dirty:a,ctx:e}),R.$set(X);const oe={};a&2&&(oe.$$scope={dirty:a,ctx:e}),Q.$set(oe)},i(e){Xe||(b(h.$$.fragment,e),b(V.$$.fragment,e),b(A.$$.fragment,e),b(P.$$.fragment,e),b(D.$$.fragment,e),b(G.$$.fragment,e),b(H.$$.fragment,e),b(S.$$.fragment,e),b(L.$$.fragment,e),b(I.$$.fragment,e),b(z.$$.fragment,e),b(K.$$.fragment,e),b(O.$$.fragment,e),b(R.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(ne.$$.fragment,e),b(Q.$$.fragment,e),b(ae.$$.fragment,e),Xe=!0)},o(e){y(h.$$.fragment,e),y(V.$$.fragment,e),y(A.$$.fragment,e),y(P.$$.fragment,e),y(D.$$.fragment,e),y(G.$$.fragment,e),y(H.$$.fragment,e),y(S.$$.fragment,e),y(L.$$.fragment,e),y(I.$$.fragment,e),y(z.$$.fragment,e),y(K.$$.fragment,e),y(O.$$.fragment,e),y(R.$$.fragment,e),y(ee.$$.fragment,e),y(te.$$.fragment,e),y(ne.$$.fragment,e),y(Q.$$.fragment,e),y(ae.$$.fragment,e),Xe=!1},d(e){e&&(n($),n(f),n(l),n(t),n(m),n(Ce),n($e),n(C),n(Me),n(Te),n(U),n(ve),n(T),n(je),n(xe),n(F),n(Je),n(j),n(Be),n(Ze),n(W),n(Ue),n(v),n(Fe),n(We),n(we)),n(s),w(h,e),w(V,e),w(A),w(P),w(D),w(G),w(H,e),w(S),w(L),w(I),w(z,e),w(K),w(O),w(R),w(ee,e),w(te),w(ne),w(Q),w(ae,e)}}}const Zt='{"title":"Caching methods","local":"caching-methods","sections":[{"title":"CacheMixin","local":"diffusers.CacheMixin","sections":[],"depth":2},{"title":"PyramidAttentionBroadcastConfig","local":"diffusers.PyramidAttentionBroadcastConfig","sections":[],"depth":2},{"title":"FasterCacheConfig","local":"diffusers.FasterCacheConfig","sections":[{"title":"FirstBlockCacheConfig","local":"diffusers.FirstBlockCacheConfig","sections":[],"depth":3}],"depth":2}],"depth":1}';function Ut(B){return kt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class It extends Ct{constructor(s){super(),$t(this,s,Ut,Bt,wt,{})}}export{It as component};
