import{s as Po,o as Bo,n as Be}from"../chunks/scheduler.53228c21.js";import{S as Xo,i as Do,e as a,s as o,c as u,q as No,H as Fo,h as qo,a as r,d,b as s,f as k,g as h,r as Lo,v as Yo,j as f,k as w,l as t,m as x,n as g,t as b,o as _,p as y}from"../chunks/index.100fac89.js";import{C as Qo}from"../chunks/CopyLLMTxtMenu.2cdbb51f.js";import{D as C}from"../chunks/Docstring.d46840f1.js";import{C as Xe}from"../chunks/CodeBlock.d30a6509.js";import{E as Pe}from"../chunks/ExampleCodeBlock.220b4f6e.js";import{H as no,E as So}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.3fcbbc76.js";function Ao(U){let i,T="Example:",v,l,p;return l=new Xe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvZ1ZpZGVvWFRyYW5zZm9ybWVyM0RNb2RlbCUwQSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQ29nVmlkZW9YVHJhbnNmb3JtZXIzRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJUSFVETSUyRkNvZ1ZpZGVvWC01YiUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnRyYW5zZm9ybWVyJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSklMEElMEF0cmFuc2Zvcm1lci5lbmFibGVfZ3JvdXBfb2ZmbG9hZCglMEElMjAlMjAlMjAlMjBvbmxvYWRfZGV2aWNlJTNEdG9yY2guZGV2aWNlKCUyMmN1ZGElMjIpJTJDJTBBJTIwJTIwJTIwJTIwb2ZmbG9hZF9kZXZpY2UlM0R0b3JjaC5kZXZpY2UoJTIyY3B1JTIyKSUyQyUwQSUyMCUyMCUyMCUyMG9mZmxvYWRfdHlwZSUzRCUyMmxlYWZfbGV2ZWwlMjIlMkMlMEElMjAlMjAlMjAlMjB1c2Vfc3RyZWFtJTNEVHJ1ZSUyQyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXTransformer3DModel

