import{s as Ct,o as $t,n as Qe}from"../chunks/scheduler.53228c21.js";import{S as Mt,i as Tt,e as p,s as o,c as m,h as vt,a as d,d as n,b as i,f as x,g as u,j as k,k as J,l as r,m as c,n as g,t as _,o as b,p as y}from"../chunks/index.100fac89.js";import{C as jt}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{D as N}from"../chunks/Docstring.db856a1e.js";import{C as Ee}from"../chunks/CodeBlock.d30a6509.js";import{E as Re}from"../chunks/ExampleCodeBlock.3eb26ae1.js";import{H as Ce,E as xt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function Jt(B){let s,$="Example:",f,l,h;return l=new Ee({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(),m(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),u(l.$$.fragment,t)},m(t,w){c(t,s,w),c(t,f,w),g(l,t,w),h=!0},p:Qe,i(t){h||(_(l.$$.fragment,t),h=!0)},o(t){b(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),y(l,t)}}}function Bt(B){let s,$="Example:",f,l,h;return l=new Ee({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(),m(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),u(l.$$.fragment,t)},m(t,w){c(t,s,w),c(t,f,w),g(l,t,w),h=!0},p:Qe,i(t){h||(_(l.$$.fragment,t),h=!0)},o(t){b(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),y(l,t)}}}function Zt(B){let s,$="Example:",f,l,h;return l=new Ee({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(),m(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),u(l.$$.fragment,t)},m(t,w){c(t,s,w),c(t,f,w),g(l,t,w),h=!0},p:Qe,i(t){h||(_(l.$$.fragment,t),h=!0)},o(t){b(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),y(l,t)}}}function Ut(B){let s,$="Example:",f,l,h;return l=new Ee({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(),m(l.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),k(s)!=="svelte-11lpom8"&&(s.textContent=$),f=i(t),u(l.$$.fragment,t)},m(t,w){c(t,s,w),c(t,f,w),g(l,t,w),h=!0},p:Qe,i(t){h||(_(l.$$.fragment,t),h=!0)},o(t){b(l.$$.fragment,t),h=!1},d(t){t&&(n(s),n(f)),y(l,t)}}}function Ft(B){let s,$,f,l,h,t,w,$e,V,rt="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.",Me,A,Te,C,P,Ye,le,ct="A class for enable/disabling caching techniques on diffusion models.",Ve,re,pt="Supported caching techniques:",Ae,ce,dt='<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>',Pe,q,D,De,pe,ht="Context manager that provides additional methods for cache management.",He,Z,H,Se,de,ft="Enable caching techniques on the model.",Le,G,ve,S,je,U,L,ze,he,mt="Configuration for Pyramid Attention Broadcast.",xe,T,z,Ke,fe,ut='Apply <a href="https://huggingface.co/papers/2408.12588" rel="nofollow">Pyramid Attention Broadcast</a> to a given pipeline.',Oe,me,gt=`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.`,et,I,Je,K,Be,F,O,tt,ue,_t='Configuration for <a href="https://huggingface.co/papers/2410.19355" rel="nofollow">FasterCache</a>.',Ze,j,ee,nt,ge,bt='Applies <a href="https://huggingface.co/papers/2410.19355" rel="nofollow">FasterCache</a> to a given pipeline.',at,R,Ue,te,Fe,W,ne,st,_e,yt=`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>.`,We,v,ae,ot,be,wt=`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.`,it,ye,kt=`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.`,lt,Q,Xe,se,Ne,ke,qe;return h=new jt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),w=new Ce({props:{title:"Caching methods",local:"caching-methods",headingTag:"h1"}}),A=new Ce({props:{title:"CacheMixin",local:"diffusers.CacheMixin",headingTag:"h2"}}),P=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"}}),D=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"}}),H=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 Re({props:{anchor:"diffusers.CacheMixin.enable_cache.example",$$slots:{default:[Jt]},$$scope:{ctx:B}}}),S=new Ce({props:{title:"PyramidAttentionBroadcastConfig",local:"diffusers.PyramidAttentionBroadcastConfig",headingTag:"h2"}}),L=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 reused) 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 reused) 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 reused) 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#L40"}}),z=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 Re({props:{anchor:"diffusers.apply_pyramid_attention_broadcast.example",$$slots:{default:[Bt]},$$scope:{ctx:B}}}),K=new Ce({props:{title:"FasterCacheConfig",local:"diffusers.FasterCacheConfig",headingTag:"h2"}}),O=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 reused) 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 reused) 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 reused) 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#L50"}}),ee=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 Re({props:{anchor:"diffusers.apply_faster_cache.example",$$slots:{default:[Zt]},$$scope:{ctx:B}}}),te=new Ce({props:{title:"FirstBlockCacheConfig",local:"diffusers.FirstBlockCacheConfig",headingTag:"h3"}}),ne=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#L34"}}),ae=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 Re({props:{anchor:"diffusers.apply_first_block_cache.example",$$slots:{default:[Ut]},$$scope:{ctx:B}}}),se=new xt({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(),m(h.$$.fragment),t=o(),m(w.$$.fragment),$e=o(),V=p("p"),V.textContent=rt,Me=o(),m(A.$$.fragment),Te=o(),C=p("div"),m(P.$$.fragment),Ye=o(),le=p("p"),le.textContent=ct,Ve=o(),re=p("p"),re.textContent=pt,Ae=o(),ce=p("ul"),ce.innerHTML=dt,Pe=o(),q=p("div"),m(D.$$.fragment),De=o(),pe=p("p"),pe.textContent=ht,He=o(),Z=p("div"),m(H.$$.fragment),Se=o(),de=p("p"),de.textContent=ft,Le=o(),m(G.$$.fragment),ve=o(),m(S.$$.fragment),je=o(),U=p("div"),m(L.$$.fragment),ze=o(),he=p("p"),he.textContent=mt,xe=o(),T=p("div"),m(z.$$.fragment),Ke=o(),fe=p("p"),fe.innerHTML=ut,Oe=o(),me=p("p"),me.textContent=gt,et=o(),m(I.$$.fragment),Je=o(),m(K.$$.fragment),Be=o(),F=p("div"),m(O.$$.fragment),tt=o(),ue=p("p"),ue.innerHTML=_t,Ze=o(),j=p("div"),m(ee.$$.fragment),nt=o(),ge=p("p"),ge.innerHTML=bt,at=o(),m(R.$$.fragment),Ue=o(),m(te.$$.fragment),Fe=o(),W=p("div"),m(ne.$$.fragment),st=o(),_e=p("p"),_e.innerHTML=yt,We=o(),v=p("div"),m(ae.$$.fragment),ot=o(),be=p("p"),be.innerHTML=wt,it=o(),ye=p("p"),ye.innerHTML=kt,lt=o(),m(Q.$$.fragment),Xe=o(),m(se.$$.fragment),Ne=o(),ke=p("p"),this.h()},l(e){const a=vt("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),u(h.$$.fragment,e),t=i(e),u(w.$$.fragment,e),$e=i(e),V=d(e,"P",{"data-svelte-h":!0}),k(V)!=="svelte-1oer4hj"&&(V.textContent=rt),Me=i(e),u(A.$$.fragment,e),Te=i(e),C=d(e,"DIV",{class:!0});var M=x(C);u(P.$$.fragment,M),Ye=i(M),le=d(M,"P",{"data-svelte-h":!0}),k(le)!=="svelte-1jkm0k7"&&(le.textContent=ct),Ve=i(M),re=d(M,"P",{"data-svelte-h":!0}),k(re)!=="svelte-x25y7s"&&(re.textContent=pt),Ae=i(M),ce=d(M,"UL",{"data-svelte-h":!0}),k(ce)!=="svelte-ub5q43"&&(ce.innerHTML=dt),Pe=i(M),q=d(M,"DIV",{class:!0});var oe=x(q);u(D.$$.fragment,oe),De=i(oe),pe=d(oe,"P",{"data-svelte-h":!0}),k(pe)!=="svelte-121bmd6"&&(pe.textContent=ht),oe.forEach(n),He=i(M),Z=d(M,"DIV",{class:!0});var X=x(Z);u(H.$$.fragment,X),Se=i(X),de=d(X,"P",{"data-svelte-h":!0}),k(de)!=="svelte-1jqtd9a"&&(de.textContent=ft),Le=i(X),u(G.$$.fragment,X),X.forEach(n),M.forEach(n),ve=i(e),u(S.$$.fragment,e),je=i(e),U=d(e,"DIV",{class:!0});var ie=x(U);u(L.$$.fragment,ie),ze=i(ie),he=d(ie,"P",{"data-svelte-h":!0}),k(he)!=="svelte-g9nrp2"&&(he.textContent=mt),ie.forEach(n),xe=i(e),T=d(e,"DIV",{class:!0});var E=x(T);u(z.$$.fragment,E),Ke=i(E),fe=d(E,"P",{"data-svelte-h":!0}),k(fe)!=="svelte-1k6n7qf"&&(fe.innerHTML=ut),Oe=i(E),me=d(E,"P",{"data-svelte-h":!0}),k(me)!=="svelte-1n2zwuf"&&(me.textContent=gt),et=i(E),u(I.$$.fragment,E),E.forEach(n),Je=i(e),u(K.$$.fragment,e),Be=i(e),F=d(e,"DIV",{class:!0});var Ge=x(F);u(O.$$.fragment,Ge),tt=i(Ge),ue=d(Ge,"P",{"data-svelte-h":!0}),k(ue)!=="svelte-38u0u9"&&(ue.innerHTML=_t),Ge.forEach(n),Ze=i(e),j=d(e,"DIV",{class:!0});var we=x(j);u(ee.$$.fragment,we),nt=i(we),ge=d(we,"P",{"data-svelte-h":!0}),k(ge)!=="svelte-1v5ielx"&&(ge.innerHTML=bt),at=i(we),u(R.$$.fragment,we),we.forEach(n),Ue=i(e),u(te.$$.fragment,e),Fe=i(e),W=d(e,"DIV",{class:!0});var Ie=x(W);u(ne.$$.fragment,Ie),st=i(Ie),_e=d(Ie,"P",{"data-svelte-h":!0}),k(_e)!=="svelte-360v39"&&(_e.innerHTML=yt),Ie.forEach(n),We=i(e),v=d(e,"DIV",{class:!0});var Y=x(v);u(ae.$$.fragment,Y),ot=i(Y),be=d(Y,"P",{"data-svelte-h":!0}),k(be)!=="svelte-1p02a6y"&&(be.innerHTML=wt),it=i(Y),ye=d(Y,"P",{"data-svelte-h":!0}),k(ye)!=="svelte-1xnxpcr"&&(ye.innerHTML=kt),lt=i(Y),u(Q.$$.fragment,Y),Y.forEach(n),Xe=i(e),u(se.$$.fragment,e),Ne=i(e),ke=d(e,"P",{}),x(ke).forEach(n),this.h()},h(){J(s,"name","hf:doc:metadata"),J(s,"content",Wt),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),g(h,e,a),c(e,t,a),g(w,e,a),c(e,$e,a),c(e,V,a),c(e,Me,a),g(A,e,a),c(e,Te,a),c(e,C,a),g(P,C,null),r(C,Ye),r(C,le),r(C,Ve),r(C,re),r(C,Ae),r(C,ce),r(C,Pe),r(C,q),g(D,q,null),r(q,De),r(q,pe),r(C,He),r(C,Z),g(H,Z,null),r(Z,Se),r(Z,de),r(Z,Le),g(G,Z,null),c(e,ve,a),g(S,e,a),c(e,je,a),c(e,U,a),g(L,U,null),r(U,ze),r(U,he),c(e,xe,a),c(e,T,a),g(z,T,null),r(T,Ke),r(T,fe),r(T,Oe),r(T,me),r(T,et),g(I,T,null),c(e,Je,a),g(K,e,a),c(e,Be,a),c(e,F,a),g(O,F,null),r(F,tt),r(F,ue),c(e,Ze,a),c(e,j,a),g(ee,j,null),r(j,nt),r(j,ge),r(j,at),g(R,j,null),c(e,Ue,a),g(te,e,a),c(e,Fe,a),c(e,W,a),g(ne,W,null),r(W,st),r(W,_e),c(e,We,a),c(e,v,a),g(ae,v,null),r(v,ot),r(v,be),r(v,it),r(v,ye),r(v,lt),g(Q,v,null),c(e,Xe,a),g(se,e,a),c(e,Ne,a),c(e,ke,a),qe=!0},p(e,[a]){const M={};a&2&&(M.$$scope={dirty:a,ctx:e}),G.$set(M);const oe={};a&2&&(oe.$$scope={dirty:a,ctx:e}),I.$set(oe);const X={};a&2&&(X.$$scope={dirty:a,ctx:e}),R.$set(X);const ie={};a&2&&(ie.$$scope={dirty:a,ctx:e}),Q.$set(ie)},i(e){qe||(_(h.$$.fragment,e),_(w.$$.fragment,e),_(A.$$.fragment,e),_(P.$$.fragment,e),_(D.$$.fragment,e),_(H.$$.fragment,e),_(G.$$.fragment,e),_(S.$$.fragment,e),_(L.$$.fragment,e),_(z.$$.fragment,e),_(I.$$.fragment,e),_(K.$$.fragment,e),_(O.$$.fragment,e),_(ee.$$.fragment,e),_(R.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),_(ae.$$.fragment,e),_(Q.$$.fragment,e),_(se.$$.fragment,e),qe=!0)},o(e){b(h.$$.fragment,e),b(w.$$.fragment,e),b(A.$$.fragment,e),b(P.$$.fragment,e),b(D.$$.fragment,e),b(H.$$.fragment,e),b(G.$$.fragment,e),b(S.$$.fragment,e),b(L.$$.fragment,e),b(z.$$.fragment,e),b(I.$$.fragment,e),b(K.$$.fragment,e),b(O.$$.fragment,e),b(ee.$$.fragment,e),b(R.$$.fragment,e),b(te.$$.fragment,e),b(ne.$$.fragment,e),b(ae.$$.fragment,e),b(Q.$$.fragment,e),b(se.$$.fragment,e),qe=!1},d(e){e&&(n($),n(f),n(l),n(t),n($e),n(V),n(Me),n(Te),n(C),n(ve),n(je),n(U),n(xe),n(T),n(Je),n(Be),n(F),n(Ze),n(j),n(Ue),n(Fe),n(W),n(We),n(v),n(Xe),n(Ne),n(ke)),n(s),y(h,e),y(w,e),y(A,e),y(P),y(D),y(H),y(G),y(S,e),y(L),y(z),y(I),y(K,e),y(O),y(ee),y(R),y(te,e),y(ne),y(ae),y(Q),y(se,e)}}}const Wt='{"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 Xt(B){return $t(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yt extends Mt{constructor(s){super(),Tt(this,s,Xt,Ft,Ct,{})}}export{Yt as component};
