Buckets:
| import{s as ha,o as ma,n as Se}from"../chunks/scheduler.53228c21.js";import{S as ua,i as ga,e as p,s as o,c as m,h as _a,a as d,d as a,b as i,f as T,g as u,j as w,k as x,l,m as c,n as g,t as _,o as b,p as y}from"../chunks/index.cac5d66a.js";import{C as ba}from"../chunks/CopyLLMTxtMenu.0ef49226.js";import{D as B}from"../chunks/Docstring.9de32ff4.js";import{C as Ae}from"../chunks/CodeBlock.606cbaf4.js";import{E as Ye}from"../chunks/ExampleCodeBlock.e72ea5c6.js";import{H as ke,E as ya}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.48d5cb47.js";function Ca(j){let s,k="Example:",h,r,f;return r=new Ae({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)`,lang:"python",wrap:!1}}),{c(){s=p("p"),s.textContent=k,h=o(),m(r.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-11lpom8"&&(s.textContent=k),h=i(t),u(r.$$.fragment,t)},m(t,C){c(t,s,C),c(t,h,C),g(r,t,C),f=!0},p:Se,i(t){f||(_(r.$$.fragment,t),f=!0)},o(t){b(r.$$.fragment,t),f=!1},d(t){t&&(a(s),a(h)),y(r,t)}}}function wa(j){let s,k="Example:",h,r,f;return r=new Ae({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)`,lang:"python",wrap:!1}}),{c(){s=p("p"),s.textContent=k,h=o(),m(r.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-11lpom8"&&(s.textContent=k),h=i(t),u(r.$$.fragment,t)},m(t,C){c(t,s,C),c(t,h,C),g(r,t,C),f=!0},p:Se,i(t){f||(_(r.$$.fragment,t),f=!0)},o(t){b(r.$$.fragment,t),f=!1},d(t){t&&(a(s),a(h)),y(r,t)}}}function ka(j){let s,k="Example:",h,r,f;return r=new Ae({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlkZW9YUGlwZWxpbmUlMkMlMjBGYXN0ZXJDYWNoZUNvbmZpZyUyQyUyMGFwcGx5X2Zhc3Rlcl9jYWNoZSUwQSUwQXBpcGUlMjAlM0QlMjBDb2dWaWRlb1hQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyVEhVRE0lMkZDb2dWaWRlb1gtNWIlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KSUwQXBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFjb25maWclMjAlM0QlMjBGYXN0ZXJDYWNoZUNvbmZpZyglMEElMjAlMjAlMjAlMjBzcGF0aWFsX2F0dGVudGlvbl9ibG9ja19za2lwX3JhbmdlJTNEMiUyQyUwQSUyMCUyMCUyMCUyMHNwYXRpYWxfYXR0ZW50aW9uX3RpbWVzdGVwX3NraXBfcmFuZ2UlM0QoLTElMkMlMjA2ODEpJTJDJTBBJTIwJTIwJTIwJTIwbG93X2ZyZXF1ZW5jeV93ZWlnaHRfdXBkYXRlX3RpbWVzdGVwX3JhbmdlJTNEKDk5JTJDJTIwNjQxKSUyQyUwQSUyMCUyMCUyMCUyMGhpZ2hfZnJlcXVlbmN5X3dlaWdodF91cGRhdGVfdGltZXN0ZXBfcmFuZ2UlM0QoLTElMkMlMjAzMDEpJTJDJTBBJTIwJTIwJTIwJTIwc3BhdGlhbF9hdHRlbnRpb25fYmxvY2tfaWRlbnRpZmllcnMlM0QlNUIlMjJ0cmFuc2Zvcm1lcl9ibG9ja3MlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjBhdHRlbnRpb25fd2VpZ2h0X2NhbGxiYWNrJTNEbGFtYmRhJTIwXyUzQSUyMDAuMyUyQyUwQSUyMCUyMCUyMCUyMHRlbnNvcl9mb3JtYXQlM0QlMjJCRkNIVyUyMiUyQyUwQSklMEFhcHBseV9mYXN0ZXJfY2FjaGUocGlwZS50cmFuc2Zvcm1lciUyQyUyMGNvbmZpZyk=",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, FasterCacheConfig, apply_faster_cache | |
| <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 = 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">"transformer_blocks"</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">"BFCHW"</span>, | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>apply_faster_cache(pipe.transformer, config)`,lang:"python",wrap:!1}}),{c(){s=p("p"),s.textContent=k,h=o(),m(r.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-11lpom8"&&(s.textContent=k),h=i(t),u(r.$$.fragment,t)},m(t,C){c(t,s,C),c(t,h,C),g(r,t,C),f=!0},p:Se,i(t){f||(_(r.$$.fragment,t),f=!0)},o(t){b(r.$$.fragment,t),f=!1},d(t){t&&(a(s),a(h)),y(r,t)}}}function $a(j){let s,k="Example:",h,r,f;return r=new Ae({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwQ29nVmlldzRQaXBlbGluZSUwQWZyb20lMjBkaWZmdXNlcnMuaG9va3MlMjBpbXBvcnQlMjBhcHBseV9maXJzdF9ibG9ja19jYWNoZSUyQyUyMEZpcnN0QmxvY2tDYWNoZUNvbmZpZyUwQSUwQXBpcGUlMjAlM0QlMjBDb2dWaWV3NFBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJUSFVETSUyRkNvZ1ZpZXc0LTZCJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiklMEFwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBYXBwbHlfZmlyc3RfYmxvY2tfY2FjaGUocGlwZS50cmFuc2Zvcm1lciUyQyUyMEZpcnN0QmxvY2tDYWNoZUNvbmZpZyh0aHJlc2hvbGQlM0QwLjIpKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkElMjBwaG90byUyMG9mJTIwYW4lMjBhc3Ryb25hdXQlMjByaWRpbmclMjBhJTIwaG9yc2UlMjBvbiUyMG1hcnMlMjIlMEFpbWFnZSUyMCUzRCUyMHBpcGUocHJvbXB0JTJDJTIwZ2VuZXJhdG9yJTNEdG9yY2guR2VuZXJhdG9yKCkubWFudWFsX3NlZWQoNDIpKS5pbWFnZXMlNUIwJTVEJTBBaW1hZ2Uuc2F2ZSglMjJvdXRwdXQucG5nJTIyKQ==",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> CogView4Pipeline | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> diffusers.hooks <span class="hljs-keyword">import</span> apply_first_block_cache, FirstBlockCacheConfig | |
| <span class="hljs-meta">>>> </span>pipe = CogView4Pipeline.from_pretrained(<span class="hljs-string">"THUDM/CogView4-6B"</span>, torch_dtype=torch.bfloat16) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>apply_first_block_cache(pipe.transformer, FirstBlockCacheConfig(threshold=<span class="hljs-number">0.2</span>)) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"A photo of an astronaut riding a horse on mars"</span> | |
| <span class="hljs-meta">>>> </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">>>> </span>image.save(<span class="hljs-string">"output.png"</span>)`,lang:"python",wrap:!1}}),{c(){s=p("p"),s.textContent=k,h=o(),m(r.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-11lpom8"&&(s.textContent=k),h=i(t),u(r.$$.fragment,t)},m(t,C){c(t,s,C),c(t,h,C),g(r,t,C),f=!0},p:Se,i(t){f||(_(r.$$.fragment,t),f=!0)},o(t){b(r.$$.fragment,t),f=!1},d(t){t&&(a(s),a(h)),y(r,t)}}}function Ma(j){let s,k="Example of inactive and active usage:",h,r,f;return r=new Ae({props:{code:"ZGVmJTIwZm9yd2FyZCh4KSUzQSUwQSUyMCUyMCUyMCUyMHglMjAlM0QlMjBzZWxmLm1vZHVsZTEoeCklMjAlMjAlMjMlMjBpbmFjdGl2ZSUyMG1vZHVsZSUzQSUyMHJldHVybnMlMjB6ZXJvcyUyMHRlbnNvciUyMGJhc2VkJTIwb24lMjBzaGFwZSUyMHJlY29yZGVkJTIwZHVyaW5nJTIwZnVsbCUyMGNvbXB1dGUlMEElMjAlMjAlMjAlMjB4JTIwJTNEJTIwc2VsZi5tb2R1bGUyKHgpJTIwJTIwJTIzJTIwYWN0aXZlJTIwbW9kdWxlJTNBJTIwY2FjaGVzJTIwb3V0cHV0JTIwaGVyZSUyQyUyMGF2b2lkaW5nJTIwcmVjb21wdXRhdGlvbiUyMG9mJTIwcHJpb3IlMjBzdGVwcyUwQSUyMCUyMCUyMCUyMHJldHVybiUyMHg=",highlighted:`<span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">x</span>): | |
| x = self.module1(x) <span class="hljs-comment"># inactive module: returns zeros tensor based on shape recorded during full compute</span> | |
| x = self.module2(x) <span class="hljs-comment"># active module: caches output here, avoiding recomputation of prior steps</span> | |
| <span class="hljs-keyword">return</span> x`,lang:"py",wrap:!1}}),{c(){s=p("p"),s.textContent=k,h=o(),m(r.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-ld79go"&&(s.textContent=k),h=i(t),u(r.$$.fragment,t)},m(t,C){c(t,s,C),c(t,h,C),g(r,t,C),f=!0},p:Se,i(t){f||(_(r.$$.fragment,t),f=!0)},o(t){b(r.$$.fragment,t),f=!1},d(t){t&&(a(s),a(h)),y(r,t)}}}function va(j){let s,k="Example:",h,r,f;return r=new Ae({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRmx1eFBpcGVsaW5lJTJDJTIwVGF5bG9yU2VlckNhY2hlQ29uZmlnJTBBJTBBcGlwZSUyMCUzRCUyMEZsdXhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYmxhY2stZm9yZXN0LWxhYnMlMkZGTFVYLjEtZGV2JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUyQyUwQSklMEFwaXBlLnRvKCUyMmN1ZGElMjIpJTBBJTBBY29uZmlnJTIwJTNEJTIwVGF5bG9yU2VlckNhY2hlQ29uZmlnKCUwQSUyMCUyMCUyMCUyMGNhY2hlX2ludGVydmFsJTNENSUyQyUwQSUyMCUyMCUyMCUyMG1heF9vcmRlciUzRDElMkMlMEElMjAlMjAlMjAlMjBkaXNhYmxlX2NhY2hlX2JlZm9yZV9zdGVwJTNEMyUyQyUwQSUyMCUyMCUyMCUyMHRheWxvcl9mYWN0b3JzX2R0eXBlJTNEdG9yY2guZmxvYXQzMiUyQyUwQSklMEFwaXBlLnRyYW5zZm9ybWVyLmVuYWJsZV9jYWNoZShjb25maWcp",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> FluxPipeline, TaylorSeerCacheConfig | |
| <span class="hljs-meta">>>> </span>pipe = FluxPipeline.from_pretrained( | |
| <span class="hljs-meta">... </span> <span class="hljs-string">"black-forest-labs/FLUX.1-dev"</span>, | |
| <span class="hljs-meta">... </span> torch_dtype=torch.bfloat16, | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe.to(<span class="hljs-string">"cuda"</span>) | |
| <span class="hljs-meta">>>> </span>config = TaylorSeerCacheConfig( | |
| <span class="hljs-meta">... </span> cache_interval=<span class="hljs-number">5</span>, | |
| <span class="hljs-meta">... </span> max_order=<span class="hljs-number">1</span>, | |
| <span class="hljs-meta">... </span> disable_cache_before_step=<span class="hljs-number">3</span>, | |
| <span class="hljs-meta">... </span> taylor_factors_dtype=torch.float32, | |
| <span class="hljs-meta">... </span>) | |
| <span class="hljs-meta">>>> </span>pipe.transformer.enable_cache(config)`,lang:"python",wrap:!1}}),{c(){s=p("p"),s.textContent=k,h=o(),m(r.$$.fragment)},l(t){s=d(t,"P",{"data-svelte-h":!0}),w(s)!=="svelte-11lpom8"&&(s.textContent=k),h=i(t),u(r.$$.fragment,t)},m(t,C){c(t,s,C),c(t,h,C),g(r,t,C),f=!0},p:Se,i(t){f||(_(r.$$.fragment,t),f=!0)},o(t){b(r.$$.fragment,t),f=!1},d(t){t&&(a(s),a(h)),y(r,t)}}}function Ta(j){let s,k,h,r,f,t,C,Pe,K,At="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.",De,O,Le,$,ee,bt,$e,Ht="A class for enable/disabling caching techniques on diffusion models.",yt,Me,Pt="Supported caching techniques:",Ct,ve,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>',wt,R,te,kt,Te,Lt="Context manager that provides additional methods for cache management.",$t,I,ae,Mt,xe,zt="Enable caching techniques on the model.",vt,Y,ze,ne,Ke,W,se,Tt,je,Kt="Configuration for Pyramid Attention Broadcast.",Oe,J,oe,xt,Je,Ot='Apply <a href="https://huggingface.co/papers/2408.12588" rel="nofollow">Pyramid Attention Broadcast</a> to a given pipeline.',jt,Ue,ea=`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,S,et,ie,tt,X,re,Ut,Ze,ta='Configuration for <a href="https://huggingface.co/papers/2410.19355" rel="nofollow">FasterCache</a>.',at,F,le,Zt,Be,aa='Applies <a href="https://huggingface.co/papers/2410.19355" rel="nofollow">FasterCache</a> to a given pipeline.',Bt,A,nt,ce,st,V,pe,Ft,Fe,na=`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>.`,ot,U,de,Nt,Ne,sa=`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,Ie,oa=`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.`,Gt,H,it,fe,rt,M,he,Wt,Ge,ia='Configuration for TaylorSeer cache. See: <a href="https://huggingface.co/papers/2503.06923" rel="nofollow">https://huggingface.co/papers/2503.06923</a>',Xt,We,ra="Notes:",Vt,Xe,la="<li>Patterns are matched using <code>re.fullmatch</code> on the module name.</li> <li>If <code>skip_predict_identifiers</code> or <code>cache_identifiers</code> are provided, only matching modules are hooked.</li> <li>If neither is provided, all attention-like modules are hooked by default.</li>",qt,P,lt,Z,me,Et,Ve,ca="Applies the TaylorSeer cache to a given pipeline (typically the transformer / UNet).",Qt,qe,pa=`This function hooks selected modules in the model to enable caching or skipping based on the provided | |
| configuration, reducing redundant computations in diffusion denoising loops.`,Rt,D,ct,ue,pt,q,ge,Yt,Ee,da='Configuration for <a href="https://github.com/Zehong-Ma/MagCache" rel="nofollow">MagCache</a>.',dt,E,_e,St,Qe,fa="Applies MagCache to a given module (typically a Transformer).",ft,be,ht,He,mt;return f=new ba({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),C=new ke({props:{title:"Caching methods",local:"caching-methods",headingTag:"h1"}}),O=new ke({props:{title:"CacheMixin",local:"diffusers.CacheMixin",headingTag:"h2"}}),ee=new B({props:{name:"class diffusers.CacheMixin",anchor:"diffusers.CacheMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/models/cache_utils.py#L23"}}),te=new B({props:{name:"cache_context",anchor:"diffusers.CacheMixin.cache_context",parameters:[{name:"name",val:": str"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/models/cache_utils.py#L154"}}),ae=new B({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>PyramidAttentionBroadcastConfig | FasterCacheConfig | FirstBlockCacheConfig | TextKVCacheConfig</code>) — | |
| The configuration for applying the caching technique. Currently supported caching techniques are: | |
| <ul> | |
| <li><a href="/docs/diffusers/pr_13921/en/api/cache#diffusers.PyramidAttentionBroadcastConfig">PyramidAttentionBroadcastConfig</a></li> | |
| <li><a href="/docs/diffusers/pr_13921/en/api/cache#diffusers.FasterCacheConfig">FasterCacheConfig</a></li> | |
| <li><a href="/docs/diffusers/pr_13921/en/api/cache#diffusers.FirstBlockCacheConfig">FirstBlockCacheConfig</a></li> | |
| <li><code>TextKVCacheConfig</code></li> | |
| </ul>`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/models/cache_utils.py#L39"}}),Y=new Ye({props:{anchor:"diffusers.CacheMixin.enable_cache.example",$$slots:{default:[Ca]},$$scope:{ctx:j}}}),ne=new ke({props:{title:"PyramidAttentionBroadcastConfig",local:"diffusers.PyramidAttentionBroadcastConfig",headingTag:"h2"}}),se=new B({props:{name:"class diffusers.PyramidAttentionBroadcastConfig",anchor:"diffusers.PyramidAttentionBroadcastConfig",parameters:[{name:"spatial_attention_block_skip_range",val:": int | None = None"},{name:"temporal_attention_block_skip_range",val:": int | None = None"},{name:"cross_attention_block_skip_range",val:": int | None = None"},{name:"spatial_attention_timestep_skip_range",val:": tuple = (100, 800)"},{name:"temporal_attention_timestep_skip_range",val:": tuple = (100, 800)"},{name:"cross_attention_timestep_skip_range",val:": tuple = (100, 800)"},{name:"spatial_attention_block_identifiers",val:": tuple = ('blocks', 'transformer_blocks', 'single_transformer_blocks', 'layers', 'visual_transformer_blocks')"},{name:"temporal_attention_block_identifiers",val:": tuple = ('temporal_transformer_blocks',)"},{name:"cross_attention_block_identifiers",val:": tuple = ('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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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_13921/src/diffusers/hooks/pyramid_attention_broadcast.py#L40"}}),oe=new B({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>PyramidAttentionBroadcastConfig | None</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_13921/src/diffusers/hooks/pyramid_attention_broadcast.py#L181"}}),S=new Ye({props:{anchor:"diffusers.apply_pyramid_attention_broadcast.example",$$slots:{default:[wa]},$$scope:{ctx:j}}}),ie=new ke({props:{title:"FasterCacheConfig",local:"diffusers.FasterCacheConfig",headingTag:"h2"}}),re=new B({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:": int | None = None"},{name:"spatial_attention_timestep_skip_range",val:": tuple = (-1, 681)"},{name:"temporal_attention_timestep_skip_range",val:": tuple = (-1, 681)"},{name:"low_frequency_weight_update_timestep_range",val:": tuple = (99, 901)"},{name:"high_frequency_weight_update_timestep_range",val:": tuple = (-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:": tuple = (-1, 641)"},{name:"spatial_attention_block_identifiers",val:": tuple = ('^blocks.*attn', '^transformer_blocks.*attn', '^single_transformer_blocks.*attn')"},{name:"temporal_attention_block_identifiers",val:": tuple = ('^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:": list = ('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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>("blocks.*attn1", "transformer_blocks.*attn1", "single_transformer_blocks.*attn1")</code>) — | |
| 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>("temporal_transformer_blocks.*attn1",)</code>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>"BCFHW"</code>) — | |
| The format of the input tensors. This should be one of <code>"BCFHW"</code>, <code>"BFCHW"</code>, or <code>"BCHW"</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>) — | |
| 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>("hidden_states", "encoder_hidden_states", "timestep", "attention_mask", "encoder_attention_mask")</code>) — | |
| 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/vr_13921/src/diffusers/hooks/faster_cache.py#L50"}}),le=new B({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>) — | |
| 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>) — | |
| The configuration to use for FasterCache.`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/hooks/faster_cache.py#L486"}}),A=new Ye({props:{anchor:"diffusers.apply_faster_cache.example",$$slots:{default:[ka]},$$scope:{ctx:j}}}),ce=new ke({props:{title:"FirstBlockCacheConfig",local:"diffusers.FirstBlockCacheConfig",headingTag:"h2"}}),pe=new B({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>) — | |
| 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/vr_13921/src/diffusers/hooks/first_block_cache.py#L33"}}),de=new B({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>) — | |
| 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>) — | |
| The configuration to use for applying the FBCache method.`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/hooks/first_block_cache.py#L193"}}),H=new Ye({props:{anchor:"diffusers.apply_first_block_cache.example",$$slots:{default:[$a]},$$scope:{ctx:j}}}),fe=new ke({props:{title:"TaylorSeerCacheConfig",local:"diffusers.TaylorSeerCacheConfig",headingTag:"h2"}}),he=new B({props:{name:"class diffusers.TaylorSeerCacheConfig",anchor:"diffusers.TaylorSeerCacheConfig",parameters:[{name:"cache_interval",val:": int = 5"},{name:"disable_cache_before_step",val:": int = 3"},{name:"disable_cache_after_step",val:": int | None = None"},{name:"max_order",val:": int = 1"},{name:"taylor_factors_dtype",val:": torch.dtype | None = torch.bfloat16"},{name:"skip_predict_identifiers",val:": list[str] | None = None"},{name:"cache_identifiers",val:": list[str] | None = None"},{name:"use_lite_mode",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.TaylorSeerCacheConfig.cache_interval",description:`<strong>cache_interval</strong> (<code>int</code>, defaults to <code>5</code>) — | |
| The interval between full computation steps. After a full computation, the cached (predicted) outputs are | |
| reused for this many subsequent denoising steps before refreshing with a new full forward pass.`,name:"cache_interval"},{anchor:"diffusers.TaylorSeerCacheConfig.disable_cache_before_step",description:`<strong>disable_cache_before_step</strong> (<code>int</code>, defaults to <code>3</code>) — | |
| The denoising step index before which caching is disabled, meaning full computation is performed for the | |
| initial steps (0 to disable_cache_before_step - 1) to gather data for Taylor series approximations. During | |
| these steps, Taylor factors are updated, but caching/predictions are not applied. Caching begins at this | |
| step.`,name:"disable_cache_before_step"},{anchor:"diffusers.TaylorSeerCacheConfig.disable_cache_after_step",description:`<strong>disable_cache_after_step</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| The denoising step index after which caching is disabled. If set, for steps >= this value, all modules run | |
| full computations without predictions or state updates, ensuring accuracy in later stages if needed.`,name:"disable_cache_after_step"},{anchor:"diffusers.TaylorSeerCacheConfig.max_order",description:`<strong>max_order</strong> (<code>int</code>, defaults to <code>1</code>) — | |
| The highest order in the Taylor series expansion for approximating module outputs. Higher orders provide | |
| better approximations but increase computation and memory usage.`,name:"max_order"},{anchor:"diffusers.TaylorSeerCacheConfig.taylor_factors_dtype",description:`<strong>taylor_factors_dtype</strong> (<code>torch.dtype</code>, defaults to <code>torch.bfloat16</code>) — | |
| Data type used for storing and computing Taylor series factors. Lower precision reduces memory but may | |
| affect stability; higher precision improves accuracy at the cost of more memory.`,name:"taylor_factors_dtype"},{anchor:"diffusers.TaylorSeerCacheConfig.skip_predict_identifiers",description:`<strong>skip_predict_identifiers</strong> (<code>list[str]</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| Regex patterns (using <code>re.fullmatch</code>) for module names to place as “skip” in “cache” mode. In this mode, | |
| the module computes fully during initial or refresh steps but returns a zero tensor (matching recorded | |
| shape) during prediction steps to skip computation cheaply.`,name:"skip_predict_identifiers"},{anchor:"diffusers.TaylorSeerCacheConfig.cache_identifiers",description:`<strong>cache_identifiers</strong> (<code>list[str]</code>, <em>optional</em>, defaults to <code>None</code>) — | |
| Regex patterns (using <code>re.fullmatch</code>) for module names to place in Taylor-series caching mode, where | |
| outputs are approximated and cached for reuse.`,name:"cache_identifiers"},{anchor:"diffusers.TaylorSeerCacheConfig.use_lite_mode",description:`<strong>use_lite_mode</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Enables a lightweight TaylorSeer variant that minimizes memory usage by applying predefined patterns for | |
| skipping and caching (e.g., skipping blocks and caching projections). This overrides any custom | |
| <code>inactive_identifiers</code> or <code>active_identifiers</code>.`,name:"use_lite_mode"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/hooks/taylorseer_cache.py#L26"}}),P=new Ye({props:{anchor:"diffusers.TaylorSeerCacheConfig.example",$$slots:{default:[Ma]},$$scope:{ctx:j}}}),me=new B({props:{name:"diffusers.apply_taylorseer_cache",anchor:"diffusers.apply_taylorseer_cache",parameters:[{name:"module",val:": Module"},{name:"config",val:": TaylorSeerCacheConfig"}],parametersDescription:[{anchor:"diffusers.apply_taylorseer_cache.module",description:"<strong>module</strong> (torch.nn.Module) — The model subtree to apply the hooks to.",name:"module"},{anchor:"diffusers.apply_taylorseer_cache.config",description:"<strong>config</strong> (TaylorSeerCacheConfig) — Configuration for the cache.",name:"config"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/hooks/taylorseer_cache.py#L258"}}),D=new Ye({props:{anchor:"diffusers.apply_taylorseer_cache.example",$$slots:{default:[va]},$$scope:{ctx:j}}}),ue=new ke({props:{title:"MagCacheConfig",local:"diffusers.MagCacheConfig",headingTag:"h2"}}),ge=new B({props:{name:"class diffusers.MagCacheConfig",anchor:"diffusers.MagCacheConfig",parameters:[{name:"threshold",val:": float = 0.06"},{name:"max_skip_steps",val:": int = 3"},{name:"retention_ratio",val:": float = 0.2"},{name:"num_inference_steps",val:": int = 28"},{name:"mag_ratios",val:": typing.Union[torch.Tensor, typing.List[float], NoneType] = None"},{name:"calibrate",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.MagCacheConfig.threshold",description:`<strong>threshold</strong> (<code>float</code>, defaults to <code>0.06</code>) — | |
| The threshold for the accumulated error. If the accumulated error is below this threshold, the block | |
| computation is skipped. A higher threshold allows for more aggressive skipping (faster) but may degrade | |
| quality.`,name:"threshold"},{anchor:"diffusers.MagCacheConfig.max_skip_steps",description:`<strong>max_skip_steps</strong> (<code>int</code>, defaults to <code>3</code>) — | |
| The maximum number of consecutive steps that can be skipped (K in the paper).`,name:"max_skip_steps"},{anchor:"diffusers.MagCacheConfig.retention_ratio",description:`<strong>retention_ratio</strong> (<code>float</code>, defaults to <code>0.2</code>) — | |
| The fraction of initial steps during which skipping is disabled to ensure stability. For example, if | |
| <code>num_inference_steps</code> is 28 and <code>retention_ratio</code> is 0.2, the first 6 steps will never be skipped.`,name:"retention_ratio"},{anchor:"diffusers.MagCacheConfig.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, defaults to <code>28</code>) — | |
| The number of inference steps used in the pipeline. This is required to interpolate <code>mag_ratios</code> correctly.`,name:"num_inference_steps"},{anchor:"diffusers.MagCacheConfig.mag_ratios",description:`<strong>mag_ratios</strong> (<code>torch.Tensor</code>, <em>optional</em>) — | |
| The pre-computed magnitude ratios for the model. These are checkpoint-dependent. If not provided, you must | |
| set <code>calibrate=True</code> to calculate them for your specific model. For Flux models, you can use | |
| <code>diffusers.hooks.mag_cache.FLUX_MAG_RATIOS</code>.`,name:"mag_ratios"},{anchor:"diffusers.MagCacheConfig.calibrate",description:`<strong>calibrate</strong> (<code>bool</code>, defaults to <code>False</code>) — | |
| If True, enables calibration mode. In this mode, no blocks are skipped. Instead, the hook calculates the | |
| magnitude ratios for the current run and logs them at the end. Use this to obtain <code>mag_ratios</code> for new | |
| models or schedulers.`,name:"calibrate"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/hooks/mag_cache.py#L84"}}),_e=new B({props:{name:"diffusers.apply_mag_cache",anchor:"diffusers.apply_mag_cache",parameters:[{name:"module",val:": Module"},{name:"config",val:": MagCacheConfig"}],parametersDescription:[{anchor:"diffusers.apply_mag_cache.module",description:`<strong>module</strong> (<code>torch.nn.Module</code>) — | |
| The module to apply MagCache to.`,name:"module"},{anchor:"diffusers.apply_mag_cache.config",description:`<strong>config</strong> (<code>MagCacheConfig</code>) — | |
| The configuration for MagCache.`,name:"config"}],source:"https://github.com/huggingface/diffusers/blob/vr_13921/src/diffusers/hooks/mag_cache.py#L397"}}),be=new ya({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/cache.md"}}),{c(){s=p("meta"),k=o(),h=p("p"),r=o(),m(f.$$.fragment),t=o(),m(C.$$.fragment),Pe=o(),K=p("p"),K.textContent=At,De=o(),m(O.$$.fragment),Le=o(),$=p("div"),m(ee.$$.fragment),bt=o(),$e=p("p"),$e.textContent=Ht,yt=o(),Me=p("p"),Me.textContent=Pt,Ct=o(),ve=p("ul"),ve.innerHTML=Dt,wt=o(),R=p("div"),m(te.$$.fragment),kt=o(),Te=p("p"),Te.textContent=Lt,$t=o(),I=p("div"),m(ae.$$.fragment),Mt=o(),xe=p("p"),xe.textContent=zt,vt=o(),m(Y.$$.fragment),ze=o(),m(ne.$$.fragment),Ke=o(),W=p("div"),m(se.$$.fragment),Tt=o(),je=p("p"),je.textContent=Kt,Oe=o(),J=p("div"),m(oe.$$.fragment),xt=o(),Je=p("p"),Je.innerHTML=Ot,jt=o(),Ue=p("p"),Ue.textContent=ea,Jt=o(),m(S.$$.fragment),et=o(),m(ie.$$.fragment),tt=o(),X=p("div"),m(re.$$.fragment),Ut=o(),Ze=p("p"),Ze.innerHTML=ta,at=o(),F=p("div"),m(le.$$.fragment),Zt=o(),Be=p("p"),Be.innerHTML=aa,Bt=o(),m(A.$$.fragment),nt=o(),m(ce.$$.fragment),st=o(),V=p("div"),m(pe.$$.fragment),Ft=o(),Fe=p("p"),Fe.innerHTML=na,ot=o(),U=p("div"),m(de.$$.fragment),Nt=o(),Ne=p("p"),Ne.innerHTML=sa,It=o(),Ie=p("p"),Ie.innerHTML=oa,Gt=o(),m(H.$$.fragment),it=o(),m(fe.$$.fragment),rt=o(),M=p("div"),m(he.$$.fragment),Wt=o(),Ge=p("p"),Ge.innerHTML=ia,Xt=o(),We=p("p"),We.textContent=ra,Vt=o(),Xe=p("ul"),Xe.innerHTML=la,qt=o(),m(P.$$.fragment),lt=o(),Z=p("div"),m(me.$$.fragment),Et=o(),Ve=p("p"),Ve.textContent=ca,Qt=o(),qe=p("p"),qe.textContent=pa,Rt=o(),m(D.$$.fragment),ct=o(),m(ue.$$.fragment),pt=o(),q=p("div"),m(ge.$$.fragment),Yt=o(),Ee=p("p"),Ee.innerHTML=da,dt=o(),E=p("div"),m(_e.$$.fragment),St=o(),Qe=p("p"),Qe.textContent=fa,ft=o(),m(be.$$.fragment),ht=o(),He=p("p"),this.h()},l(e){const n=_a("svelte-u9bgzb",document.head);s=d(n,"META",{name:!0,content:!0}),n.forEach(a),k=i(e),h=d(e,"P",{}),T(h).forEach(a),r=i(e),u(f.$$.fragment,e),t=i(e),u(C.$$.fragment,e),Pe=i(e),K=d(e,"P",{"data-svelte-h":!0}),w(K)!=="svelte-1oer4hj"&&(K.textContent=At),De=i(e),u(O.$$.fragment,e),Le=i(e),$=d(e,"DIV",{class:!0});var v=T($);u(ee.$$.fragment,v),bt=i(v),$e=d(v,"P",{"data-svelte-h":!0}),w($e)!=="svelte-1jkm0k7"&&($e.textContent=Ht),yt=i(v),Me=d(v,"P",{"data-svelte-h":!0}),w(Me)!=="svelte-x25y7s"&&(Me.textContent=Pt),Ct=i(v),ve=d(v,"UL",{"data-svelte-h":!0}),w(ve)!=="svelte-ub5q43"&&(ve.innerHTML=Dt),wt=i(v),R=d(v,"DIV",{class:!0});var ye=T(R);u(te.$$.fragment,ye),kt=i(ye),Te=d(ye,"P",{"data-svelte-h":!0}),w(Te)!=="svelte-121bmd6"&&(Te.textContent=Lt),ye.forEach(a),$t=i(v),I=d(v,"DIV",{class:!0});var Q=T(I);u(ae.$$.fragment,Q),Mt=i(Q),xe=d(Q,"P",{"data-svelte-h":!0}),w(xe)!=="svelte-1jqtd9a"&&(xe.textContent=zt),vt=i(Q),u(Y.$$.fragment,Q),Q.forEach(a),v.forEach(a),ze=i(e),u(ne.$$.fragment,e),Ke=i(e),W=d(e,"DIV",{class:!0});var Ce=T(W);u(se.$$.fragment,Ce),Tt=i(Ce),je=d(Ce,"P",{"data-svelte-h":!0}),w(je)!=="svelte-g9nrp2"&&(je.textContent=Kt),Ce.forEach(a),Oe=i(e),J=d(e,"DIV",{class:!0});var N=T(J);u(oe.$$.fragment,N),xt=i(N),Je=d(N,"P",{"data-svelte-h":!0}),w(Je)!=="svelte-1k6n7qf"&&(Je.innerHTML=Ot),jt=i(N),Ue=d(N,"P",{"data-svelte-h":!0}),w(Ue)!=="svelte-1n2zwuf"&&(Ue.textContent=ea),Jt=i(N),u(S.$$.fragment,N),N.forEach(a),et=i(e),u(ie.$$.fragment,e),tt=i(e),X=d(e,"DIV",{class:!0});var we=T(X);u(re.$$.fragment,we),Ut=i(we),Ze=d(we,"P",{"data-svelte-h":!0}),w(Ze)!=="svelte-38u0u9"&&(Ze.innerHTML=ta),we.forEach(a),at=i(e),F=d(e,"DIV",{class:!0});var Re=T(F);u(le.$$.fragment,Re),Zt=i(Re),Be=d(Re,"P",{"data-svelte-h":!0}),w(Be)!=="svelte-1v5ielx"&&(Be.innerHTML=aa),Bt=i(Re),u(A.$$.fragment,Re),Re.forEach(a),nt=i(e),u(ce.$$.fragment,e),st=i(e),V=d(e,"DIV",{class:!0});var ut=T(V);u(pe.$$.fragment,ut),Ft=i(ut),Fe=d(ut,"P",{"data-svelte-h":!0}),w(Fe)!=="svelte-360v39"&&(Fe.innerHTML=na),ut.forEach(a),ot=i(e),U=d(e,"DIV",{class:!0});var L=T(U);u(de.$$.fragment,L),Nt=i(L),Ne=d(L,"P",{"data-svelte-h":!0}),w(Ne)!=="svelte-1p02a6y"&&(Ne.innerHTML=sa),It=i(L),Ie=d(L,"P",{"data-svelte-h":!0}),w(Ie)!=="svelte-1xnxpcr"&&(Ie.innerHTML=oa),Gt=i(L),u(H.$$.fragment,L),L.forEach(a),it=i(e),u(fe.$$.fragment,e),rt=i(e),M=d(e,"DIV",{class:!0});var G=T(M);u(he.$$.fragment,G),Wt=i(G),Ge=d(G,"P",{"data-svelte-h":!0}),w(Ge)!=="svelte-jvr5il"&&(Ge.innerHTML=ia),Xt=i(G),We=d(G,"P",{"data-svelte-h":!0}),w(We)!=="svelte-1biq3pv"&&(We.textContent=ra),Vt=i(G),Xe=d(G,"UL",{"data-svelte-h":!0}),w(Xe)!=="svelte-fshky8"&&(Xe.innerHTML=la),qt=i(G),u(P.$$.fragment,G),G.forEach(a),lt=i(e),Z=d(e,"DIV",{class:!0});var z=T(Z);u(me.$$.fragment,z),Et=i(z),Ve=d(z,"P",{"data-svelte-h":!0}),w(Ve)!=="svelte-1mz0d6l"&&(Ve.textContent=ca),Qt=i(z),qe=d(z,"P",{"data-svelte-h":!0}),w(qe)!=="svelte-wvy9tn"&&(qe.textContent=pa),Rt=i(z),u(D.$$.fragment,z),z.forEach(a),ct=i(e),u(ue.$$.fragment,e),pt=i(e),q=d(e,"DIV",{class:!0});var gt=T(q);u(ge.$$.fragment,gt),Yt=i(gt),Ee=d(gt,"P",{"data-svelte-h":!0}),w(Ee)!=="svelte-p2o14j"&&(Ee.innerHTML=da),gt.forEach(a),dt=i(e),E=d(e,"DIV",{class:!0});var _t=T(E);u(_e.$$.fragment,_t),St=i(_t),Qe=d(_t,"P",{"data-svelte-h":!0}),w(Qe)!=="svelte-7aytfm"&&(Qe.textContent=fa),_t.forEach(a),ft=i(e),u(be.$$.fragment,e),ht=i(e),He=d(e,"P",{}),T(He).forEach(a),this.h()},h(){x(s,"name","hf:doc:metadata"),x(s,"content",xa),x(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),x(E,"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,n){l(document.head,s),c(e,k,n),c(e,h,n),c(e,r,n),g(f,e,n),c(e,t,n),g(C,e,n),c(e,Pe,n),c(e,K,n),c(e,De,n),g(O,e,n),c(e,Le,n),c(e,$,n),g(ee,$,null),l($,bt),l($,$e),l($,yt),l($,Me),l($,Ct),l($,ve),l($,wt),l($,R),g(te,R,null),l(R,kt),l(R,Te),l($,$t),l($,I),g(ae,I,null),l(I,Mt),l(I,xe),l(I,vt),g(Y,I,null),c(e,ze,n),g(ne,e,n),c(e,Ke,n),c(e,W,n),g(se,W,null),l(W,Tt),l(W,je),c(e,Oe,n),c(e,J,n),g(oe,J,null),l(J,xt),l(J,Je),l(J,jt),l(J,Ue),l(J,Jt),g(S,J,null),c(e,et,n),g(ie,e,n),c(e,tt,n),c(e,X,n),g(re,X,null),l(X,Ut),l(X,Ze),c(e,at,n),c(e,F,n),g(le,F,null),l(F,Zt),l(F,Be),l(F,Bt),g(A,F,null),c(e,nt,n),g(ce,e,n),c(e,st,n),c(e,V,n),g(pe,V,null),l(V,Ft),l(V,Fe),c(e,ot,n),c(e,U,n),g(de,U,null),l(U,Nt),l(U,Ne),l(U,It),l(U,Ie),l(U,Gt),g(H,U,null),c(e,it,n),g(fe,e,n),c(e,rt,n),c(e,M,n),g(he,M,null),l(M,Wt),l(M,Ge),l(M,Xt),l(M,We),l(M,Vt),l(M,Xe),l(M,qt),g(P,M,null),c(e,lt,n),c(e,Z,n),g(me,Z,null),l(Z,Et),l(Z,Ve),l(Z,Qt),l(Z,qe),l(Z,Rt),g(D,Z,null),c(e,ct,n),g(ue,e,n),c(e,pt,n),c(e,q,n),g(ge,q,null),l(q,Yt),l(q,Ee),c(e,dt,n),c(e,E,n),g(_e,E,null),l(E,St),l(E,Qe),c(e,ft,n),g(be,e,n),c(e,ht,n),c(e,He,n),mt=!0},p(e,[n]){const v={};n&2&&(v.$$scope={dirty:n,ctx:e}),Y.$set(v);const ye={};n&2&&(ye.$$scope={dirty:n,ctx:e}),S.$set(ye);const Q={};n&2&&(Q.$$scope={dirty:n,ctx:e}),A.$set(Q);const Ce={};n&2&&(Ce.$$scope={dirty:n,ctx:e}),H.$set(Ce);const N={};n&2&&(N.$$scope={dirty:n,ctx:e}),P.$set(N);const we={};n&2&&(we.$$scope={dirty:n,ctx:e}),D.$set(we)},i(e){mt||(_(f.$$.fragment,e),_(C.$$.fragment,e),_(O.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(ae.$$.fragment,e),_(Y.$$.fragment,e),_(ne.$$.fragment,e),_(se.$$.fragment,e),_(oe.$$.fragment,e),_(S.$$.fragment,e),_(ie.$$.fragment,e),_(re.$$.fragment,e),_(le.$$.fragment,e),_(A.$$.fragment,e),_(ce.$$.fragment,e),_(pe.$$.fragment,e),_(de.$$.fragment,e),_(H.$$.fragment,e),_(fe.$$.fragment,e),_(he.$$.fragment,e),_(P.$$.fragment,e),_(me.$$.fragment,e),_(D.$$.fragment,e),_(ue.$$.fragment,e),_(ge.$$.fragment,e),_(_e.$$.fragment,e),_(be.$$.fragment,e),mt=!0)},o(e){b(f.$$.fragment,e),b(C.$$.fragment,e),b(O.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(ae.$$.fragment,e),b(Y.$$.fragment,e),b(ne.$$.fragment,e),b(se.$$.fragment,e),b(oe.$$.fragment,e),b(S.$$.fragment,e),b(ie.$$.fragment,e),b(re.$$.fragment,e),b(le.$$.fragment,e),b(A.$$.fragment,e),b(ce.$$.fragment,e),b(pe.$$.fragment,e),b(de.$$.fragment,e),b(H.$$.fragment,e),b(fe.$$.fragment,e),b(he.$$.fragment,e),b(P.$$.fragment,e),b(me.$$.fragment,e),b(D.$$.fragment,e),b(ue.$$.fragment,e),b(ge.$$.fragment,e),b(_e.$$.fragment,e),b(be.$$.fragment,e),mt=!1},d(e){e&&(a(k),a(h),a(r),a(t),a(Pe),a(K),a(De),a(Le),a($),a(ze),a(Ke),a(W),a(Oe),a(J),a(et),a(tt),a(X),a(at),a(F),a(nt),a(st),a(V),a(ot),a(U),a(it),a(rt),a(M),a(lt),a(Z),a(ct),a(pt),a(q),a(dt),a(E),a(ft),a(ht),a(He)),a(s),y(f,e),y(C,e),y(O,e),y(ee),y(te),y(ae),y(Y),y(ne,e),y(se),y(oe),y(S),y(ie,e),y(re),y(le),y(A),y(ce,e),y(pe),y(de),y(H),y(fe,e),y(he),y(P),y(me),y(D),y(ue,e),y(ge),y(_e),y(be,e)}}}const xa='{"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":[],"depth":2},{"title":"FirstBlockCacheConfig","local":"diffusers.FirstBlockCacheConfig","sections":[],"depth":2},{"title":"TaylorSeerCacheConfig","local":"diffusers.TaylorSeerCacheConfig","sections":[],"depth":2},{"title":"MagCacheConfig","local":"diffusers.MagCacheConfig","sections":[],"depth":2}],"depth":1}';function ja(j){return ma(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ga extends ua{constructor(s){super(),ga(this,s,ja,Ta,ha,{})}}export{Ga as component}; | |
Xet Storage Details
- Size:
- 61 kB
- Xet hash:
- f28b12e6e5c3ed5cf6bf70dba435f5a9a9fb3ae55b3f5031ec09f6721cdd549a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.