<span class="hljs-meta">&gt;&gt;&gt; </span>transformer = CogVideoXTransformer3DModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;THUDM/CogVideoX-5b&quot;</span>, subfolder=<span class="hljs-string">&quot;transformer&quot;</span>, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>transformer.enable_group_offload(
<span class="hljs-meta">... </span>    onload_device=torch.device(<span class="hljs-string">&quot;cuda&quot;</span>),
<span class="hljs-meta">... </span>    offload_device=torch.device(<span class="hljs-string">&quot;cpu&quot;</span>),
<span class="hljs-meta">... </span>    offload_type=<span class="hljs-string">&quot;leaf_level&quot;</span>,
<span class="hljs-meta">... </span>    use_stream=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(n){i=r(n,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=T),v=s(n),h(l.$$.fragment,n)},m(n,$){x(n,i,$),x(n,v,$),g(l,n,$),p=!0},p:Be,i(n){p||(b(l.$$.fragment,n),p=!0)},o(n){_(l.$$.fragment,n),p=!1},d(n){n&&(d(i),d(v)),y(l,n)}}}function Oo(U){let i,T='Using <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.enable_layerwise_casting">enable_layerwise_casting()</a>:',v,l,p;return l=new Xe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMENvZ1ZpZGVvWFRyYW5zZm9ybWVyM0RNb2RlbCUwQSUwQXRyYW5zZm9ybWVyJTIwJTNEJTIwQ29nVmlkZW9YVHJhbnNmb3JtZXIzRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJUSFVETSUyRkNvZ1ZpZGVvWC01YiUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnRyYW5zZm9ybWVyJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNiUwQSklMEElMEElMjMlMjBFbmFibGUlMjBsYXllcndpc2UlMjBjYXN0aW5nJTIwdmlhJTIwdGhlJTIwbW9kZWwlMkMlMjB3aGljaCUyMGlnbm9yZXMlMjBjZXJ0YWluJTIwbW9kdWxlcyUyMGJ5JTIwZGVmYXVsdCUwQXRyYW5zZm9ybWVyLmVuYWJsZV9sYXllcndpc2VfY2FzdGluZyhzdG9yYWdlX2R0eXBlJTNEdG9yY2guZmxvYXQ4X2U0bTNmbiUyQyUyMGNvbXB1dGVfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> CogVideoXTransformer3DModel

<span class="hljs-meta">&gt;&gt;&gt; </span>transformer = CogVideoXTransformer3DModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;THUDM/CogVideoX-5b&quot;</span>, subfolder=<span class="hljs-string">&quot;transformer&quot;</span>, torch_dtype=torch.bfloat16
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Enable layerwise casting via the model, which ignores certain modules by default</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>transformer.enable_layerwise_casting(storage_dtype=torch.float8_e4m3fn, compute_dtype=torch.bfloat16)`,wrap:!1}}),{c(){i=a("p"),i.innerHTML=T,v=o(),u(l.$$.fragment)},l(n){i=r(n,"P",{"data-svelte-h":!0}),f(i)!=="svelte-1anawjo"&&(i.innerHTML=T),v=s(n),h(l.$$.fragment,n)},m(n,$){x(n,i,$),x(n,v,$),g(l,n,$),p=!0},p:Be,i(n){p||(b(l.$$.fragment,n),p=!0)},o(n){_(l.$$.fragment,n),p=!1},d(n){n&&(d(i),d(v)),y(l,n)}}}function Ko(U){let i,T="Examples:",v,l,p;return l=new Xe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQW1vZGVsJTIwJTNEJTIwVU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnN0YWJpbGl0eWFpJTJGc3RhYmxlLWRpZmZ1c2lvbi0yLTElMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTBBKSUwQW1vZGVsJTIwJTNEJTIwbW9kZWwudG8oJTIyY3VkYSUyMiklMEFtb2RlbC5lbmFibGVfeGZvcm1lcnNfbWVtb3J5X2VmZmljaWVudF9hdHRlbnRpb24oYXR0ZW50aW9uX29wJTNETWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>model = UNet2DConditionModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = model.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)`,wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(n){i=r(n,"P",{"data-svelte-h":!0}),f(i)!=="svelte-kvfsh7"&&(i.textContent=T),v=s(n),h(l.$$.fragment,n)},m(n,$){x(n,i,$),x(n,v,$),g(l,n,$),p=!0},p:Be,i(n){p||(b(l.$$.fragment,n),p=!0)},o(n){_(l.$$.fragment,n),p=!1},d(n){n&&(d(i),d(v)),y(l,n)}}}function es(U){let i,T="Example:",v,l,p;return l=new Xe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel

unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(n){i=r(n,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=T),v=s(n),h(l.$$.fragment,n)},m(n,$){x(n,i,$),x(n,v,$),g(l,n,$),p=!0},p:Be,i(n){p||(b(l.$$.fragment,n),p=!0)},o(n){_(l.$$.fragment,n),p=!1},d(n){n&&(d(i),d(v)),y(l,n)}}}function ts(U){let i,T="If you get the error message below, you need to finetune the weights for your downstream task:",v,l,p;return l=new Xe({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwcnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjBhbmQlMjBhcmUlMjBuZXdseSUyMGluaXRpYWxpemVkJTIwYmVjYXVzZSUyMHRoZSUyMHNoYXBlcyUyMGRpZCUyMG5vdCUyMG1hdGNoJTNBJTBBLSUyMGNvbnZfaW4ud2VpZ2h0JTNBJTIwZm91bmQlMjBzaGFwZSUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwNCUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwY2hlY2twb2ludCUyMGFuZCUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwOSUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`Some weights of UNet2DConditionModel were not initialized from the model checkpoint at runwayml/stable-diffusion-v1-5 and are newly initialized because the shapes did not match:
- conv_in.weight: found shape torch.Size([320, 4, 3, 3]) <span class="hljs-keyword">in</span> the checkpoint and torch.Size([320, 9, 3, 3]) <span class="hljs-keyword">in</span> the model instantiated
You should probably TRAIN this model on a down-stream task to be able to use it <span class="hljs-keyword">for</span> predictions and inference.`,wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(n){i=r(n,"P",{"data-svelte-h":!0}),f(i)!=="svelte-xueb0m"&&(i.textContent=T),v=s(n),h(l.$$.fragment,n)},m(n,$){x(n,i,$),x(n,v,$),g(l,n,$),p=!0},p:Be,i(n){p||(b(l.$$.fragment,n),p=!0)},o(n){_(l.$$.fragment,n),p=!1},d(n){n&&(d(i),d(v)),y(l,n)}}}function ns(U){let i,T="Example:",v,l,p;return l=new Xe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBbW9kZWxfaWQlMjAlM0QlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUwQXVuZXQlMjAlM0QlMjBVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBzdWJmb2xkZXIlM0QlMjJ1bmV0JTIyKSUwQXVuZXQubnVtX3BhcmFtZXRlcnMob25seV90cmFpbmFibGUlM0RUcnVlKSUwQTg1OTUyMDk2NA==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel

model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
unet = UNet2DConditionModel.from_pretrained(model_id, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)
unet.num_parameters(only_trainable=<span class="hljs-literal">True</span>)
<span class="hljs-number">859520964</span>`,wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(n){i=r(n,"P",{"data-svelte-h":!0}),f(i)!=="svelte-11lpom8"&&(i.textContent=T),v=s(n),h(l.$$.fragment,n)},m(n,$){x(n,i,$),x(n,v,$),g(l,n,$),p=!0},p:Be,i(n){p||(b(l.$$.fragment,n),p=!0)},o(n){_(l.$$.fragment,n),p=!1},d(n){n&&(d(i),d(v)),y(l,n)}}}function os(U){let i,T="Examples:",v,l,p;return l=new Xe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTBBJTBBdW5ldCUyMCUzRCUyMFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJzdGFiaWxpdHlhaSUyRnN0YWJsZS1kaWZmdXNpb24tMiUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnVuZXQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMCU2MHVuZXQlNjAlMjB0byUyMHlvdXIlMjBuYW1lc3BhY2UlMjB3aXRoJTIwdGhlJTIwbmFtZSUyMCUyMm15LWZpbmV0dW5lZC11bmV0JTIyLiUwQXVuZXQucHVzaF90b19odWIoJTIybXktZmluZXR1bmVkLXVuZXQlMjIpJTBBJTBBJTIzJTIwUHVzaCUyMHRoZSUyMCU2MHVuZXQlNjAlMjB0byUyMGFuJTIwb3JnYW5pemF0aW9uJTIwd2l0aCUyMHRoZSUyMG5hbWUlMjAlMjJteS1maW5ldHVuZWQtdW5ldCUyMi4lMEF1bmV0LnB1c2hfdG9faHViKCUyMnlvdXItb3JnJTJGbXktZmluZXR1bmVkLXVuZXQlMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel

unet = UNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)

<span class="hljs-comment"># Push the \`unet\` to your namespace with the name &quot;my-finetuned-unet&quot;.</span>
unet.push_to_hub(<span class="hljs-string">&quot;my-finetuned-unet&quot;</span>)

<span class="hljs-comment"># Push the \`unet\` to an organization with the name &quot;my-finetuned-unet&quot;.</span>
unet.push_to_hub(<span class="hljs-string">&quot;your-org/my-finetuned-unet&quot;</span>)`,wrap:!1}}),{c(){i=a("p"),i.textContent=T,v=o(),u(l.$$.fragment)},l(n){i=r(n,"P",{"data-svelte-h":!0}),f(i)!=="svelte-kvfsh7"&&(i.textContent=T),v=s(n),h(l.$$.fragment,n)},m(n,$){x(n,i,$),x(n,v,$),g(l,n,$),p=!0},p:Be,i(n){p||(b(l.$$.fragment,n),p=!0)},o(n){_(l.$$.fragment,n),p=!1},d(n){n&&(d(i),d(v)),y(l,n)}}}function ss(U){let i,T,v,l,p,n,$,Ct,z,qt,Ut,zo='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>p</mi><mi>θ</mi></msub><mo stretchy="false">(</mo><msub><mi>x</mi><mrow><mi>t</mi><mo>−</mo><mn>1</mn></mrow></msub><mi mathvariant="normal">∣</mi><msub><mi>x</mi><mi>t</mi></msub><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">p_{\\theta}(x_{t-1}|x_{t})</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">p</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3361em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.02778em;">θ</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3011em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">t</span><span class="mbin mtight">−</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span><span class="mord">∣</span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.2806em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">t</span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>',Zt,Jt,de,oo='All models are built from the base <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin">ModelMixin</a> class which is a <a href="https://pytorch.org/docs/stable/generated/torch.nn.Module.html" rel="nofollow"><code>torch.nn.Module</code></a> providing basic functionality for saving and loading models, locally and from the Hugging Face Hub.',jt,me,Vt,m,ce,Yt,De,so="Base class for all models.",Qt,Fe,ao=`<a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin">ModelMixin</a> takes care of storing the model configuration and provides methods for loading, downloading and
saving models.`,St,qe,ro='<li><strong>config_name</strong> (<code>str</code>) — Filename to save a model to when calling <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.save_pretrained">save_pretrained()</a>.</li>',At,V,pe,Ot,Ye,io=`Compiles <em>only</em> the frequently repeated sub-modules of a model (e.g. the Transformer layers) instead of
compiling the entire model. This technique—often called <strong>regional compilation</strong> (see the PyTorch recipe
<a href="https://docs.pytorch.org/tutorials/recipes/regional_compilation.html" rel="nofollow">https://docs.pytorch.org/tutorials/recipes/regional_compilation.html</a>) can reduce end-to-end compile time
substantially, while preserving the runtime speed-ups you would expect from a full <code>torch.compile</code>.`,Kt,Qe,lo=`The set of sub-modules to compile is discovered by the presence of <strong><code>_repeated_blocks</code></strong> attribute in the
model definition. Define this attribute on your model subclass as a list/tuple of class names (strings). Every
module whose class name matches will be compiled.`,en,Se,mo=`Once discovered, each matching sub-module is compiled by calling <code>submodule.compile(*args, **kwargs)</code>. Any
positional or keyword arguments you supply to <code>compile_repeated_blocks</code> are forwarded verbatim to
<code>torch.compile</code>.`,tn,P,fe,nn,Ae,co=`Potentially dequantize the model in case it has been quantized by a quantization method that support
dequantization.`,on,B,ue,sn,Oe,po=`Deactivates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or
<em>checkpoint activations</em> in other frameworks).`,an,X,he,rn,Ke,fo="disable npu flash attention from torch_npu",ln,D,ge,dn,et,uo='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',mn,F,be,cn,tt,ho="Disable the flash attention pallals kernel for torch_xla.",pn,q,_e,fn,nt,go=`Activates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or
<em>checkpoint activations</em> in other frameworks).`,un,W,ye,hn,ot,bo="Activates group offloading for the current model.",gn,st,_o='See <a href="/docs/diffusers/main/en/api/utilities#diffusers.hooks.apply_group_offloading">apply_group_offloading()</a> for more information.',bn,Y,_n,Z,ve,yn,at,yo="Activates layerwise casting for the current model.",vn,rt,vo=`Layerwise casting is a technique that casts the model weights to a lower precision dtype for storage but
upcasts them on-the-fly to a higher precision dtype for computation. This process can significantly reduce the
memory footprint from model weights, but may lead to some quality degradation in the outputs. Most degradations
are negligible, mostly stemming from weight casting in normalization and modulation layers.`,Mn,it,Mo=`By default, most models in diffusers set the <code>_skip_layerwise_casting_patterns</code> attribute to ignore patch
embedding, positional embedding and normalization layers. This is because these layers are most likely
precision-critical for quality. If you wish to change this behavior, you can set the
<code>_skip_layerwise_casting_patterns</code> attribute to <code>None</code>, or call
<a href="/docs/diffusers/main/en/api/utilities#diffusers.hooks.apply_layerwise_casting">apply_layerwise_casting()</a> with custom arguments.`,$n,lt,$o="Example:",xn,Q,wn,S,Me,Tn,dt,xo="Enable npu flash attention from torch_npu",kn,j,$e,Cn,mt,wo='Enable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',Un,ct,To=`When this option is enabled, you should observe lower GPU memory usage and a potential speed up during
inference. Speed up during training is not guaranteed.`,Zn,xe,ko=`<p>&gt; ⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient
attention takes &gt; precedent.</p>`,Jn,A,jn,O,we,Vn,pt,Co="Enable the flash attention pallals kernel for torch_xla.",Wn,J,Te,Gn,ft,Uo="Instantiate a pretrained PyTorch model from a pretrained model configuration.",Hn,ut,Zo=`The model is set in evaluation mode - <code>model.eval()</code> - by default, and dropout modules are deactivated. To
train the model, set it back in training mode with <code>model.train()</code>.`,In,ke,Jo=`<p>&gt; To use private or <a href="https://huggingface.co/docs/hub/models-gated#gated-models" rel="nofollow">gated models</a>, log-in
with <code>hf &gt; auth login</code>. You can also activate the special &gt;
<a href="https://huggingface.co/diffusers/installation.html#offline-mode" rel="nofollow">“offline-mode”</a> to use this method in a &gt;
firewalled environment.</p>`,En,K,Rn,ee,Nn,te,Ce,Ln,ht,jo=`Get the memory footprint of a model. This will return the memory footprint of the current model in bytes.
Useful to benchmark the memory footprint of the current model and design some tests. Solution inspired from the
PyTorch discussions: <a href="https://discuss.pytorch.org/t/gpu-memory-that-model-uses/56822/2" rel="nofollow">https://discuss.pytorch.org/t/gpu-memory-that-model-uses/56822/2</a>`,zn,R,Ue,Pn,gt,Vo="Get number of (trainable or non-embedding) parameters in the module.",Bn,ne,Xn,oe,Ze,Dn,bt,Wo=`Resets the attention backend for the model. Following calls to <code>forward</code> will use the environment default, if
set, or the torch native scaled dot product attention.`,Fn,se,Je,qn,_t,Go=`Save a model and its configuration file to a directory so that it can be reloaded using the
<a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.from_pretrained">from_pretrained()</a> class method.`,Yn,ae,je,Qn,yt,Ho="Set the attention backend for the model.",Sn,re,Ve,An,vt,Io="Set the switch for the npu flash attention.",Wt,We,Gt,I,Ge,On,Mt,Eo="A Mixin to push a model, scheduler, or pipeline to the Hugging Face Hub.",Kn,N,He,eo,$t,Ro="Upload model, scheduler, or pipeline files to the 🤗 Hugging Face Hub.",to,ie,Ht,Ie,It,kt,Et;return p=new Qo({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),$=new no({props:{title:"Models",local:"models",headingTag:"h1"}}),me=new no({props:{title:"ModelMixin",local:"diffusers.ModelMixin",headingTag:"h2"}}),ce=new C({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L233"}}),pe=new C({props:{name:"compile_repeated_blocks",anchor:"diffusers.ModelMixin.compile_repeated_blocks",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L1447"}}),fe=new C({props:{name:"dequantize",anchor:"diffusers.ModelMixin.dequantize",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L794"}}),ue=new C({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L315"}}),he=new C({props:{name:"disable_npu_flash_attention",anchor:"diffusers.ModelMixin.disable_npu_flash_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L346"}}),ge=new C({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L431"}}),be=new C({props:{name:"disable_xla_flash_attention",anchor:"diffusers.ModelMixin.disable_xla_flash_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L376"}}),_e=new C({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[{name:"gradient_checkpointing_func",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_gradient_checkpointing.gradient_checkpointing_func",description:`<strong>gradient_checkpointing_func</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
The function to use for gradient checkpointing. If <code>None</code>, the default PyTorch checkpointing function
is used (<code>torch.utils.checkpoint.checkpoint</code>).`,name:"gradient_checkpointing_func"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L285"}}),ye=new C({props:{name:"enable_group_offload",anchor:"diffusers.ModelMixin.enable_group_offload",parameters:[{name:"onload_device",val:": device"},{name:"offload_device",val:": device = device(type='cpu')"},{name:"offload_type",val:": str = 'block_level'"},{name:"num_blocks_per_group",val:": typing.Optional[int] = None"},{name:"non_blocking",val:": bool = False"},{name:"use_stream",val:": bool = False"},{name:"record_stream",val:": bool = False"},{name:"low_cpu_mem_usage",val:" = False"},{name:"offload_to_disk_path",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L522"}}),Y=new Pe({props:{anchor:"diffusers.ModelMixin.enable_group_offload.example",$$slots:{default:[Ao]},$$scope:{ctx:U}}}),ve=new C({props:{name:"enable_layerwise_casting",anchor:"diffusers.ModelMixin.enable_layerwise_casting",parameters:[{name:"storage_dtype",val:": dtype = torch.float8_e4m3fn"},{name:"compute_dtype",val:": typing.Optional[torch.dtype] = None"},{name:"skip_modules_pattern",val:": typing.Optional[typing.Tuple[str, ...]] = None"},{name:"skip_modules_classes",val:": typing.Optional[typing.Tuple[typing.Type[torch.nn.modules.module.Module], ...]] = None"},{name:"non_blocking",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_layerwise_casting.storage_dtype",description:`<strong>storage_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The dtype to which the model should be cast for storage.`,name:"storage_dtype"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.compute_dtype",description:`<strong>compute_dtype</strong> (<code>torch.dtype</code>) &#x2014;
The dtype to which the model weights should be cast during the forward pass.`,name:"compute_dtype"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.skip_modules_pattern",description:`<strong>skip_modules_pattern</strong> (<code>Tuple[str, ...]</code>, <em>optional</em>) &#x2014;
A list of patterns to match the names of the modules to skip during the layerwise casting process. If
set to <code>None</code>, default skip patterns are used to ignore certain internal layers of modules and PEFT
layers.`,name:"skip_modules_pattern"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.skip_modules_classes",description:`<strong>skip_modules_classes</strong> (<code>Tuple[Type[torch.nn.Module], ...]</code>, <em>optional</em>) &#x2014;
A list of module classes to skip during the layerwise casting process.`,name:"skip_modules_classes"},{anchor:"diffusers.ModelMixin.enable_layerwise_casting.non_blocking",description:`<strong>non_blocking</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If <code>True</code>, the weight casting operations are non-blocking.`,name:"non_blocking"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L437"}}),Q=new Pe({props:{anchor:"diffusers.ModelMixin.enable_layerwise_casting.example",$$slots:{default:[Oo]},$$scope:{ctx:U}}}),Me=new C({props:{name:"enable_npu_flash_attention",anchor:"diffusers.ModelMixin.enable_npu_flash_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L339"}}),$e=new C({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L399"}}),A=new Pe({props:{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ko]},$$scope:{ctx:U}}}),we=new C({props:{name:"enable_xla_flash_attention",anchor:"diffusers.ModelMixin.enable_xla_flash_attention",parameters:[{name:"partition_spec",val:": typing.Optional[typing.Callable] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L370"}}),Te=new C({props:{name:"from_pretrained",anchor:"diffusers.ModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike, NoneType]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ModelMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>google/ddpm-celebahq-256</code>) of a pretrained model hosted on
the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_model_directory</code>) containing the model weights saved
with <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.ModelMixin.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory where a downloaded pretrained model configuration is cached if the standard cache
is not used.`,name:"cache_dir"},{anchor:"diffusers.ModelMixin.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype.`,name:"torch_dtype"},{anchor:"diffusers.ModelMixin.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.ModelMixin.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, for example, <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.ModelMixin.from_pretrained.output_loading_info",description:`<strong>output_loading_info</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info"},{anchor:"diffusers.ModelMixin.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to only load local model weights and configuration files or not. If set to <code>True</code>, the model
won&#x2019;t be downloaded from the Hub.`,name:"local_files_only(bool,"},{anchor:"diffusers.ModelMixin.from_pretrained.token",description:`<strong>token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, the token generated from
<code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>) is used.`,name:"token"},{anchor:"diffusers.ModelMixin.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
allowed by Git.`,name:"revision"},{anchor:"diffusers.ModelMixin.from_pretrained.from_flax",description:`<strong>from_flax</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a Flax checkpoint save file.`,name:"from_flax"},{anchor:"diffusers.ModelMixin.from_pretrained.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
The subfolder location of a model file within a larger model repository on the Hub or locally.`,name:"subfolder"},{anchor:"diffusers.ModelMixin.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to resolve accessibility issues if you&#x2019;re downloading a model in China. We do not
guarantee the timeliness or safety of the source, and you should refer to the mirror site for more
information.`,name:"mirror"},{anchor:"diffusers.ModelMixin.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>Union[int, str, torch.device]</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be defined for each
parameter/buffer name; once a given module name is inside, every submodule of it will be sent to the
same device. Defaults to <code>None</code>, meaning that the model will be loaded on CPU.</p>
<p>Examples:`,name:"device_map"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L806"}}),K=new Pe({props:{anchor:"diffusers.ModelMixin.from_pretrained.example",$$slots:{default:[es]},$$scope:{ctx:U}}}),ee=new Pe({props:{anchor:"diffusers.ModelMixin.from_pretrained.example-2",$$slots:{default:[ts]},$$scope:{ctx:U}}}),Ce=new C({props:{name:"get_memory_footprint",anchor:"diffusers.ModelMixin.get_memory_footprint",parameters:[{name:"return_buffers",val:" = True"}],parametersDescription:[{anchor:"diffusers.ModelMixin.get_memory_footprint.return_buffers",description:`<strong>return_buffers</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to return the size of the buffer tensors in the computation of the memory footprint. Buffers
are tensors that do not require gradients and not registered as parameters. E.g. mean and std in batch
norm layers. Please see: <a href="https://discuss.pytorch.org/t/what-pytorch-means-by-buffers/120266/2" rel="nofollow">https://discuss.pytorch.org/t/what-pytorch-means-by-buffers/120266/2</a>`,name:"return_buffers"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L1849"}}),Ue=new C({props:{name:"num_parameters",anchor:"diffusers.ModelMixin.num_parameters",parameters:[{name:"only_trainable",val:": bool = False"},{name:"exclude_embeddings",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.ModelMixin.num_parameters.only_trainable",description:`<strong>only_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of trainable parameters.`,name:"only_trainable"},{anchor:"diffusers.ModelMixin.num_parameters.exclude_embeddings",description:`<strong>exclude_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of non-embedding parameters.`,name:"exclude_embeddings"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L1785",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The number of parameters.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>int</code></p>
`}}),ne=new Pe({props:{anchor:"diffusers.ModelMixin.num_parameters.example",$$slots:{default:[ns]},$$scope:{ctx:U}}}),Ze=new C({props:{name:"reset_attention_backend",anchor:"diffusers.ModelMixin.reset_attention_backend",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L620"}}),Je=new C({props:{name:"save_pretrained",anchor:"diffusers.ModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"is_main_process",val:": bool = True"},{name:"save_function",val:": typing.Optional[typing.Callable] = None"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": typing.Optional[str] = None"},{name:"max_shard_size",val:": typing.Union[int, str] = '10GB'"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ModelMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save a model and its configuration file to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.ModelMixin.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful during distributed training and you
need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on the main
process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.ModelMixin.save_pretrained.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful during distributed training when you need to
replace <code>torch.save</code> with another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.ModelMixin.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"},{anchor:"diffusers.ModelMixin.save_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified, weights are saved in the format <code>pytorch_model.&lt;variant&gt;.bin</code>.`,name:"variant"},{anchor:"diffusers.ModelMixin.save_pretrained.max_shard_size",description:`<strong>max_shard_size</strong> (<code>int</code> or <code>str</code>, defaults to <code>&quot;10GB&quot;</code>) &#x2014;
The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size
lower than this size. If expressed as a string, needs to be digits followed by a unit (like <code>&quot;5GB&quot;</code>).
If expressed as an integer, the unit is bytes. Note that this limit will be decreased after a certain
period of time (starting from Oct 2024) to allow users to upgrade to the latest version of <code>diffusers</code>.
This is to establish a common default size for this argument across different libraries in the Hugging
Face ecosystem (<code>transformers</code>, and <code>accelerate</code>, for example).`,name:"max_shard_size"},{anchor:"diffusers.ModelMixin.save_pretrained.push_to_hub",description:`<strong>push_to_hub</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to push your model to the Hugging Face Hub after saving it. You can specify the
repository you want to push to with <code>repo_id</code> (will default to the name of <code>save_directory</code> in your
namespace).`,name:"push_to_hub"},{anchor:"diffusers.ModelMixin.save_pretrained.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the <a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L639"}}),je=new C({props:{name:"set_attention_backend",anchor:"diffusers.ModelMixin.set_attention_backend",parameters:[{name:"backend",val:": str"}],parametersDescription:[{anchor:"diffusers.ModelMixin.set_attention_backend.backend",description:`<strong>backend</strong> (<code>str</code>) &#x2014;
The name of the backend to set. Must be one of the available backends defined in
<code>AttentionBackendName</code>. Available backends can be found in
<code>diffusers.attention_dispatch.AttentionBackendName</code>. Defaults to torch native scaled dot product
attention as backend.`,name:"backend"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L585"}}),Ve=new C({props:{name:"set_use_npu_flash_attention",anchor:"diffusers.ModelMixin.set_use_npu_flash_attention",parameters:[{name:"valid",val:": bool"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L323"}}),We=new no({props:{title:"PushToHubMixin",local:"diffusers.utils.PushToHubMixin",headingTag:"h2"}}),Ge=new C({props:{name:"class diffusers.utils.PushToHubMixin",anchor:"diffusers.utils.PushToHubMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/hub_utils.py#L464"}}),He=new C({props:{name:"push_to_hub",anchor:"diffusers.utils.PushToHubMixin.push_to_hub",parameters:[{name:"repo_id",val:": str"},{name:"commit_message",val:": typing.Optional[str] = None"},{name:"private",val:": typing.Optional[bool] = None"},{name:"token",val:": typing.Optional[str] = None"},{name:"create_pr",val:": bool = False"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": typing.Optional[str] = None"},{name:"subfolder",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.repo_id",description:`<strong>repo_id</strong> (<code>str</code>) &#x2014;
The name of the repository you want to push your model, scheduler, or pipeline files to. It should
contain your organization name when pushing to an organization. <code>repo_id</code> can also be a path to a local
directory.`,name:"repo_id"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.commit_message",description:`<strong>commit_message</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Message to commit while pushing. Default to <code>&quot;Upload {object}&quot;</code>.`,name:"commit_message"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.private",description:`<strong>private</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether to make the repo private. If <code>None</code> (default), the repo will be public unless the
organization&#x2019;s default is private. This value is ignored if the repo already exists.`,name:"private"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.token",description:`<strong>token</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. The token generated when running <code>hf auth login</code> (stored in <code>~/.huggingface</code>).`,name:"token"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.create_pr",description:`<strong>create_pr</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to create a PR with the uploaded files or directly commit.`,name:"create_pr"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to convert the model weights to the <code>safetensors</code> format.`,name:"safe_serialization"},{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified, weights are saved in the format <code>pytorch_model.&lt;variant&gt;.bin</code>.`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/utils/hub_utils.py#L499"}}),ie=new Pe({props:{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.example",$$slots:{default:[os]},$$scope:{ctx:U}}}),Ie=new So({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/overview.md"}}),{c(){i=a("meta"),T=o(),v=a("p"),l=o(),u(p.$$.fragment),n=o(),u($.$$.fragment),Ct=o(),z=a("p"),qt=No("🤗 Diffusers provides pretrained models for popular algorithms and modules to create custom diffusion systems. The primary function of models is to denoise an input sample as modeled by the distribution "),Ut=new Fo(!1),Zt=No("."),Jt=o(),de=a("p"),de.innerHTML=oo,jt=o(),u(me.$$.fragment),Vt=o(),m=a("div"),u(ce.$$.fragment),Yt=o(),De=a("p"),De.textContent=so,Qt=o(),Fe=a("p"),Fe.innerHTML=ao,St=o(),qe=a("ul"),qe.innerHTML=ro,At=o(),V=a("div"),u(pe.$$.fragment),Ot=o(),Ye=a("p"),Ye.innerHTML=io,Kt=o(),Qe=a("p"),Qe.innerHTML=lo,en=o(),Se=a("p"),Se.innerHTML=mo,tn=o(),P=a("div"),u(fe.$$.fragment),nn=o(),Ae=a("p"),Ae.textContent=co,on=o(),B=a("div"),u(ue.$$.fragment),sn=o(),Oe=a("p"),Oe.innerHTML=po,an=o(),X=a("div"),u(he.$$.fragment),rn=o(),Ke=a("p"),Ke.textContent=fo,ln=o(),D=a("div"),u(ge.$$.fragment),dn=o(),et=a("p"),et.innerHTML=uo,mn=o(),F=a("div"),u(be.$$.fragment),cn=o(),tt=a("p"),tt.textContent=ho,pn=o(),q=a("div"),u(_e.$$.fragment),fn=o(),nt=a("p"),nt.innerHTML=go,un=o(),W=a("div"),u(ye.$$.fragment),hn=o(),ot=a("p"),ot.textContent=bo,gn=o(),st=a("p"),st.innerHTML=_o,bn=o(),u(Y.$$.fragment),_n=o(),Z=a("div"),u(ve.$$.fragment),yn=o(),at=a("p"),at.textContent=yo,vn=o(),rt=a("p"),rt.textContent=vo,Mn=o(),it=a("p"),it.innerHTML=Mo,$n=o(),lt=a("p"),lt.textContent=$o,xn=o(),u(Q.$$.fragment),wn=o(),S=a("div"),u(Me.$$.fragment),Tn=o(),dt=a("p"),dt.textContent=xo,kn=o(),j=a("div"),u($e.$$.fragment),Cn=o(),mt=a("p"),mt.innerHTML=wo,Un=o(),ct=a("p"),ct.textContent=To,Zn=o(),xe=a("blockquote"),xe.innerHTML=ko,Jn=o(),u(A.$$.fragment),jn=o(),O=a("div"),u(we.$$.fragment),Vn=o(),pt=a("p"),pt.textContent=Co,Wn=o(),J=a("div"),u(Te.$$.fragment),Gn=o(),ft=a("p"),ft.textContent=Uo,Hn=o(),ut=a("p"),ut.innerHTML=Zo,In=o(),ke=a("blockquote"),ke.innerHTML=Jo,En=o(),u(K.$$.fragment),Rn=o(),u(ee.$$.fragment),Nn=o(),te=a("div"),u(Ce.$$.fragment),Ln=o(),ht=a("p"),ht.innerHTML=jo,zn=o(),R=a("div"),u(Ue.$$.fragment),Pn=o(),gt=a("p"),gt.textContent=Vo,Bn=o(),u(ne.$$.fragment),Xn=o(),oe=a("div"),u(Ze.$$.fragment),Dn=o(),bt=a("p"),bt.innerHTML=Wo,Fn=o(),se=a("div"),u(Je.$$.fragment),qn=o(),_t=a("p"),_t.innerHTML=Go,Yn=o(),ae=a("div"),u(je.$$.fragment),Qn=o(),yt=a("p"),yt.textContent=Ho,Sn=o(),re=a("div"),u(Ve.$$.fragment),An=o(),vt=a("p"),vt.textContent=Io,Wt=o(),u(We.$$.fragment),Gt=o(),I=a("div"),u(Ge.$$.fragment),On=o(),Mt=a("p"),Mt.textContent=Eo,Kn=o(),N=a("div"),u(He.$$.fragment),eo=o(),$t=a("p"),$t.textContent=Ro,to=o(),u(ie.$$.fragment),Ht=o(),u(Ie.$$.fragment),It=o(),kt=a("p"),this.h()},l(e){const M=qo("svelte-u9bgzb",document.head);i=r(M,"META",{name:!0,content:!0}),M.forEach(d),T=s(e),v=r(e,"P",{}),k(v).forEach(d),l=s(e),h(p.$$.fragment,e),n=s(e),h($.$$.fragment,e),Ct=s(e),z=r(e,"P",{});var Ee=k(z);qt=Lo(Ee,"🤗 Diffusers provides pretrained models for popular algorithms and modules to create custom diffusion systems. The primary function of models is to denoise an input sample as modeled by the distribution "),Ut=Yo(Ee,!1),Zt=Lo(Ee,"."),Ee.forEach(d),Jt=s(e),de=r(e,"P",{"data-svelte-h":!0}),f(de)!=="svelte-1elbdrk"&&(de.innerHTML=oo),jt=s(e),h(me.$$.fragment,e),Vt=s(e),m=r(e,"DIV",{class:!0});var c=k(m);h(ce.$$.fragment,c),Yt=s(c),De=r(c,"P",{"data-svelte-h":!0}),f(De)!=="svelte-12nk4t7"&&(De.textContent=so),Qt=s(c),Fe=r(c,"P",{"data-svelte-h":!0}),f(Fe)!=="svelte-ku6myw"&&(Fe.innerHTML=ao),St=s(c),qe=r(c,"UL",{"data-svelte-h":!0}),f(qe)!=="svelte-kvpw1l"&&(qe.innerHTML=ro),At=s(c),V=r(c,"DIV",{class:!0});var E=k(V);h(pe.$$.fragment,E),Ot=s(E),Ye=r(E,"P",{"data-svelte-h":!0}),f(Ye)!=="svelte-38nsj2"&&(Ye.innerHTML=io),Kt=s(E),Qe=r(E,"P",{"data-svelte-h":!0}),f(Qe)!=="svelte-1et28mh"&&(Qe.innerHTML=lo),en=s(E),Se=r(E,"P",{"data-svelte-h":!0}),f(Se)!=="svelte-k8xxs3"&&(Se.innerHTML=mo),E.forEach(d),tn=s(c),P=r(c,"DIV",{class:!0});var Re=k(P);h(fe.$$.fragment,Re),nn=s(Re),Ae=r(Re,"P",{"data-svelte-h":!0}),f(Ae)!=="svelte-on69a4"&&(Ae.textContent=co),Re.forEach(d),on=s(c),B=r(c,"DIV",{class:!0});var Ne=k(B);h(ue.$$.fragment,Ne),sn=s(Ne),Oe=r(Ne,"P",{"data-svelte-h":!0}),f(Oe)!=="svelte-jedy0o"&&(Oe.innerHTML=po),Ne.forEach(d),an=s(c),X=r(c,"DIV",{class:!0});var Le=k(X);h(he.$$.fragment,Le),rn=s(Le),Ke=r(Le,"P",{"data-svelte-h":!0}),f(Ke)!=="svelte-advgdt"&&(Ke.textContent=fo),Le.forEach(d),ln=s(c),D=r(c,"DIV",{class:!0});var ze=k(D);h(ge.$$.fragment,ze),dn=s(ze),et=r(ze,"P",{"data-svelte-h":!0}),f(et)!=="svelte-1vfte1e"&&(et.innerHTML=uo),ze.forEach(d),mn=s(c),F=r(c,"DIV",{class:!0});var Rt=k(F);h(be.$$.fragment,Rt),cn=s(Rt),tt=r(Rt,"P",{"data-svelte-h":!0}),f(tt)!=="svelte-l9u3py"&&(tt.textContent=ho),Rt.forEach(d),pn=s(c),q=r(c,"DIV",{class:!0});var Nt=k(q);h(_e.$$.fragment,Nt),fn=s(Nt),nt=r(Nt,"P",{"data-svelte-h":!0}),f(nt)!=="svelte-1rv66k9"&&(nt.innerHTML=go),Nt.forEach(d),un=s(c),W=r(c,"DIV",{class:!0});var le=k(W);h(ye.$$.fragment,le),hn=s(le),ot=r(le,"P",{"data-svelte-h":!0}),f(ot)!=="svelte-h27n1e"&&(ot.textContent=bo),gn=s(le),st=r(le,"P",{"data-svelte-h":!0}),f(st)!=="svelte-l2yd37"&&(st.innerHTML=_o),bn=s(le),h(Y.$$.fragment,le),le.forEach(d),_n=s(c),Z=r(c,"DIV",{class:!0});var G=k(Z);h(ve.$$.fragment,G),yn=s(G),at=r(G,"P",{"data-svelte-h":!0}),f(at)!=="svelte-1iclqp4"&&(at.textContent=yo),vn=s(G),rt=r(G,"P",{"data-svelte-h":!0}),f(rt)!=="svelte-1qne8y2"&&(rt.textContent=vo),Mn=s(G),it=r(G,"P",{"data-svelte-h":!0}),f(it)!=="svelte-ss6or"&&(it.innerHTML=Mo),$n=s(G),lt=r(G,"P",{"data-svelte-h":!0}),f(lt)!=="svelte-11lpom8"&&(lt.textContent=$o),xn=s(G),h(Q.$$.fragment,G),G.forEach(d),wn=s(c),S=r(c,"DIV",{class:!0});var Lt=k(S);h(Me.$$.fragment,Lt),Tn=s(Lt),dt=r(Lt,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-10xtjge"&&(dt.textContent=xo),Lt.forEach(d),kn=s(c),j=r(c,"DIV",{class:!0});var L=k(j);h($e.$$.fragment,L),Cn=s(L),mt=r(L,"P",{"data-svelte-h":!0}),f(mt)!=="svelte-yfpdyb"&&(mt.innerHTML=wo),Un=s(L),ct=r(L,"P",{"data-svelte-h":!0}),f(ct)!=="svelte-z1uct7"&&(ct.textContent=To),Zn=s(L),xe=r(L,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),f(xe)!=="svelte-3y0te0"&&(xe.innerHTML=ko),Jn=s(L),h(A.$$.fragment,L),L.forEach(d),jn=s(c),O=r(c,"DIV",{class:!0});var zt=k(O);h(we.$$.fragment,zt),Vn=s(zt),pt=r(zt,"P",{"data-svelte-h":!0}),f(pt)!=="svelte-17oym6v"&&(pt.textContent=Co),zt.forEach(d),Wn=s(c),J=r(c,"DIV",{class:!0});var H=k(J);h(Te.$$.fragment,H),Gn=s(H),ft=r(H,"P",{"data-svelte-h":!0}),f(ft)!=="svelte-1lisopl"&&(ft.textContent=Uo),Hn=s(H),ut=r(H,"P",{"data-svelte-h":!0}),f(ut)!=="svelte-1fnd9e6"&&(ut.innerHTML=Zo),In=s(H),ke=r(H,"BLOCKQUOTE",{class:!0,"data-svelte-h":!0}),f(ke)!=="svelte-82moo4"&&(ke.innerHTML=Jo),En=s(H),h(K.$$.fragment,H),Rn=s(H),h(ee.$$.fragment,H),H.forEach(d),Nn=s(c),te=r(c,"DIV",{class:!0});var Pt=k(te);h(Ce.$$.fragment,Pt),Ln=s(Pt),ht=r(Pt,"P",{"data-svelte-h":!0}),f(ht)!=="svelte-1o6lvix"&&(ht.innerHTML=jo),Pt.forEach(d),zn=s(c),R=r(c,"DIV",{class:!0});var xt=k(R);h(Ue.$$.fragment,xt),Pn=s(xt),gt=r(xt,"P",{"data-svelte-h":!0}),f(gt)!=="svelte-1jxmzhx"&&(gt.textContent=Vo),Bn=s(xt),h(ne.$$.fragment,xt),xt.forEach(d),Xn=s(c),oe=r(c,"DIV",{class:!0});var Bt=k(oe);h(Ze.$$.fragment,Bt),Dn=s(Bt),bt=r(Bt,"P",{"data-svelte-h":!0}),f(bt)!=="svelte-mecl9"&&(bt.innerHTML=Wo),Bt.forEach(d),Fn=s(c),se=r(c,"DIV",{class:!0});var Xt=k(se);h(Je.$$.fragment,Xt),qn=s(Xt),_t=r(Xt,"P",{"data-svelte-h":!0}),f(_t)!=="svelte-1y16a8m"&&(_t.innerHTML=Go),Xt.forEach(d),Yn=s(c),ae=r(c,"DIV",{class:!0});var Dt=k(ae);h(je.$$.fragment,Dt),Qn=s(Dt),yt=r(Dt,"P",{"data-svelte-h":!0}),f(yt)!=="svelte-e25n5q"&&(yt.textContent=Ho),Dt.forEach(d),Sn=s(c),re=r(c,"DIV",{class:!0});var Ft=k(re);h(Ve.$$.fragment,Ft),An=s(Ft),vt=r(Ft,"P",{"data-svelte-h":!0}),f(vt)!=="svelte-qmktby"&&(vt.textContent=Io),Ft.forEach(d),c.forEach(d),Wt=s(e),h(We.$$.fragment,e),Gt=s(e),I=r(e,"DIV",{class:!0});var wt=k(I);h(Ge.$$.fragment,wt),On=s(wt),Mt=r(wt,"P",{"data-svelte-h":!0}),f(Mt)!=="svelte-7y8zei"&&(Mt.textContent=Eo),Kn=s(wt),N=r(wt,"DIV",{class:!0});var Tt=k(N);h(He.$$.fragment,Tt),eo=s(Tt),$t=r(Tt,"P",{"data-svelte-h":!0}),f($t)!=="svelte-5nfhmh"&&($t.textContent=Ro),to=s(Tt),h(ie.$$.fragment,Tt),Tt.forEach(d),wt.forEach(d),Ht=s(e),h(Ie.$$.fragment,e),It=s(e),kt=r(e,"P",{}),k(kt).forEach(d),this.h()},h(){w(i,"name","hf:doc:metadata"),w(i,"content",as),Ut.a=Zt,w(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(xe,"class","warning"),w(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ke,"class","tip"),w(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(m,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),w(I,"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,M){t(document.head,i),x(e,T,M),x(e,v,M),x(e,l,M),g(p,e,M),x(e,n,M),g($,e,M),x(e,Ct,M),x(e,z,M),t(z,qt),Ut.m(zo,z),t(z,Zt),x(e,Jt,M),x(e,de,M),x(e,jt,M),g(me,e,M),x(e,Vt,M),x(e,m,M),g(ce,m,null),t(m,Yt),t(m,De),t(m,Qt),t(m,Fe),t(m,St),t(m,qe),t(m,At),t(m,V),g(pe,V,null),t(V,Ot),t(V,Ye),t(V,Kt),t(V,Qe),t(V,en),t(V,Se),t(m,tn),t(m,P),g(fe,P,null),t(P,nn),t(P,Ae),t(m,on),t(m,B),g(ue,B,null),t(B,sn),t(B,Oe),t(m,an),t(m,X),g(he,X,null),t(X,rn),t(X,Ke),t(m,ln),t(m,D),g(ge,D,null),t(D,dn),t(D,et),t(m,mn),t(m,F),g(be,F,null),t(F,cn),t(F,tt),t(m,pn),t(m,q),g(_e,q,null),t(q,fn),t(q,nt),t(m,un),t(m,W),g(ye,W,null),t(W,hn),t(W,ot),t(W,gn),t(W,st),t(W,bn),g(Y,W,null),t(m,_n),t(m,Z),g(ve,Z,null),t(Z,yn),t(Z,at),t(Z,vn),t(Z,rt),t(Z,Mn),t(Z,it),t(Z,$n),t(Z,lt),t(Z,xn),g(Q,Z,null),t(m,wn),t(m,S),g(Me,S,null),t(S,Tn),t(S,dt),t(m,kn),t(m,j),g($e,j,null),t(j,Cn),t(j,mt),t(j,Un),t(j,ct),t(j,Zn),t(j,xe),t(j,Jn),g(A,j,null),t(m,jn),t(m,O),g(we,O,null),t(O,Vn),t(O,pt),t(m,Wn),t(m,J),g(Te,J,null),t(J,Gn),t(J,ft),t(J,Hn),t(J,ut),t(J,In),t(J,ke),t(J,En),g(K,J,null),t(J,Rn),g(ee,J,null),t(m,Nn),t(m,te),g(Ce,te,null),t(te,Ln),t(te,ht),t(m,zn),t(m,R),g(Ue,R,null),t(R,Pn),t(R,gt),t(R,Bn),g(ne,R,null),t(m,Xn),t(m,oe),g(Ze,oe,null),t(oe,Dn),t(oe,bt),t(m,Fn),t(m,se),g(Je,se,null),t(se,qn),t(se,_t),t(m,Yn),t(m,ae),g(je,ae,null),t(ae,Qn),t(ae,yt),t(m,Sn),t(m,re),g(Ve,re,null),t(re,An),t(re,vt),x(e,Wt,M),g(We,e,M),x(e,Gt,M),x(e,I,M),g(Ge,I,null),t(I,On),t(I,Mt),t(I,Kn),t(I,N),g(He,N,null),t(N,eo),t(N,$t),t(N,to),g(ie,N,null),x(e,Ht,M),g(Ie,e,M),x(e,It,M),x(e,kt,M),Et=!0},p(e,[M]){const Ee={};M&2&&(Ee.$$scope={dirty:M,ctx:e}),Y.$set(Ee);const c={};M&2&&(c.$$scope={dirty:M,ctx:e}),Q.$set(c);const E={};M&2&&(E.$$scope={dirty:M,ctx:e}),A.$set(E);const Re={};M&2&&(Re.$$scope={dirty:M,ctx:e}),K.$set(Re);const Ne={};M&2&&(Ne.$$scope={dirty:M,ctx:e}),ee.$set(Ne);const Le={};M&2&&(Le.$$scope={dirty:M,ctx:e}),ne.$set(Le);const ze={};M&2&&(ze.$$scope={dirty:M,ctx:e}),ie.$set(ze)},i(e){Et||(b(p.$$.fragment,e),b($.$$.fragment,e),b(me.$$.fragment,e),b(ce.$$.fragment,e),b(pe.$$.fragment,e),b(fe.$$.fragment,e),b(ue.$$.fragment,e),b(he.$$.fragment,e),b(ge.$$.fragment,e),b(be.$$.fragment,e),b(_e.$$.fragment,e),b(ye.$$.fragment,e),b(Y.$$.fragment,e),b(ve.$$.fragment,e),b(Q.$$.fragment,e),b(Me.$$.fragment,e),b($e.$$.fragment,e),b(A.$$.fragment,e),b(we.$$.fragment,e),b(Te.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),b(Ce.$$.fragment,e),b(Ue.$$.fragment,e),b(ne.$$.fragment,e),b(Ze.$$.fragment,e),b(Je.$$.fragment,e),b(je.$$.fragment,e),b(Ve.$$.fragment,e),b(We.$$.fragment,e),b(Ge.$$.fragment,e),b(He.$$.fragment,e),b(ie.$$.fragment,e),b(Ie.$$.fragment,e),Et=!0)},o(e){_(p.$$.fragment,e),_($.$$.fragment,e),_(me.$$.fragment,e),_(ce.$$.fragment,e),_(pe.$$.fragment,e),_(fe.$$.fragment,e),_(ue.$$.fragment,e),_(he.$$.fragment,e),_(ge.$$.fragment,e),_(be.$$.fragment,e),_(_e.$$.fragment,e),_(ye.$$.fragment,e),_(Y.$$.fragment,e),_(ve.$$.fragment,e),_(Q.$$.fragment,e),_(Me.$$.fragment,e),_($e.$$.fragment,e),_(A.$$.fragment,e),_(we.$$.fragment,e),_(Te.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(Ce.$$.fragment,e),_(Ue.$$.fragment,e),_(ne.$$.fragment,e),_(Ze.$$.fragment,e),_(Je.$$.fragment,e),_(je.$$.fragment,e),_(Ve.$$.fragment,e),_(We.$$.fragment,e),_(Ge.$$.fragment,e),_(He.$$.fragment,e),_(ie.$$.fragment,e),_(Ie.$$.fragment,e),Et=!1},d(e){e&&(d(T),d(v),d(l),d(n),d(Ct),d(z),d(Jt),d(de),d(jt),d(Vt),d(m),d(Wt),d(Gt),d(I),d(Ht),d(It),d(kt)),d(i),y(p,e),y($,e),y(me,e),y(ce),y(pe),y(fe),y(ue),y(he),y(ge),y(be),y(_e),y(ye),y(Y),y(ve),y(Q),y(Me),y($e),y(A),y(we),y(Te),y(K),y(ee),y(Ce),y(Ue),y(ne),y(Ze),y(Je),y(je),y(Ve),y(We,e),y(Ge),y(He),y(ie),y(Ie,e)}}}const as='{"title":"Models","local":"models","sections":[{"title":"ModelMixin","local":"diffusers.ModelMixin","sections":[],"depth":2},{"title":"PushToHubMixin","local":"diffusers.utils.PushToHubMixin","sections":[],"depth":2}],"depth":1}';function rs(U){return Bo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class us extends Xo{constructor(i){super(),Do(this,i,rs,ss,Po,{})}}export{us as component};
