Buckets:
| import{s as At,o as Nt,n as Rt}from"../chunks/scheduler.8c3d61f6.js";import{S as Pt,i as It,g as c,s,r as u,A as Et,h as d,f as a,c as i,j as L,u as _,x as j,k as K,y as p,a as o,v as b,d as y,t as k,w}from"../chunks/index.da70eac4.js";import{D as ft}from"../chunks/Docstring.6b390b9a.js";import{C as Jt}from"../chunks/CodeBlock.00a903b3.js";import{E as Yt}from"../chunks/ExampleCodeBlock.db12be95.js";import{H as ht,E as Ft}from"../chunks/EditOnGithub.1e64e623.js";function Vt(F){let l,J="Example:",f,r,m;return r=new Jt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlkZW9YUGlwZWxpbmUlMkMlMjBQeXJhbWlkQXR0ZW50aW9uQnJvYWRjYXN0Q29uZmlnJTBBJTBBcGlwZSUyMCUzRCUyMENvZ1ZpZGVvWFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJUSFVETSUyRkNvZ1ZpZGVvWC01YiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQWNvbmZpZyUyMCUzRCUyMFB5cmFtaWRBdHRlbnRpb25Ccm9hZGNhc3RDb25maWcoJTBBJTIwJTIwJTIwJTIwc3BhdGlhbF9hdHRlbnRpb25fYmxvY2tfc2tpcF9yYW5nZSUzRDIlMkMlMEElMjAlMjAlMjAlMjBzcGF0aWFsX2F0dGVudGlvbl90aW1lc3RlcF9za2lwX3JhbmdlJTNEKDEwMCUyQyUyMDgwMCklMkMlMEElMjAlMjAlMjAlMjBjdXJyZW50X3RpbWVzdGVwX2NhbGxiYWNrJTNEbGFtYmRhJTNBJTIwcGlwZS5jdXJyZW50X3RpbWVzdGVwJTJDJTBBKSUwQXBpcGUudHJhbnNmb3JtZXIuZW5hYmxlX2NhY2hlKGNvbmZpZyk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXPipeline, PyramidAttentionBroadcastConfig | |
| <span class="hljs-meta">>>> </span>pipe = CogVideoXPipeline.from_pretrained(<span class="hljs-string">"THUDM/CogVideoX-5b"</span>, torch_dtype=torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </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">>>> </span>pipe.transformer.enable_cache(config)`,wrap:!1}}),{c(){l=c("p"),l.textContent=J,f=s(),u(r.$$.fragment)},l(n){l=d(n,"P",{"data-svelte-h":!0}),j(l)!=="svelte-11lpom8"&&(l.textContent=J),f=i(n),_(r.$$.fragment,n)},m(n,h){o(n,l,h),o(n,f,h),b(r,n,h),m=!0},p:Rt,i(n){m||(y(r.$$.fragment,n),m=!0)},o(n){k(r.$$.fragment,n),m=!1},d(n){n&&(a(l),a(f)),w(r,n)}}}function Qt(F){let l,J="Example:",f,r,m;return r=new Jt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlkZW9YUGlwZWxpbmUlMkMlMjBQeXJhbWlkQXR0ZW50aW9uQnJvYWRjYXN0Q29uZmlnJTJDJTIwYXBwbHlfcHlyYW1pZF9hdHRlbnRpb25fYnJvYWRjYXN0JTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGV4cG9ydF90b192aWRlbyUwQSUwQXBpcGUlMjAlM0QlMjBDb2dWaWRlb1hQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyVEhVRE0lMkZDb2dWaWRlb1gtNWIlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFjb25maWclMjAlM0QlMjBQeXJhbWlkQXR0ZW50aW9uQnJvYWRjYXN0Q29uZmlnKCUwQSUyMCUyMCUyMCUyMHNwYXRpYWxfYXR0ZW50aW9uX2Jsb2NrX3NraXBfcmFuZ2UlM0QyJTJDJTBBJTIwJTIwJTIwJTIwc3BhdGlhbF9hdHRlbnRpb25fdGltZXN0ZXBfc2tpcF9yYW5nZSUzRCgxMDAlMkMlMjA4MDApJTJDJTBBJTIwJTIwJTIwJTIwY3VycmVudF90aW1lc3RlcF9jYWxsYmFjayUzRGxhbWJkYSUzQSUyMHBpcGUuY3VycmVudF90aW1lc3RlcCUyQyUwQSklMEFhcHBseV9weXJhbWlkX2F0dGVudGlvbl9icm9hZGNhc3QocGlwZS50cmFuc2Zvcm1lciUyQyUyMGNvbmZpZyk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXPipeline, PyramidAttentionBroadcastConfig, apply_pyramid_attention_broadcast | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> export_to_video | |
| <span class="hljs-meta">>>> </span>pipe = CogVideoXPipeline.from_pretrained(<span class="hljs-string">"THUDM/CogVideoX-5b"</span>, torch_dtype=torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </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">>>> </span>apply_pyramid_attention_broadcast(pipe.transformer, config)`,wrap:!1}}),{c(){l=c("p"),l.textContent=J,f=s(),u(r.$$.fragment)},l(n){l=d(n,"P",{"data-svelte-h":!0}),j(l)!=="svelte-11lpom8"&&(l.textContent=J),f=i(n),_(r.$$.fragment,n)},m(n,h){o(n,l,h),o(n,f,h),b(r,n,h),m=!0},p:Rt,i(n){m||(y(r.$$.fragment,n),m=!0)},o(n){k(r.$$.fragment,n),m=!1},d(n){n&&(a(l),a(f)),w(r,n)}}}function St(F){let l,J,f,r,m,n,h,tt,W,Tt='<a href="https://huggingface.co/papers/2408.12588" rel="nofollow">Pyramid Attention Broadcast</a> from Xuanlei Zhao, Xiaolong Jin, Kai Wang, Yang You.',et,x,$t="Pyramid Attention Broadcast (PAB) is a method that speeds up inference in diffusion models by systematically skipping attention computations between successive inference steps and reusing cached attention states. The attention states are not very different between successive inference steps. The most prominent difference is in the spatial attention blocks, not as much in the temporal attention blocks, and finally the least in the cross attention blocks. Therefore, many cross attention computation blocks can be skipped, followed by the temporal and spatial attention blocks. By combining other techniques like sequence parallelism and classifier-free guidance parallelism, PAB achieves near real-time video generation.",nt,G,Zt='Enable PAB with <a href="/docs/diffusers/pr_10766/en/api/cache#diffusers.PyramidAttentionBroadcastConfig">~PyramidAttentionBroadcastConfig</a> on any pipeline. For some benchmarks, refer to <a href="https://github.com/huggingface/diffusers/pull/9562" rel="nofollow">this</a> pull request.',at,X,st,Y,it,g,R,gt,V,Ct="A class for enable/disabling caching techniques on diffusion models.",ut,Q,vt="Supported caching techniques:",_t,S,Ut='<li><a href="https://huggingface.co/papers/2408.12588" rel="nofollow">Pyramid Attention Broadcast</a></li>',bt,T,A,yt,H,Wt="Enable caching techniques on the model.",kt,C,ot,N,lt,$,P,wt,q,xt="Configuration for Pyramid Attention Broadcast.",rt,M,I,Mt,D,Gt='Apply <a href="https://huggingface.co/papers/2408.12588" rel="nofollow">Pyramid Attention Broadcast</a> to a given pipeline.',Bt,z,Xt=`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.`,jt,v,pt,E,ct,O,dt;return m=new ht({props:{title:"Caching methods",local:"caching-methods",headingTag:"h1"}}),h=new ht({props:{title:"Pyramid Attention Broadcast",local:"pyramid-attention-broadcast",headingTag:"h2"}}),X=new Jt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlkZW9YUGlwZWxpbmUlMkMlMjBQeXJhbWlkQXR0ZW50aW9uQnJvYWRjYXN0Q29uZmlnJTBBJTBBcGlwZSUyMCUzRCUyMENvZ1ZpZGVvWFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJUSFVETSUyRkNvZ1ZpZGVvWC01YiUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpJTBBcGlwZS50byglMjJjdWRhJTIyKSUwQSUwQSUyMyUyMEluY3JlYXNpbmclMjB0aGUlMjB2YWx1ZSUyMG9mJTIwJTYwc3BhdGlhbF9hdHRlbnRpb25fdGltZXN0ZXBfc2tpcF9yYW5nZSU1QjAlNUQlNjAlMjBvciUyMGRlY3JlYXNpbmclMjB0aGUlMjB2YWx1ZSUyMG9mJTBBJTIzJTIwJTYwc3BhdGlhbF9hdHRlbnRpb25fdGltZXN0ZXBfc2tpcF9yYW5nZSU1QjElNUQlNjAlMjB3aWxsJTIwZGVjcmVhc2UlMjB0aGUlMjBpbnRlcnZhbCUyMGluJTIwd2hpY2glMjBweXJhbWlkJTIwYXR0ZW50aW9uJTBBJTIzJTIwYnJvYWRjYXN0JTIwaXMlMjBhY3RpdmUlMkMlMjBsZWFkZXIlMjB0byUyMHNsb3dlciUyMGluZmVyZW5jZSUyMHNwZWVkcy4lMjBIb3dldmVyJTJDJTIwbGFyZ2UlMjBpbnRlcnZhbHMlMjBjYW4lMjBsZWFkJTIwdG8lMEElMjMlMjBwb29yZXIlMjBxdWFsaXR5JTIwb2YlMjBnZW5lcmF0ZWQlMjB2aWRlb3MuJTBBY29uZmlnJTIwJTNEJTIwUHlyYW1pZEF0dGVudGlvbkJyb2FkY2FzdENvbmZpZyglMEElMjAlMjAlMjAlMjBzcGF0aWFsX2F0dGVudGlvbl9ibG9ja19za2lwX3JhbmdlJTNEMiUyQyUwQSUyMCUyMCUyMCUyMHNwYXRpYWxfYXR0ZW50aW9uX3RpbWVzdGVwX3NraXBfcmFuZ2UlM0QoMTAwJTJDJTIwODAwKSUyQyUwQSUyMCUyMCUyMCUyMGN1cnJlbnRfdGltZXN0ZXBfY2FsbGJhY2slM0RsYW1iZGElM0ElMjBwaXBlLmN1cnJlbnRfdGltZXN0ZXAlMkMlMEEpJTBBcGlwZS50cmFuc2Zvcm1lci5lbmFibGVfY2FjaGUoY29uZmlnKQ==",highlighted:`<span class="hljs-keyword">import</span> torch | |
| <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXPipeline, PyramidAttentionBroadcastConfig | |
| pipe = CogVideoXPipeline.from_pretrained(<span class="hljs-string">"THUDM/CogVideoX-5b"</span>, torch_dtype=torch.bfloat16) | |
| pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-comment"># Increasing the value of \`spatial_attention_timestep_skip_range[0]\` or decreasing the value of</span> | |
| <span class="hljs-comment"># \`spatial_attention_timestep_skip_range[1]\` will decrease the interval in which pyramid attention</span> | |
| <span class="hljs-comment"># broadcast is active, leader to slower inference speeds. However, large intervals can lead to</span> | |
| <span class="hljs-comment"># poorer quality of generated videos.</span> | |
| config = PyramidAttentionBroadcastConfig( | |
| spatial_attention_block_skip_range=<span class="hljs-number">2</span>, | |
| spatial_attention_timestep_skip_range=(<span class="hljs-number">100</span>, <span class="hljs-number">800</span>), | |
| current_timestep_callback=<span class="hljs-keyword">lambda</span>: pipe.current_timestep, | |
| ) | |
| pipe.transformer.enable_cache(config)`,wrap:!1}}),Y=new ht({props:{title:"CacheMixin",local:"diffusers.CacheMixin",headingTag:"h3"}}),R=new ft({props:{name:"class diffusers.CacheMixin",anchor:"diffusers.CacheMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_10766/src/diffusers/models/cache_utils.py#L21"}}),A=new ft({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>) — | |
| The configuration for applying the caching technique. Currently supported caching techniques are:<ul> | |
| <li><a href="/docs/diffusers/pr_10766/en/api/cache#diffusers.PyramidAttentionBroadcastConfig">PyramidAttentionBroadcastConfig</a></li> | |
| </ul>`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/vr_10766/src/diffusers/models/cache_utils.py#L35"}}),C=new Yt({props:{anchor:"diffusers.CacheMixin.enable_cache.example",$$slots:{default:[Vt]},$$scope:{ctx:F}}}),N=new ht({props:{title:"PyramidAttentionBroadcastConfig",local:"diffusers.PyramidAttentionBroadcastConfig",headingTag:"h3"}}),P=new ft({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')"},{name:"temporal_attention_block_identifiers",val:": typing.Tuple[str, ...] = ('temporal_transformer_blocks',)"},{name:"cross_attention_block_identifiers",val:": typing.Tuple[str, ...] = ('blocks', 'transformer_blocks')"},{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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>, defaults to <code>("blocks", "transformer_blocks")</code>) — | |
| 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>, defaults to <code>("temporal_transformer_blocks",)</code>) — | |
| 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>, defaults to <code>("blocks", "transformer_blocks")</code>) — | |
| 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/vr_10766/src/diffusers/hooks/pyramid_attention_broadcast.py#L36"}}),I=new ft({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>) — | |
| 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>) — | |
| The configuration to use for Pyramid Attention Broadcast.`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/vr_10766/src/diffusers/hooks/pyramid_attention_broadcast.py#L178"}}),v=new Yt({props:{anchor:"diffusers.apply_pyramid_attention_broadcast.example",$$slots:{default:[Qt]},$$scope:{ctx:F}}}),E=new Ft({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/cache.md"}}),{c(){l=c("meta"),J=s(),f=c("p"),r=s(),u(m.$$.fragment),n=s(),u(h.$$.fragment),tt=s(),W=c("p"),W.innerHTML=Tt,et=s(),x=c("p"),x.textContent=$t,nt=s(),G=c("p"),G.innerHTML=Zt,at=s(),u(X.$$.fragment),st=s(),u(Y.$$.fragment),it=s(),g=c("div"),u(R.$$.fragment),gt=s(),V=c("p"),V.textContent=Ct,ut=s(),Q=c("p"),Q.textContent=vt,_t=s(),S=c("ul"),S.innerHTML=Ut,bt=s(),T=c("div"),u(A.$$.fragment),yt=s(),H=c("p"),H.textContent=Wt,kt=s(),u(C.$$.fragment),ot=s(),u(N.$$.fragment),lt=s(),$=c("div"),u(P.$$.fragment),wt=s(),q=c("p"),q.textContent=xt,rt=s(),M=c("div"),u(I.$$.fragment),Mt=s(),D=c("p"),D.innerHTML=Gt,Bt=s(),z=c("p"),z.textContent=Xt,jt=s(),u(v.$$.fragment),pt=s(),u(E.$$.fragment),ct=s(),O=c("p"),this.h()},l(t){const e=Et("svelte-u9bgzb",document.head);l=d(e,"META",{name:!0,content:!0}),e.forEach(a),J=i(t),f=d(t,"P",{}),L(f).forEach(a),r=i(t),_(m.$$.fragment,t),n=i(t),_(h.$$.fragment,t),tt=i(t),W=d(t,"P",{"data-svelte-h":!0}),j(W)!=="svelte-pxfzru"&&(W.innerHTML=Tt),et=i(t),x=d(t,"P",{"data-svelte-h":!0}),j(x)!=="svelte-wme9w7"&&(x.textContent=$t),nt=i(t),G=d(t,"P",{"data-svelte-h":!0}),j(G)!=="svelte-tx40d4"&&(G.innerHTML=Zt),at=i(t),_(X.$$.fragment,t),st=i(t),_(Y.$$.fragment,t),it=i(t),g=d(t,"DIV",{class:!0});var B=L(g);_(R.$$.fragment,B),gt=i(B),V=d(B,"P",{"data-svelte-h":!0}),j(V)!=="svelte-1jkm0k7"&&(V.textContent=Ct),ut=i(B),Q=d(B,"P",{"data-svelte-h":!0}),j(Q)!=="svelte-x25y7s"&&(Q.textContent=vt),_t=i(B),S=d(B,"UL",{"data-svelte-h":!0}),j(S)!=="svelte-y7yhlf"&&(S.innerHTML=Ut),bt=i(B),T=d(B,"DIV",{class:!0});var Z=L(T);_(A.$$.fragment,Z),yt=i(Z),H=d(Z,"P",{"data-svelte-h":!0}),j(H)!=="svelte-1jqtd9a"&&(H.textContent=Wt),kt=i(Z),_(C.$$.fragment,Z),Z.forEach(a),B.forEach(a),ot=i(t),_(N.$$.fragment,t),lt=i(t),$=d(t,"DIV",{class:!0});var mt=L($);_(P.$$.fragment,mt),wt=i(mt),q=d(mt,"P",{"data-svelte-h":!0}),j(q)!=="svelte-g9nrp2"&&(q.textContent=xt),mt.forEach(a),rt=i(t),M=d(t,"DIV",{class:!0});var U=L(M);_(I.$$.fragment,U),Mt=i(U),D=d(U,"P",{"data-svelte-h":!0}),j(D)!=="svelte-1k6n7qf"&&(D.innerHTML=Gt),Bt=i(U),z=d(U,"P",{"data-svelte-h":!0}),j(z)!=="svelte-1n2zwuf"&&(z.textContent=Xt),jt=i(U),_(v.$$.fragment,U),U.forEach(a),pt=i(t),_(E.$$.fragment,t),ct=i(t),O=d(t,"P",{}),L(O).forEach(a),this.h()},h(){K(l,"name","hf:doc:metadata"),K(l,"content",Ht),K(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),K(g,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),K($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),K(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,e){p(document.head,l),o(t,J,e),o(t,f,e),o(t,r,e),b(m,t,e),o(t,n,e),b(h,t,e),o(t,tt,e),o(t,W,e),o(t,et,e),o(t,x,e),o(t,nt,e),o(t,G,e),o(t,at,e),b(X,t,e),o(t,st,e),b(Y,t,e),o(t,it,e),o(t,g,e),b(R,g,null),p(g,gt),p(g,V),p(g,ut),p(g,Q),p(g,_t),p(g,S),p(g,bt),p(g,T),b(A,T,null),p(T,yt),p(T,H),p(T,kt),b(C,T,null),o(t,ot,e),b(N,t,e),o(t,lt,e),o(t,$,e),b(P,$,null),p($,wt),p($,q),o(t,rt,e),o(t,M,e),b(I,M,null),p(M,Mt),p(M,D),p(M,Bt),p(M,z),p(M,jt),b(v,M,null),o(t,pt,e),b(E,t,e),o(t,ct,e),o(t,O,e),dt=!0},p(t,[e]){const B={};e&2&&(B.$$scope={dirty:e,ctx:t}),C.$set(B);const Z={};e&2&&(Z.$$scope={dirty:e,ctx:t}),v.$set(Z)},i(t){dt||(y(m.$$.fragment,t),y(h.$$.fragment,t),y(X.$$.fragment,t),y(Y.$$.fragment,t),y(R.$$.fragment,t),y(A.$$.fragment,t),y(C.$$.fragment,t),y(N.$$.fragment,t),y(P.$$.fragment,t),y(I.$$.fragment,t),y(v.$$.fragment,t),y(E.$$.fragment,t),dt=!0)},o(t){k(m.$$.fragment,t),k(h.$$.fragment,t),k(X.$$.fragment,t),k(Y.$$.fragment,t),k(R.$$.fragment,t),k(A.$$.fragment,t),k(C.$$.fragment,t),k(N.$$.fragment,t),k(P.$$.fragment,t),k(I.$$.fragment,t),k(v.$$.fragment,t),k(E.$$.fragment,t),dt=!1},d(t){t&&(a(J),a(f),a(r),a(n),a(tt),a(W),a(et),a(x),a(nt),a(G),a(at),a(st),a(it),a(g),a(ot),a(lt),a($),a(rt),a(M),a(pt),a(ct),a(O)),a(l),w(m,t),w(h,t),w(X,t),w(Y,t),w(R),w(A),w(C),w(N,t),w(P),w(I),w(v),w(E,t)}}}const Ht='{"title":"Caching methods","local":"caching-methods","sections":[{"title":"Pyramid Attention Broadcast","local":"pyramid-attention-broadcast","sections":[{"title":"CacheMixin","local":"diffusers.CacheMixin","sections":[],"depth":3},{"title":"PyramidAttentionBroadcastConfig","local":"diffusers.PyramidAttentionBroadcastConfig","sections":[],"depth":3}],"depth":2}],"depth":1}';function qt(F){return Nt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ee extends Pt{constructor(l){super(),It(this,l,qt,St,At,{})}}export{ee as component}; | |
Xet Storage Details
- Size:
- 23 kB
- Xet hash:
- b947175923437395194d2524e640cf7c4532eea4c1e1b582ad4d4a5932f09760
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.