import{s as Vl,o as Nl,n as Sl}from"../chunks/scheduler.53228c21.js";import{S as Rl,i as Hl,e as p,s,c as m,h as Ll,a as i,d as t,b as n,f as vl,g as y,j as o,k as yl,l as Dl,m as a,n as h,t as w,o as J,p as T}from"../chunks/index.100fac89.js";import{C as f}from"../chunks/CodeBlock.d30a6509.js";import{H as B,E as zl}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.4d82655d.js";import{H as Pl,a as Ql}from"../chunks/HfOption.fad27e59.js";function ql(b){let M,j;return M=new f({props:{code:"cGlwMyUyMGluc3RhbGwlMjAtVSUyMGNhY2hlLWRpdA==",highlighted:"pip3 install -U cache-dit",wrap:!1}}),{c(){m(M.$$.fragment)},l(c){y(M.$$.fragment,c)},m(c,U){h(M,c,U),j=!0},p:Sl,i(c){j||(w(M.$$.fragment,c),j=!0)},o(c){J(M.$$.fragment,c),j=!1},d(c){T(M,c)}}}function Ol(b){let M,j;return M=new f({props:{code:"cGlwMyUyMGluc3RhbGwlMjBnaXQlMkJodHRwcyUzQSUyRiUyRmdpdGh1Yi5jb20lMkZ2aXBzaG9wJTJGY2FjaGUtZGl0LmdpdA==",highlighted:"pip3 install git+https://github.com/vipshop/cache-dit.git",wrap:!1}}),{c(){m(M.$$.fragment)},l(c){y(M.$$.fragment,c)},m(c,U){h(M,c,U),j=!0},p:Sl,i(c){j||(w(M.$$.fragment,c),j=!0)},o(c){J(M.$$.fragment,c),j=!1},d(c){T(M,c)}}}function Kl(b){let M,j,c,U;return M=new Ql({props:{id:"install",option:"PyPI",$$slots:{default:[ql]},$$scope:{ctx:b}}}),c=new Ql({props:{id:"install",option:"source",$$slots:{default:[Ol]},$$scope:{ctx:b}}}),{c(){m(M.$$.fragment),j=s(),m(c.$$.fragment)},l(r){y(M.$$.fragment,r),j=n(r),y(c.$$.fragment,r)},m(r,d){h(M,r,d),a(r,j,d),h(c,r,d),U=!0},p(r,d){const u={};d&2&&(u.$$scope={dirty:d,ctx:r}),M.$set(u);const Te={};d&2&&(Te.$$scope={dirty:d,ctx:r}),c.$set(Te)},i(r){U||(w(M.$$.fragment,r),w(c.$$.fragment,r),U=!0)},o(r){J(M.$$.fragment,r),J(c.$$.fragment,r),U=!1},d(r){r&&t(j),T(M,r),T(c,r)}}}function et(b){let M,j,c,U,r,d,u,Te="CacheDiT is a unified, flexible, and training-free cache acceleration framework designed to support nearly all Diffusers’ DiT-based pipelines. It provides a unified cache API that supports automatic block adapter, DBCache, and more.",fe,A,hl='To learn more, refer to the <a href="https://github.com/vipshop/cache-dit" rel="nofollow">CacheDiT</a> repository.',Ue,G,wl="Install a stable release of CacheDiT from PyPI or you can install the latest version from GitHub.",de,C,ue,Z,Jl="Run the command below to view supported DiT pipelines.",be,$,Ce,g,Tl='For a complete benchmark, please refer to <a href="https://github.com/vipshop/cache-dit/blob/main/bench/" rel="nofollow">Benchmarks</a>.',Ie,_,Be,k,jl="CacheDiT works by matching specific input/output patterns as shown below.",Ae,x,fl='<img src="https://github.com/vipshop/cache-dit/raw/main/assets/patterns-v1.png"/>',Ge,X,Ul="Call the <code>enable_cache()</code> function on a pipeline to enable cache acceleration. This function is the entry point to many of CacheDiT’s features.",Ze,Y,$e,F,ge,E,dl='For custom or modified pipelines or transformers not included in Diffusers, use the <code>BlockAdapter</code> in <code>auto</code> mode or via manual configuration. Please check the <a href="https://github.com/vipshop/cache-dit/blob/main/docs/User_Guide.md#automatic-block-adapter" rel="nofollow">BlockAdapter</a> docs for more details. Refer to <a href="https://github.com/vipshop/cache-dit/blob/main/examples/adapter/run_qwen_image_adapter.py" rel="nofollow">Qwen-Image w/ BlockAdapter</a> as an example.',_e,W,ke,v,ul=`Sometimes, a Transformer class will contain more than one transformer <code>blocks</code>. For example, FLUX.1 (HiDream, Chroma, etc) contains <code>transformer_blocks</code> and <code>single_transformer_blocks</code> (with different forward patterns). The BlockAdapter is able to detect this hybrid pattern type as well.
Refer to <a href="https://github.com/vipshop/cache-dit/blob/main/examples/adapter/run_flux_adapter.py" rel="nofollow">FLUX.1</a> as an example.`,xe,Q,Xe,S,bl='This also works if there is more than one transformer (namely <code>transformer</code> and <code>transformer_2</code>) in its structure. Refer to <a href="https://github.com/vipshop/cache-dit/blob/main/examples/pipeline/run_wan_2.2.py" rel="nofollow">Wan 2.2 MoE</a> as an example.',Ye,V,Fe,N,Cl="For any pattern not included in CacheDiT, use the Patch Functor to convert the pattern into a known pattern. You need to subclass the Patch Functor and may also need to fuse the operations within the blocks for loop into block <code>forward</code>. After implementing a Patch Functor, set the <code>patch_functor</code> property in <code>BlockAdapter</code>.",Ee,R,Il='<img src="https://github.com/vipshop/cache-dit/raw/main/assets/patch-functor.png"/>',We,H,Bl='Some Patch Functors are already provided in CacheDiT, <a href="https://github.com/vipshop/cache-dit/blob/main/src/cache_dit/cache_factory/patch_functors/functor_hidream.py" rel="nofollow">HiDreamPatchFunctor</a>, <a href="https://github.com/vipshop/cache-dit/blob/main/src/cache_dit/cache_factory/patch_functors/functor_chroma.py" rel="nofollow">ChromaPatchFunctor</a>, etc.',ve,L,Qe,D,Al="Finally, you can call the <code>cache_dit.summary()</code> function on a pipeline after its completed inference to get the cache acceleration details.",Se,z,Ve,P,Ne,q,Re,O,Gl='<img src="https://github.com/vipshop/cache-dit/raw/main/assets/dbcache-v1.png"/>',He,K,Zl="DBCache (Dual Block Caching) supports different configurations of compute blocks (F8B12, etc.) to enable a balanced trade-off between performance and precision.",Le,ee,$l="<li>Fn_compute_blocks: Specifies that DBCache uses the <strong>first n</strong> Transformer blocks to fit the information at time step t, enabling the calculation of a more stable L1 diff and delivering more accurate information to subsequent blocks.</li> <li>Bn_compute_blocks: Further fuses approximate information in the <strong>last n</strong> Transformer blocks to enhance prediction accuracy. These blocks act as an auto-scaler for approximate hidden states that use residual cache.</li>",De,le,ze,te,gl='Check the <a href="https://github.com/vipshop/cache-dit/blob/main/docs/DBCache.md" rel="nofollow">DBCache</a> and <a href="https://github.com/vipshop/cache-dit/blob/main/docs/User_Guide.md#dbcache" rel="nofollow">User Guide</a> docs for more design details.',Pe,ae,qe,se,_l='The <a href="https://huggingface.co/papers/2503.06923" rel="nofollow">TaylorSeers</a> algorithm further improves the precision of DBCache in cases where the cached steps are large (Hybrid TaylorSeer + DBCache). At timesteps with significant intervals, the feature similarity in diffusion models decreases substantially, significantly harming the generation quality.',Oe,ne,kl="TaylorSeer employs a differential method to approximate the higher-order derivatives of features and predict features in future timesteps with Taylor series expansion. The TaylorSeer implemented in CacheDiT supports both hidden states and residual cache types. F_pred can be a residual cache or a hidden-state cache.",Ke,Me,el,I,xl=`<p><br/>
The <code>Bn_compute_blocks</code> parameter of DBCache can be set to <code>0</code> if you use TaylorSeer as the calibrator for approximate hidden states. DBCache’s <code>Bn_compute_blocks</code> also acts as a calibrator, so you can choose either <code>Bn_compute_blocks</code> &gt; 0 or TaylorSeer. We recommend using the configuration scheme of TaylorSeer + DBCache FnB0.</p>`,ll,ce,tl,pe,Xl="CacheDiT supports caching for CFG (classifier-free guidance). For models that fuse CFG and non-CFG into a single forward step, or models that do not include CFG in the forward step, please set <code>enable_separate_cfg</code> parameter  to <code>False (default, None)</code>. Otherwise, set it to <code>True</code>.",al,ie,sl,re,nl,oe,Yl="CacheDiT is designed to work with torch.compile for even better performance. Call <code>torch.compile</code> after enabling the cache.",Ml,me,cl,ye,Fl="If you’re using CacheDiT with dynamic input shapes, consider increasing the <code>recompile_limit</code> of <code>torch._dynamo</code>. Otherwise, the <code>recompile_limit</code> error may be triggered, causing the module to fall back to eager mode.",pl,he,il,we,El='Please check <a href="https://github.com/vipshop/cache-dit/blob/main/bench/perf.py" rel="nofollow">perf.py</a> for more details.',rl,Je,ol,je,ml;return r=new B({props:{title:"CacheDiT",local:"cachedit",headingTag:"h2"}}),C=new Pl({props:{id:"install",options:["PyPI","source"],$$slots:{default:[Kl]},$$scope:{ctx:b}}}),$=new f({props:{code:"aW1wb3J0JTIwY2FjaGVfZGl0JTBBY2FjaGVfZGl0LnN1cHBvcnRlZF9waXBlbGluZXMoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> cache_dit
<span class="hljs-meta">&gt;&gt;&gt; </span>cache_dit.supported_pipelines()
(<span class="hljs-number">30</span>, [<span class="hljs-string">&#x27;Flux*&#x27;</span>, <span class="hljs-string">&#x27;Mochi*&#x27;</span>, <span class="hljs-string">&#x27;CogVideoX*&#x27;</span>, <span class="hljs-string">&#x27;Wan*&#x27;</span>, <span class="hljs-string">&#x27;HunyuanVideo*&#x27;</span>, <span class="hljs-string">&#x27;QwenImage*&#x27;</span>, <span class="hljs-string">&#x27;LTX*&#x27;</span>, <span class="hljs-string">&#x27;Allegro*&#x27;</span>,
<span class="hljs-string">&#x27;CogView3Plus*&#x27;</span>, <span class="hljs-string">&#x27;CogView4*&#x27;</span>, <span class="hljs-string">&#x27;Cosmos*&#x27;</span>, <span class="hljs-string">&#x27;EasyAnimate*&#x27;</span>, <span class="hljs-string">&#x27;SkyReelsV2*&#x27;</span>, <span class="hljs-string">&#x27;StableDiffusion3*&#x27;</span>,
<span class="hljs-string">&#x27;ConsisID*&#x27;</span>, <span class="hljs-string">&#x27;DiT*&#x27;</span>, <span class="hljs-string">&#x27;Amused*&#x27;</span>, <span class="hljs-string">&#x27;Bria*&#x27;</span>, <span class="hljs-string">&#x27;Lumina*&#x27;</span>, <span class="hljs-string">&#x27;OmniGen*&#x27;</span>, <span class="hljs-string">&#x27;PixArt*&#x27;</span>, <span class="hljs-string">&#x27;Sana*&#x27;</span>, <span class="hljs-string">&#x27;StableAudio*&#x27;</span>,
<span class="hljs-string">&#x27;VisualCloze*&#x27;</span>, <span class="hljs-string">&#x27;AuraFlow*&#x27;</span>, <span class="hljs-string">&#x27;Chroma*&#x27;</span>, <span class="hljs-string">&#x27;ShapE*&#x27;</span>, <span class="hljs-string">&#x27;HiDream*&#x27;</span>, <span class="hljs-string">&#x27;HunyuanDiT*&#x27;</span>, <span class="hljs-string">&#x27;HunyuanDiTPAG*&#x27;</span>])`,wrap:!1}}),_=new B({props:{title:"Unified Cache API",local:"unified-cache-api",headingTag:"h2"}}),Y=new f({props:{code:"aW1wb3J0JTIwY2FjaGVfZGl0JTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTIwJTBBJTBBJTNDQ29weUxMTVR4dE1lbnUlMjBjb250YWluZXJTdHlsZSUzRCUyMmZsb2F0JTNBJTIwcmlnaHQlM0IlMjBtYXJnaW4tbGVmdCUzQSUyMDEwcHglM0IlMjBkaXNwbGF5JTNBJTIwaW5saW5lLWZsZXglM0IlMjBwb3NpdGlvbiUzQSUyMHJlbGF0aXZlJTNCJTIwei1pbmRleCUzQSUyMDEwJTNCJTIyJTNFJTNDJTJGQ29weUxMTVR4dE1lbnUlM0UlMEElMEElMjMlMjBDYW4lMjBiZSUyMGFueSUyMGRpZmZ1c2lvbiUyMHBpcGVsaW5lJTBBcGlwZSUyMCUzRCUyMERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJRd2VuJTJGUXdlbi1JbWFnZSUyMiklMEElMEElMjMlMjBPbmUtbGluZSUyMGNvZGUlMjB3aXRoJTIwZGVmYXVsdCUyMGNhY2hlJTIwb3B0aW9ucy4lMEFjYWNoZV9kaXQuZW5hYmxlX2NhY2hlKHBpcGUpJTIwJTBBJTBBJTIzJTIwSnVzdCUyMGNhbGwlMjB0aGUlMjBwaXBlJTIwYXMlMjBub3JtYWwuJTBBb3V0cHV0JTIwJTNEJTIwcGlwZSguLi4pJTBBJTBBJTIzJTIwRGlzYWJsZSUyMGNhY2hlJTIwYW5kJTIwcnVuJTIwb3JpZ2luYWwlMjBwaXBlLiUwQWNhY2hlX2RpdC5kaXNhYmxlX2NhY2hlKHBpcGUp",highlighted:`<span class="hljs-keyword">import</span> cache_dit
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline 

&lt;CopyLLMTxtMenu containerStyle=<span class="hljs-string">&quot;float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;&quot;</span>&gt;&lt;/CopyLLMTxtMenu&gt;

<span class="hljs-comment"># Can be any diffusion pipeline</span>
pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;Qwen/Qwen-Image&quot;</span>)

<span class="hljs-comment"># One-line code with default cache options.</span>
cache_dit.enable_cache(pipe) 

<span class="hljs-comment"># Just call the pipe as normal.</span>
output = pipe(...)

<span class="hljs-comment"># Disable cache and run original pipe.</span>
cache_dit.disable_cache(pipe)`,wrap:!1}}),F=new B({props:{title:"Automatic Block Adapter",local:"automatic-block-adapter",headingTag:"h2"}}),W=new f({props:{code:"ZnJvbSUyMGNhY2hlX2RpdCUyMGltcG9ydCUyMEZvcndhcmRQYXR0ZXJuJTJDJTIwQmxvY2tBZGFwdGVyJTBBJTBBJTIzJTIwVXNlJTIwJUYwJTlGJTk0JUE1QmxvY2tBZGFwdGVyJTIwd2l0aCUyMCU2MGF1dG8lNjAlMjBtb2RlLiUwQWNhY2hlX2RpdC5lbmFibGVfY2FjaGUoJTBBJTIwJTIwJTIwJTIwQmxvY2tBZGFwdGVyKCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMEFueSUyMERpZmZ1c2lvblBpcGVsaW5lJTJDJTIwUXdlbi1JbWFnZSUyQyUyMGV0Yy4lMjAlMjAlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwaXBlJTNEcGlwZSUyQyUyMGF1dG8lM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIzJTIwQ2hlY2slMjAlNjAlRjAlOUYlOTMlOUFGb3J3YXJkJTIwUGF0dGVybiUyME1hdGNoaW5nJTYwJTIwZG9jdW1lbnRhdGlvbiUyMGFuZCUyMGhhY2slMjB0aGUlMjBjb2RlJTIwb2YlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjMlMjBvZiUyMFF3ZW4tSW1hZ2UlMkMlMjB5b3UlMjB3aWxsJTIwZmluZCUyMHRoYXQlMjBpdCUyMGhhcyUyMHNhdGlzZmllZCUyMCU2MEZPUldBUkRfUEFUVEVSTl8xJTYwLiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMGZvcndhcmRfcGF0dGVybiUzREZvcndhcmRQYXR0ZXJuLlBhdHRlcm5fMSUyQyUwQSUyMCUyMCUyMCUyMCklMkMlMjAlMjAlMjAlMEEpJTBBJTBBJTIzJTIwT3IlMkMlMjBtYW51YWxseSUyMHNldHVwJTIwdHJhbnNmb3JtZXIlMjBjb25maWd1cmF0aW9ucy4lMEFjYWNoZV9kaXQuZW5hYmxlX2NhY2hlKCUwQSUyMCUyMCUyMCUyMEJsb2NrQWRhcHRlciglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwaXBlJTNEcGlwZSUyQyUyMCUyMyUyMFF3ZW4tSW1hZ2UlMkMlMjBldGMuJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdHJhbnNmb3JtZXIlM0RwaXBlLnRyYW5zZm9ybWVyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYmxvY2tzJTNEcGlwZS50cmFuc2Zvcm1lci50cmFuc2Zvcm1lcl9ibG9ja3MlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBmb3J3YXJkX3BhdHRlcm4lM0RGb3J3YXJkUGF0dGVybi5QYXR0ZXJuXzElMkMlMEElMjAlMjAlMjAlMjApJTJDJTIwJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> cache_dit <span class="hljs-keyword">import</span> ForwardPattern, BlockAdapter

<span class="hljs-comment"># Use 🔥BlockAdapter with \`auto\` mode.</span>
cache_dit.enable_cache(
    BlockAdapter(
        <span class="hljs-comment"># Any DiffusionPipeline, Qwen-Image, etc.  </span>
        pipe=pipe, auto=<span class="hljs-literal">True</span>,
        <span class="hljs-comment"># Check \`📚Forward Pattern Matching\` documentation and hack the code of</span>
        <span class="hljs-comment"># of Qwen-Image, you will find that it has satisfied \`FORWARD_PATTERN_1\`.</span>
        forward_pattern=ForwardPattern.Pattern_1,
    ),   
)

<span class="hljs-comment"># Or, manually setup transformer configurations.</span>
cache_dit.enable_cache(
    BlockAdapter(
        pipe=pipe, <span class="hljs-comment"># Qwen-Image, etc.</span>
        transformer=pipe.transformer,
        blocks=pipe.transformer.transformer_blocks,
        forward_pattern=ForwardPattern.Pattern_1,
    ), 
)`,wrap:!1}}),Q=new f({props:{code:"JTIzJTIwRm9yJTIwZGlmZnVzZXJzJTIwJTNDJTNEJTIwMC4zNC4wJTJDJTIwRkxVWC4xJTIwdHJhbnNmb3JtZXJfYmxvY2tzJTIwYW5kJTIwJTBBJTIzJTIwc2luZ2xlX3RyYW5zZm9ybWVyX2Jsb2NrcyUyMGhhdmUlMjBkaWZmZXJlbnQlMjBmb3J3YXJkJTIwcGF0dGVybnMuJTBBY2FjaGVfZGl0LmVuYWJsZV9jYWNoZSglMEElMjAlMjAlMjAlMjBCbG9ja0FkYXB0ZXIoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcGlwZSUzRHBpcGUlMkMlMjAlMjMlMjBGTFVYLjElMkMlMjBldGMuJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdHJhbnNmb3JtZXIlM0RwaXBlLnRyYW5zZm9ybWVyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYmxvY2tzJTNEJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwcGlwZS50cmFuc2Zvcm1lci50cmFuc2Zvcm1lcl9ibG9ja3MlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBwaXBlLnRyYW5zZm9ybWVyLnNpbmdsZV90cmFuc2Zvcm1lcl9ibG9ja3MlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBmb3J3YXJkX3BhdHRlcm4lM0QlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBGb3J3YXJkUGF0dGVybi5QYXR0ZXJuXzElMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBGb3J3YXJkUGF0dGVybi5QYXR0ZXJuXzMlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMkMlMEElMjAlMjAlMjAlMjApJTJDJTBBKQ==",highlighted:`<span class="hljs-comment"># For diffusers &lt;= 0.34.0, FLUX.1 transformer_blocks and </span>
<span class="hljs-comment"># single_transformer_blocks have different forward patterns.</span>
cache_dit.enable_cache(
    BlockAdapter(
        pipe=pipe, <span class="hljs-comment"># FLUX.1, etc.</span>
        transformer=pipe.transformer,
        blocks=[
            pipe.transformer.transformer_blocks,
            pipe.transformer.single_transformer_blocks,
        ],
        forward_pattern=[
            ForwardPattern.Pattern_1,
            ForwardPattern.Pattern_3,
        ],
    ),
)`,wrap:!1}}),V=new B({props:{title:"Patch Functor",local:"patch-functor",headingTag:"h2"}}),L=new f({props:{code:"JTQwQmxvY2tBZGFwdGVyUmVnaXN0cnkucmVnaXN0ZXIoJTIySGlEcmVhbSUyMiklMEFkZWYlMjBoaWRyZWFtX2FkYXB0ZXIocGlwZSUyQyUyMCoqa3dhcmdzKSUyMC0lM0UlMjBCbG9ja0FkYXB0ZXIlM0ElMEElMjAlMjAlMjAlMjBmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwSGlEcmVhbUltYWdlVHJhbnNmb3JtZXIyRE1vZGVsJTBBJTIwJTIwJTIwJTIwZnJvbSUyMGNhY2hlX2RpdC5jYWNoZV9mYWN0b3J5LnBhdGNoX2Z1bmN0b3JzJTIwaW1wb3J0JTIwSGlEcmVhbVBhdGNoRnVuY3RvciUwQSUwQSUyMCUyMCUyMCUyMGFzc2VydCUyMG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0RIaURyZWFtUGF0Y2hGdW5jdG9yKCklMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAqKmt3YXJncyUyQyUwQSUyMCUyMCUyMCUyMCk=",highlighted:`<span class="hljs-meta">@BlockAdapterRegistry.register(<span class="hljs-params"><span class="hljs-string">&quot;HiDream&quot;</span></span>)</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">hidream_adapter</span>(<span class="hljs-params">pipe, **kwargs</span>) -&gt; BlockAdapter:
    <span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> HiDreamImageTransformer2DModel
    <span class="hljs-keyword">from</span> cache_dit.cache_factory.patch_functors <span class="hljs-keyword">import</span> HiDreamPatchFunctor

    <span class="hljs-keyword">assert</span> <span class="hljs-built_in">isinstance</span>(pipe.transformer, HiDreamImageTransformer2DModel)
    <span class="hljs-keyword">return</span> BlockAdapter(
        pipe=pipe,
        transformer=pipe.transformer,
        blocks=[
            pipe.transformer.double_stream_blocks,
            pipe.transformer.single_stream_blocks,
        ],
        forward_pattern=[
            ForwardPattern.Pattern_0,
            ForwardPattern.Pattern_3,
        ],
        <span class="hljs-comment"># <span class="hljs-doctag">NOTE:</span> Setup your custom patch functor here.</span>
        patch_functor=HiDreamPatchFunctor(),
        **kwargs,
    )`,wrap:!1}}),z=new f({props:{code:"c3RhdHMlMjAlM0QlMjBjYWNoZV9kaXQuc3VtbWFyeShwaXBlKQ==",highlighted:"stats = cache_dit.summary(pipe)",wrap:!1}}),P=new f({props:{code:"JUUyJTlBJUExJUVGJUI4JThGQ2FjaGUlMjBTdGVwcyUyMGFuZCUyMFJlc2lkdWFsJTIwRGlmZnMlMjBTdGF0aXN0aWNzJTNBJTIwUXdlbkltYWdlUGlwZWxpbmUlMEElMEElN0MlMjBDYWNoZSUyMFN0ZXBzJTIwJTdDJTIwRGlmZnMlMjBNaW4lMjAlN0MlMjBEaWZmcyUyMFAyNSUyMCU3QyUyMERpZmZzJTIwUDUwJTIwJTdDJTIwRGlmZnMlMjBQNzUlMjAlN0MlMjBEaWZmcyUyMFA5NSUyMCU3QyUyMERpZmZzJTIwTWF4JTIwJTdDJTBBJTdDLS0tLS0tLS0tLS0tLSU3Qy0tLS0tLS0tLS0tJTdDLS0tLS0tLS0tLS0lN0MtLS0tLS0tLS0tLSU3Qy0tLS0tLS0tLS0tJTdDLS0tLS0tLS0tLS0lN0MtLS0tLS0tLS0tLSU3QyUwQSU3QyUyMDIzJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTdDJTIwMC4wNDUlMjAlMjAlMjAlMjAlMjAlN0MlMjAwLjA4NCUyMCUyMCUyMCUyMCUyMCU3QyUyMDAuMTE0JTIwJTIwJTIwJTIwJTIwJTdDJTIwMC4xNDclMjAlMjAlMjAlMjAlMjAlN0MlMjAwLjI0MSUyMCUyMCUyMCUyMCUyMCU3QyUyMDAuMjk3JTIwJTIwJTIwJTIwJTIwJTdD",highlighted:`⚡️Cache Steps <span class="hljs-keyword">and</span> Residual Diffs Statistics: QwenImagePipeline

| Cache Steps | Diffs Min | Diffs P25 | Diffs P50 | Diffs P75 | Diffs P95 | Diffs Max |
|-------------|-----------|-----------|-----------|-----------|-----------|-----------|
| <span class="hljs-number">23</span>          | <span class="hljs-number">0.045</span>     | <span class="hljs-number">0.084</span>     | <span class="hljs-number">0.114</span>     | <span class="hljs-number">0.147</span>     | <span class="hljs-number">0.241</span>     | <span class="hljs-number">0.297</span>     |`,wrap:!1}}),q=new B({props:{title:"DBCache: Dual Block Cache",local:"dbcache-dual-block-cache",headingTag:"h2"}}),le=new f({props:{code:"aW1wb3J0JTIwY2FjaGVfZGl0JTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsdXhQaXBlbGluZSUwQSUwQXBpcGVfb3JfYWRhcHRlciUyMCUzRCUyMEZsdXhQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyYmxhY2stZm9yZXN0LWxhYnM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MjAlMjAlMjAlMjAlMjAlMjBCbl9jb21wdXRlX2Jsb2NrcyUzRDglMkMlMjAlMjMlMjBCbiUyQyUyMEI4JTJDJTIwZXRjLiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHJlc2lkdWFsX2RpZmZfdGhyZXNob2xkJTNEMC4xMiUyQyUwQSUyMCUyMCUyMCUyMCklMkMlMEEp",highlighted:`<span class="hljs-keyword">import</span> cache_dit
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FluxPipeline

pipe_or_adapter = FluxPipeline.from_pretrained(
    <span class="hljs-string">&quot;black-forest-labs/FLUX.1-dev&quot;</span>,
    torch_dtype=torch.bfloat16,
).to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-comment"># Default options, F8B0, 8 warmup steps, and unlimited cached </span>
<span class="hljs-comment"># steps for good balance between performance and precision</span>
cache_dit.enable_cache(pipe_or_adapter)

<span class="hljs-comment"># Custom options, F8B8, higher precision</span>
<span class="hljs-keyword">from</span> cache_dit <span class="hljs-keyword">import</span> BasicCacheConfig

cache_dit.enable_cache(
    pipe_or_adapter,
    cache_config=BasicCacheConfig(
        max_warmup_steps=<span class="hljs-number">8</span>,  <span class="hljs-comment"># steps do not cache</span>
        max_cached_steps=-<span class="hljs-number">1</span>, <span class="hljs-comment"># -1 means no limit</span>
        Fn_compute_blocks=<span class="hljs-number">8</span>, <span class="hljs-comment"># Fn, F8, etc.</span>
        Bn_compute_blocks=<span class="hljs-number">8</span>, <span class="hljs-comment"># Bn, B8, etc.</span>
        residual_diff_threshold=<span class="hljs-number">0.12</span>,
    ),
)`,wrap:!1}}),ae=new B({props:{title:"TaylorSeer Calibrator",local:"taylorseer-calibrator",headingTag:"h2"}}),Me=new f({props:{code:"ZnJvbSUyMGNhY2hlX2RpdCUyMGltcG9ydCUyMEJhc2ljQ2FjaGVDb25maWclMkMlMjBUYXlsb3JTZWVyQ2FsaWJyYXRvckNvbmZpZyUwQSUwQWNhY2hlX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jBjYWxpYnJhdG9yX2NvbmZpZyUzRFRheWxvclNlZXJDYWxpYnJhdG9yQ29uZmlnKCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMHRheWxvcnNlZXJfb3JkZXIlM0QxJTJDJTBBJTIwJTIwJTIwJTIwKSUyQyUwQSk=",highlighted:`<span class="hljs-keyword">from</span> cache_dit <span class="hljs-keyword">import</span> BasicCacheConfig, TaylorSeerCalibratorConfig

cache_dit.enable_cache(
    pipe_or_adapter,
    <span class="hljs-comment"># Basic DBCache w/ FnBn configurations</span>
    cache_config=BasicCacheConfig(
        max_warmup_steps=<span class="hljs-number">8</span>,  <span class="hljs-comment"># steps do not cache</span>
        max_cached_steps=-<span class="hljs-number">1</span>, <span class="hljs-comment"># -1 means no limit</span>
        Fn_compute_blocks=<span class="hljs-number">8</span>, <span class="hljs-comment"># Fn, F8, etc.</span>
        Bn_compute_blocks=<span class="hljs-number">8</span>, <span class="hljs-comment"># Bn, B8, etc.</span>
        residual_diff_threshold=<span class="hljs-number">0.12</span>,
    ),
    <span class="hljs-comment"># Then, you can use the TaylorSeer Calibrator to approximate </span>
    <span class="hljs-comment"># the values in cached steps, taylorseer_order default is 1.</span>
    calibrator_config=TaylorSeerCalibratorConfig(
        taylorseer_order=<span class="hljs-number">1</span>,
    ),
)`,wrap:!1}}),ce=new B({props:{title:"Hybrid Cache CFG",local:"hybrid-cache-cfg",headingTag:"h2"}}),ie=new f({props:{code:"ZnJvbSUyMGNhY2hlX2RpdCUyMGltcG9ydCUyMEJhc2ljQ2FjaGVDb25maWclMEElMEFjYWNoZV9kaXQuZW5hYmxlX2NhY2hlKCUwQSUyMCUyMCUyMCUyMHBpcGVfb3JfYWRhcHRlciUyQyUyMCUwQSUyMCUyMCUyMCUyMGNhY2hlX2NvbmZpZyUzREJhc2ljQ2FjaGVDb25maWcoJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwLi4uJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIzJTIwRm9yJTIwZXhhbXBsZSUyQyUyMHNldCUyMGl0JTIwYXMlMjBUcnVlJTIwZm9yJTIwV2FuJTIwMi4xJTJDJTIwUXdlbi1JbWFnZSUyMCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMyUyMGFuZCUyMHNldCUyMGl0JTIwYXMlMjBGYWxzZSUyMGZvciUyMEZMVVguMSUyQyUyMEh1bnl1YW5WaWRlbyUyQyUyMGV0Yy4lMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjBlbmFibGVfc2VwYXJhdGVfY2ZnJTNEVHJ1ZSUyQyUwQSUyMCUyMCUyMCUyMCklMkMlMEEp",highlighted:`<span class="hljs-keyword">from</span> cache_dit <span class="hljs-keyword">import</span> BasicCacheConfig

cache_dit.enable_cache(
    pipe_or_adapter, 
    cache_config=BasicCacheConfig(
        ...,
        <span class="hljs-comment"># For example, set it as True for Wan 2.1, Qwen-Image </span>
        <span class="hljs-comment"># and set it as False for FLUX.1, HunyuanVideo, etc.</span>
        enable_separate_cfg=<span class="hljs-literal">True</span>,
    ),
)`,wrap:!1}}),re=new B({props:{title:"torch.compile",local:"torchcompile",headingTag:"h2"}}),me=new f({props:{code:"Y2FjaGVfZGl0LmVuYWJsZV9jYWNoZShwaXBlKSUwQSUwQSUyMyUyMENvbXBpbGUlMjB0aGUlMjBUcmFuc2Zvcm1lciUyMG1vZHVsZSUwQXBpcGUudHJhbnNmb3JtZXIlMjAlM0QlMjB0b3JjaC5jb21waWxlKHBpcGUudHJhbnNmb3JtZXIp",highlighted:`cache_dit.enable_cache(pipe)

<span class="hljs-comment"># Compile the Transformer module</span>
pipe.transformer = torch.<span class="hljs-built_in">compile</span>(pipe.transformer)`,wrap:!1}}),he=new f({props:{code:"dG9yY2guX2R5bmFtby5jb25maWcucmVjb21waWxlX2xpbWl0JTIwJTNEJTIwOTYlMjAlMjAlMjMlMjBkZWZhdWx0JTIwaXMlMjA4JTBBdG9yY2guX2R5bmFtby5jb25maWcuYWNjdW11bGF0ZWRfcmVjb21waWxlX2xpbWl0JTIwJTNEJTIwMjA0OCUyMCUyMCUyMyUyMGRlZmF1bHQlMjBpcyUyMDI1Ng==",highlighted:`torch._dynamo.config.recompile_limit = <span class="hljs-number">96</span>  <span class="hljs-comment"># default is 8</span>
torch._dynamo.config.accumulated_recompile_limit = <span class="hljs-number">2048</span>  <span class="hljs-comment"># default is 256</span>`,wrap:!1}}),Je=new zl({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/optimization/cache_dit.md"}}),{c(){M=p("meta"),j=s(),c=p("p"),U=s(),m(r.$$.fragment),d=s(),u=p("p"),u.textContent=Te,fe=s(),A=p("p"),A.innerHTML=hl,Ue=s(),G=p("p"),G.textContent=wl,de=s(),m(C.$$.fragment),ue=s(),Z=p("p"),Z.textContent=Jl,be=s(),m($.$$.fragment),Ce=s(),g=p("p"),g.innerHTML=Tl,Ie=s(),m(_.$$.fragment),Be=s(),k=p("p"),k.textContent=jl,Ae=s(),x=p("p"),x.innerHTML=fl,Ge=s(),X=p("p"),X.innerHTML=Ul,Ze=s(),m(Y.$$.fragment),$e=s(),m(F.$$.fragment),ge=s(),E=p("p"),E.innerHTML=dl,_e=s(),m(W.$$.fragment),ke=s(),v=p("p"),v.innerHTML=ul,xe=s(),m(Q.$$.fragment),Xe=s(),S=p("p"),S.innerHTML=bl,Ye=s(),m(V.$$.fragment),Fe=s(),N=p("p"),N.innerHTML=Cl,Ee=s(),R=p("p"),R.innerHTML=Il,We=s(),H=p("p"),H.innerHTML=Bl,ve=s(),m(L.$$.fragment),Qe=s(),D=p("p"),D.innerHTML=Al,Se=s(),m(z.$$.fragment),Ve=s(),m(P.$$.fragment),Ne=s(),m(q.$$.fragment),Re=s(),O=p("p"),O.innerHTML=Gl,He=s(),K=p("p"),K.textContent=Zl,Le=s(),ee=p("ul"),ee.innerHTML=$l,De=s(),m(le.$$.fragment),ze=s(),te=p("p"),te.innerHTML=gl,Pe=s(),m(ae.$$.fragment),qe=s(),se=p("p"),se.innerHTML=_l,Oe=s(),ne=p("p"),ne.textContent=kl,Ke=s(),m(Me.$$.fragment),el=s(),I=p("blockquote"),I.innerHTML=xl,ll=s(),m(ce.$$.fragment),tl=s(),pe=p("p"),pe.innerHTML=Xl,al=s(),m(ie.$$.fragment),sl=s(),m(re.$$.fragment),nl=s(),oe=p("p"),oe.innerHTML=Yl,Ml=s(),m(me.$$.fragment),cl=s(),ye=p("p"),ye.innerHTML=Fl,pl=s(),m(he.$$.fragment),il=s(),we=p("p"),we.innerHTML=El,rl=s(),m(Je.$$.fragment),ol=s(),je=p("p"),this.h()},l(e){const l=Ll("svelte-u9bgzb",document.head);M=i(l,"META",{name:!0,content:!0}),l.forEach(t),j=n(e),c=i(e,"P",{}),vl(c).forEach(t),U=n(e),y(r.$$.fragment,e),d=n(e),u=i(e,"P",{"data-svelte-h":!0}),o(u)!=="svelte-a4m664"&&(u.textContent=Te),fe=n(e),A=i(e,"P",{"data-svelte-h":!0}),o(A)!=="svelte-53qxzg"&&(A.innerHTML=hl),Ue=n(e),G=i(e,"P",{"data-svelte-h":!0}),o(G)!=="svelte-1g5mtjo"&&(G.textContent=wl),de=n(e),y(C.$$.fragment,e),ue=n(e),Z=i(e,"P",{"data-svelte-h":!0}),o(Z)!=="svelte-17xusda"&&(Z.textContent=Jl),be=n(e),y($.$$.fragment,e),Ce=n(e),g=i(e,"P",{"data-svelte-h":!0}),o(g)!=="svelte-2ejiue"&&(g.innerHTML=Tl),Ie=n(e),y(_.$$.fragment,e),Be=n(e),k=i(e,"P",{"data-svelte-h":!0}),o(k)!=="svelte-h5weta"&&(k.textContent=jl),Ae=n(e),x=i(e,"P",{"data-svelte-h":!0}),o(x)!=="svelte-1n4p4jc"&&(x.innerHTML=fl),Ge=n(e),X=i(e,"P",{"data-svelte-h":!0}),o(X)!=="svelte-2jtqkt"&&(X.innerHTML=Ul),Ze=n(e),y(Y.$$.fragment,e),$e=n(e),y(F.$$.fragment,e),ge=n(e),E=i(e,"P",{"data-svelte-h":!0}),o(E)!=="svelte-12jmp7v"&&(E.innerHTML=dl),_e=n(e),y(W.$$.fragment,e),ke=n(e),v=i(e,"P",{"data-svelte-h":!0}),o(v)!=="svelte-2e9gr4"&&(v.innerHTML=ul),xe=n(e),y(Q.$$.fragment,e),Xe=n(e),S=i(e,"P",{"data-svelte-h":!0}),o(S)!=="svelte-1cf72u"&&(S.innerHTML=bl),Ye=n(e),y(V.$$.fragment,e),Fe=n(e),N=i(e,"P",{"data-svelte-h":!0}),o(N)!=="svelte-1lpsu24"&&(N.innerHTML=Cl),Ee=n(e),R=i(e,"P",{"data-svelte-h":!0}),o(R)!=="svelte-13fck4t"&&(R.innerHTML=Il),We=n(e),H=i(e,"P",{"data-svelte-h":!0}),o(H)!=="svelte-1pjr02p"&&(H.innerHTML=Bl),ve=n(e),y(L.$$.fragment,e),Qe=n(e),D=i(e,"P",{"data-svelte-h":!0}),o(D)!=="svelte-oldsw1"&&(D.innerHTML=Al),Se=n(e),y(z.$$.fragment,e),Ve=n(e),y(P.$$.fragment,e),Ne=n(e),y(q.$$.fragment,e),Re=n(e),O=i(e,"P",{"data-svelte-h":!0}),o(O)!=="svelte-1b446h5"&&(O.innerHTML=Gl),He=n(e),K=i(e,"P",{"data-svelte-h":!0}),o(K)!=="svelte-1s3papx"&&(K.textContent=Zl),Le=n(e),ee=i(e,"UL",{"data-svelte-h":!0}),o(ee)!=="svelte-2bd58k"&&(ee.innerHTML=$l),De=n(e),y(le.$$.fragment,e),ze=n(e),te=i(e,"P",{"data-svelte-h":!0}),o(te)!=="svelte-1scjn5v"&&(te.innerHTML=gl),Pe=n(e),y(ae.$$.fragment,e),qe=n(e),se=i(e,"P",{"data-svelte-h":!0}),o(se)!=="svelte-134vs1n"&&(se.innerHTML=_l),Oe=n(e),ne=i(e,"P",{"data-svelte-h":!0}),o(ne)!=="svelte-vf09xa"&&(ne.textContent=kl),Ke=n(e),y(Me.$$.fragment,e),el=n(e),I=i(e,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),o(I)!=="svelte-12qv3of"&&(I.innerHTML=xl),ll=n(e),y(ce.$$.fragment,e),tl=n(e),pe=i(e,"P",{"data-svelte-h":!0}),o(pe)!=="svelte-bpk9jb"&&(pe.innerHTML=Xl),al=n(e),y(ie.$$.fragment,e),sl=n(e),y(re.$$.fragment,e),nl=n(e),oe=i(e,"P",{"data-svelte-h":!0}),o(oe)!=="svelte-1m7dmpb"&&(oe.innerHTML=Yl),Ml=n(e),y(me.$$.fragment,e),cl=n(e),ye=i(e,"P",{"data-svelte-h":!0}),o(ye)!=="svelte-1kanb2y"&&(ye.innerHTML=Fl),pl=n(e),y(he.$$.fragment,e),il=n(e),we=i(e,"P",{"data-svelte-h":!0}),o(we)!=="svelte-8nl96h"&&(we.innerHTML=El),rl=n(e),y(Je.$$.fragment,e),ol=n(e),je=i(e,"P",{}),vl(je).forEach(t),this.h()},h(){yl(M,"name","hf:doc:metadata"),yl(M,"content",lt),yl(I,"class","tip")},m(e,l){Dl(document.head,M),a(e,j,l),a(e,c,l),a(e,U,l),h(r,e,l),a(e,d,l),a(e,u,l),a(e,fe,l),a(e,A,l),a(e,Ue,l),a(e,G,l),a(e,de,l),h(C,e,l),a(e,ue,l),a(e,Z,l),a(e,be,l),h($,e,l),a(e,Ce,l),a(e,g,l),a(e,Ie,l),h(_,e,l),a(e,Be,l),a(e,k,l),a(e,Ae,l),a(e,x,l),a(e,Ge,l),a(e,X,l),a(e,Ze,l),h(Y,e,l),a(e,$e,l),h(F,e,l),a(e,ge,l),a(e,E,l),a(e,_e,l),h(W,e,l),a(e,ke,l),a(e,v,l),a(e,xe,l),h(Q,e,l),a(e,Xe,l),a(e,S,l),a(e,Ye,l),h(V,e,l),a(e,Fe,l),a(e,N,l),a(e,Ee,l),a(e,R,l),a(e,We,l),a(e,H,l),a(e,ve,l),h(L,e,l),a(e,Qe,l),a(e,D,l),a(e,Se,l),h(z,e,l),a(e,Ve,l),h(P,e,l),a(e,Ne,l),h(q,e,l),a(e,Re,l),a(e,O,l),a(e,He,l),a(e,K,l),a(e,Le,l),a(e,ee,l),a(e,De,l),h(le,e,l),a(e,ze,l),a(e,te,l),a(e,Pe,l),h(ae,e,l),a(e,qe,l),a(e,se,l),a(e,Oe,l),a(e,ne,l),a(e,Ke,l),h(Me,e,l),a(e,el,l),a(e,I,l),a(e,ll,l),h(ce,e,l),a(e,tl,l),a(e,pe,l),a(e,al,l),h(ie,e,l),a(e,sl,l),h(re,e,l),a(e,nl,l),a(e,oe,l),a(e,Ml,l),h(me,e,l),a(e,cl,l),a(e,ye,l),a(e,pl,l),h(he,e,l),a(e,il,l),a(e,we,l),a(e,rl,l),h(Je,e,l),a(e,ol,l),a(e,je,l),ml=!0},p(e,[l]){const Wl={};l&2&&(Wl.$$scope={dirty:l,ctx:e}),C.$set(Wl)},i(e){ml||(w(r.$$.fragment,e),w(C.$$.fragment,e),w($.$$.fragment,e),w(_.$$.fragment,e),w(Y.$$.fragment,e),w(F.$$.fragment,e),w(W.$$.fragment,e),w(Q.$$.fragment,e),w(V.$$.fragment,e),w(L.$$.fragment,e),w(z.$$.fragment,e),w(P.$$.fragment,e),w(q.$$.fragment,e),w(le.$$.fragment,e),w(ae.$$.fragment,e),w(Me.$$.fragment,e),w(ce.$$.fragment,e),w(ie.$$.fragment,e),w(re.$$.fragment,e),w(me.$$.fragment,e),w(he.$$.fragment,e),w(Je.$$.fragment,e),ml=!0)},o(e){J(r.$$.fragment,e),J(C.$$.fragment,e),J($.$$.fragment,e),J(_.$$.fragment,e),J(Y.$$.fragment,e),J(F.$$.fragment,e),J(W.$$.fragment,e),J(Q.$$.fragment,e),J(V.$$.fragment,e),J(L.$$.fragment,e),J(z.$$.fragment,e),J(P.$$.fragment,e),J(q.$$.fragment,e),J(le.$$.fragment,e),J(ae.$$.fragment,e),J(Me.$$.fragment,e),J(ce.$$.fragment,e),J(ie.$$.fragment,e),J(re.$$.fragment,e),J(me.$$.fragment,e),J(he.$$.fragment,e),J(Je.$$.fragment,e),ml=!1},d(e){e&&(t(j),t(c),t(U),t(d),t(u),t(fe),t(A),t(Ue),t(G),t(de),t(ue),t(Z),t(be),t(Ce),t(g),t(Ie),t(Be),t(k),t(Ae),t(x),t(Ge),t(X),t(Ze),t($e),t(ge),t(E),t(_e),t(ke),t(v),t(xe),t(Xe),t(S),t(Ye),t(Fe),t(N),t(Ee),t(R),t(We),t(H),t(ve),t(Qe),t(D),t(Se),t(Ve),t(Ne),t(Re),t(O),t(He),t(K),t(Le),t(ee),t(De),t(ze),t(te),t(Pe),t(qe),t(se),t(Oe),t(ne),t(Ke),t(el),t(I),t(ll),t(tl),t(pe),t(al),t(sl),t(nl),t(oe),t(Ml),t(cl),t(ye),t(pl),t(il),t(we),t(rl),t(ol),t(je)),t(M),T(r,e),T(C,e),T($,e),T(_,e),T(Y,e),T(F,e),T(W,e),T(Q,e),T(V,e),T(L,e),T(z,e),T(P,e),T(q,e),T(le,e),T(ae,e),T(Me,e),T(ce,e),T(ie,e),T(re,e),T(me,e),T(he,e),T(Je,e)}}}const lt='{"title":"CacheDiT","local":"cachedit","sections":[],"depth":2}';function tt(b){return Nl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pt extends Rl{constructor(M){super(),Hl(this,M,tt,et,Vl,{})}}export{pt as component};
