import{s as Rs,o as Ns,n as P}from"../chunks/scheduler.8c3d61f6.js";import{S as zs,i as Ps,g as r,s as o,r as h,m as Gs,H as Ls,A as Xs,h as i,f as d,c as a,j as T,u as g,n as Is,E as Bs,x as M,k,y as t,a as x,v as b,d as _,t as y,w as v}from"../chunks/index.da70eac4.js";import{T as Hs}from"../chunks/Tip.6f698f24.js";import{D as C}from"../chunks/Docstring.367be9ed.js";import{C as De}from"../chunks/CodeBlock.a9c4becf.js";import{E as Be}from"../chunks/ExampleCodeBlock.dd9ee828.js";import{H as es,E as Ds}from"../chunks/getInferenceSnippets.cb466318.js";function Fs(U){let s,w="Example:",m,l,f;return l=new De({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(){s=r("p"),s.textContent=w,m=o(),h(l.$$.fragment)},l(n){s=i(n,"P",{"data-svelte-h":!0}),M(s)!=="svelte-11lpom8"&&(s.textContent=w),m=a(n),g(l.$$.fragment,n)},m(n,$){x(n,s,$),x(n,m,$),b(l,n,$),f=!0},p:P,i(n){f||(_(l.$$.fragment,n),f=!0)},o(n){y(l.$$.fragment,n),f=!1},d(n){n&&(d(s),d(m)),v(l,n)}}}function Ys(U){let s,w='Using <a href="/docs/diffusers/main/en/api/models/overview#diffusers.ModelMixin.enable_layerwise_casting">enable_layerwise_casting()</a>:',m,l,f;return l=new De({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(){s=r("p"),s.innerHTML=w,m=o(),h(l.$$.fragment)},l(n){s=i(n,"P",{"data-svelte-h":!0}),M(s)!=="svelte-1anawjo"&&(s.innerHTML=w),m=a(n),g(l.$$.fragment,n)},m(n,$){x(n,s,$),x(n,m,$),b(l,n,$),f=!0},p:P,i(n){f||(_(l.$$.fragment,n),f=!0)},o(n){y(l.$$.fragment,n),f=!1},d(n){n&&(d(s),d(m)),v(l,n)}}}function qs(U){let s,w=`⚠️ When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`;return{c(){s=r("p"),s.textContent=w},l(m){s=i(m,"P",{"data-svelte-h":!0}),M(s)!=="svelte-17p1lpg"&&(s.textContent=w)},m(m,l){x(m,s,l)},p:P,d(m){m&&d(s)}}}function Ss(U){let s,w="Examples:",m,l,f;return l=new De({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(){s=r("p"),s.textContent=w,m=o(),h(l.$$.fragment)},l(n){s=i(n,"P",{"data-svelte-h":!0}),M(s)!=="svelte-kvfsh7"&&(s.textContent=w),m=a(n),g(l.$$.fragment,n)},m(n,$){x(n,s,$),x(n,m,$),b(l,n,$),f=!0},p:P,i(n){f||(_(l.$$.fragment,n),f=!0)},o(n){y(l.$$.fragment,n),f=!1},d(n){n&&(d(s),d(m)),v(l,n)}}}function Qs(U){let s,w=`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 auth login</code>. You can also activate the special
<a href="https://huggingface.co/diffusers/installation.html#offline-mode" rel="nofollow">“offline-mode”</a> to use this method in a
firewalled environment.`;return{c(){s=r("p"),s.innerHTML=w},l(m){s=i(m,"P",{"data-svelte-h":!0}),M(s)!=="svelte-kjkp1z"&&(s.innerHTML=w)},m(m,l){x(m,s,l)},p:P,d(m){m&&d(s)}}}function As(U){let s,w="Example:",m,l,f;return l=new De({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(){s=r("p"),s.textContent=w,m=o(),h(l.$$.fragment)},l(n){s=i(n,"P",{"data-svelte-h":!0}),M(s)!=="svelte-11lpom8"&&(s.textContent=w),m=a(n),g(l.$$.fragment,n)},m(n,$){x(n,s,$),x(n,m,$),b(l,n,$),f=!0},p:P,i(n){f||(_(l.$$.fragment,n),f=!0)},o(n){y(l.$$.fragment,n),f=!1},d(n){n&&(d(s),d(m)),v(l,n)}}}function Os(U){let s,w="If you get the error message below, you need to finetune the weights for your downstream task:",m,l,f;return l=new De({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(){s=r("p"),s.textContent=w,m=o(),h(l.$$.fragment)},l(n){s=i(n,"P",{"data-svelte-h":!0}),M(s)!=="svelte-xueb0m"&&(s.textContent=w),m=a(n),g(l.$$.fragment,n)},m(n,$){x(n,s,$),x(n,m,$),b(l,n,$),f=!0},p:P,i(n){f||(_(l.$$.fragment,n),f=!0)},o(n){y(l.$$.fragment,n),f=!1},d(n){n&&(d(s),d(m)),v(l,n)}}}function Ks(U){let s,w="Example:",m,l,f;return l=new De({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(){s=r("p"),s.textContent=w,m=o(),h(l.$$.fragment)},l(n){s=i(n,"P",{"data-svelte-h":!0}),M(s)!=="svelte-11lpom8"&&(s.textContent=w),m=a(n),g(l.$$.fragment,n)},m(n,$){x(n,s,$),x(n,m,$),b(l,n,$),f=!0},p:P,i(n){f||(_(l.$$.fragment,n),f=!0)},o(n){y(l.$$.fragment,n),f=!1},d(n){n&&(d(s),d(m)),v(l,n)}}}function eo(U){let s,w="Examples:",m,l,f;return l=new De({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(){s=r("p"),s.textContent=w,m=o(),h(l.$$.fragment)},l(n){s=i(n,"P",{"data-svelte-h":!0}),M(s)!=="svelte-kvfsh7"&&(s.textContent=w),m=a(n),g(l.$$.fragment,n)},m(n,$){x(n,s,$),x(n,m,$),b(l,n,$),f=!0},p:P,i(n){f||(_(l.$$.fragment,n),f=!0)},o(n){y(l.$$.fragment,n),f=!1},d(n){n&&(d(s),d(m)),v(l,n)}}}function to(U){let s,w,m,l,f,n,$,Dt,Ut,Es='<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,ce,ts='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,pe,Vt,c,fe,Ft,Fe,ns="Base class for all models.",Yt,Ye,ss=`<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.`,qt,qe,os='<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>',St,V,ue,Qt,Se,as=`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>.`,At,Qe,rs=`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.`,Ot,Ae,is=`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>.`,Kt,L,he,en,Oe,ls=`Potentially dequantize the model in case it has been quantized by a quantization method that support
dequantization.`,tn,X,ge,nn,Ke,ds=`Deactivates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or
<em>checkpoint activations</em> in other frameworks).`,sn,B,be,on,et,ms="disable npu flash attention from torch_npu",an,D,_e,rn,tt,cs='Disable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',ln,F,ye,dn,nt,ps="Disable the flash attention pallals kernel for torch_xla.",mn,Y,ve,cn,st,fs=`Activates gradient checkpointing for the current model (may be referred to as <em>activation checkpointing</em> or
<em>checkpoint activations</em> in other frameworks).`,pn,W,Me,fn,ot,us="Activates group offloading for the current model.",un,at,hs='See <a href="/docs/diffusers/main/en/api/utilities#diffusers.hooks.apply_group_offloading">apply_group_offloading()</a> for more information.',hn,q,gn,Z,$e,bn,rt,gs="Activates layerwise casting for the current model.",_n,it,bs=`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.`,yn,lt,_s=`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.`,vn,dt,ys="Example:",Mn,S,$n,Q,xe,xn,mt,vs="Enable npu flash attention from torch_npu",wn,j,we,Tn,ct,Ms='Enable memory efficient attention from <a href="https://facebookresearch.github.io/xformers/" rel="nofollow">xFormers</a>.',kn,pt,$s=`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.`,Cn,A,Un,O,Zn,K,Te,Jn,ft,xs="Enable the flash attention pallals kernel for torch_xla.",jn,J,ke,Vn,ut,ws="Instantiate a pretrained PyTorch model from a pretrained model configuration.",Wn,ht,Ts=`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>.`,Gn,ee,In,te,Hn,ne,En,se,Ce,Rn,gt,ks=`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>`,Nn,R,Ue,zn,bt,Cs="Get number of (trainable or non-embedding) parameters in the module.",Pn,oe,Ln,ae,Ze,Xn,_t,Us=`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.`,Bn,re,Je,Dn,yt,Zs=`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.`,Fn,ie,je,Yn,vt,Js="Set the attention backend for the model.",qn,le,Ve,Sn,Mt,js="Set the switch for the npu flash attention.",Wt,We,Gt,H,Ge,Qn,$t,Vs="A Mixin to push a model, scheduler, or pipeline to the Hugging Face Hub.",An,N,Ie,On,xt,Ws="Upload model, scheduler, or pipeline files to the 🤗 Hugging Face Hub.",Kn,de,It,He,Ht,Ct,Et;return f=new es({props:{title:"Models",local:"models",headingTag:"h1"}}),pe=new es({props:{title:"ModelMixin",local:"diffusers.ModelMixin",headingTag:"h2"}}),fe=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"}}),ue=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#L1455"}}),he=new C({props:{name:"dequantize",anchor:"diffusers.ModelMixin.dequantize",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L798"}}),ge=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"}}),be=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"}}),_e=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#L435"}}),ye=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"}}),ve=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"}}),Me=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#L526"}}),q=new Be({props:{anchor:"diffusers.ModelMixin.enable_group_offload.example",$$slots:{default:[Fs]},$$scope:{ctx:U}}}),$e=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#L441"}}),S=new Be({props:{anchor:"diffusers.ModelMixin.enable_layerwise_casting.example",$$slots:{default:[Ys]},$$scope:{ctx:U}}}),xe=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"}}),we=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 Hs({props:{warning:!0,$$slots:{default:[qs]},$$scope:{ctx:U}}}),O=new Be({props:{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ss]},$$scope:{ctx:U}}}),Te=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"}}),ke=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#L810"}}),ee=new Hs({props:{$$slots:{default:[Qs]},$$scope:{ctx:U}}}),te=new Be({props:{anchor:"diffusers.ModelMixin.from_pretrained.example",$$slots:{default:[As]},$$scope:{ctx:U}}}),ne=new Be({props:{anchor:"diffusers.ModelMixin.from_pretrained.example-2",$$slots:{default:[Os]},$$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#L1857"}}),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#L1793",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>
`}}),oe=new Be({props:{anchor:"diffusers.ModelMixin.num_parameters.example",$$slots:{default:[Ks]},$$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#L624"}}),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#L643"}}),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#L589"}}),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 es({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"}}),Ie=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"}}),de=new Be({props:{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.example",$$slots:{default:[eo]},$$scope:{ctx:U}}}),He=new Ds({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/overview.md"}}),{c(){s=r("meta"),w=o(),m=r("p"),l=o(),h(f.$$.fragment),n=o(),$=r("p"),Dt=Gs("🤗 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 Ls(!1),Zt=Gs("."),Jt=o(),ce=r("p"),ce.innerHTML=ts,jt=o(),h(pe.$$.fragment),Vt=o(),c=r("div"),h(fe.$$.fragment),Ft=o(),Fe=r("p"),Fe.textContent=ns,Yt=o(),Ye=r("p"),Ye.innerHTML=ss,qt=o(),qe=r("ul"),qe.innerHTML=os,St=o(),V=r("div"),h(ue.$$.fragment),Qt=o(),Se=r("p"),Se.innerHTML=as,At=o(),Qe=r("p"),Qe.innerHTML=rs,Ot=o(),Ae=r("p"),Ae.innerHTML=is,Kt=o(),L=r("div"),h(he.$$.fragment),en=o(),Oe=r("p"),Oe.textContent=ls,tn=o(),X=r("div"),h(ge.$$.fragment),nn=o(),Ke=r("p"),Ke.innerHTML=ds,sn=o(),B=r("div"),h(be.$$.fragment),on=o(),et=r("p"),et.textContent=ms,an=o(),D=r("div"),h(_e.$$.fragment),rn=o(),tt=r("p"),tt.innerHTML=cs,ln=o(),F=r("div"),h(ye.$$.fragment),dn=o(),nt=r("p"),nt.textContent=ps,mn=o(),Y=r("div"),h(ve.$$.fragment),cn=o(),st=r("p"),st.innerHTML=fs,pn=o(),W=r("div"),h(Me.$$.fragment),fn=o(),ot=r("p"),ot.textContent=us,un=o(),at=r("p"),at.innerHTML=hs,hn=o(),h(q.$$.fragment),gn=o(),Z=r("div"),h($e.$$.fragment),bn=o(),rt=r("p"),rt.textContent=gs,_n=o(),it=r("p"),it.textContent=bs,yn=o(),lt=r("p"),lt.innerHTML=_s,vn=o(),dt=r("p"),dt.textContent=ys,Mn=o(),h(S.$$.fragment),$n=o(),Q=r("div"),h(xe.$$.fragment),xn=o(),mt=r("p"),mt.textContent=vs,wn=o(),j=r("div"),h(we.$$.fragment),Tn=o(),ct=r("p"),ct.innerHTML=Ms,kn=o(),pt=r("p"),pt.textContent=$s,Cn=o(),h(A.$$.fragment),Un=o(),h(O.$$.fragment),Zn=o(),K=r("div"),h(Te.$$.fragment),Jn=o(),ft=r("p"),ft.textContent=xs,jn=o(),J=r("div"),h(ke.$$.fragment),Vn=o(),ut=r("p"),ut.textContent=ws,Wn=o(),ht=r("p"),ht.innerHTML=Ts,Gn=o(),h(ee.$$.fragment),In=o(),h(te.$$.fragment),Hn=o(),h(ne.$$.fragment),En=o(),se=r("div"),h(Ce.$$.fragment),Rn=o(),gt=r("p"),gt.innerHTML=ks,Nn=o(),R=r("div"),h(Ue.$$.fragment),zn=o(),bt=r("p"),bt.textContent=Cs,Pn=o(),h(oe.$$.fragment),Ln=o(),ae=r("div"),h(Ze.$$.fragment),Xn=o(),_t=r("p"),_t.innerHTML=Us,Bn=o(),re=r("div"),h(Je.$$.fragment),Dn=o(),yt=r("p"),yt.innerHTML=Zs,Fn=o(),ie=r("div"),h(je.$$.fragment),Yn=o(),vt=r("p"),vt.textContent=Js,qn=o(),le=r("div"),h(Ve.$$.fragment),Sn=o(),Mt=r("p"),Mt.textContent=js,Wt=o(),h(We.$$.fragment),Gt=o(),H=r("div"),h(Ge.$$.fragment),Qn=o(),$t=r("p"),$t.textContent=Vs,An=o(),N=r("div"),h(Ie.$$.fragment),On=o(),xt=r("p"),xt.textContent=Ws,Kn=o(),h(de.$$.fragment),It=o(),h(He.$$.fragment),Ht=o(),Ct=r("p"),this.h()},l(e){const u=Xs("svelte-u9bgzb",document.head);s=i(u,"META",{name:!0,content:!0}),u.forEach(d),w=a(e),m=i(e,"P",{}),T(m).forEach(d),l=a(e),g(f.$$.fragment,e),n=a(e),$=i(e,"P",{});var Ee=T($);Dt=Is(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=Bs(Ee,!1),Zt=Is(Ee,"."),Ee.forEach(d),Jt=a(e),ce=i(e,"P",{"data-svelte-h":!0}),M(ce)!=="svelte-1elbdrk"&&(ce.innerHTML=ts),jt=a(e),g(pe.$$.fragment,e),Vt=a(e),c=i(e,"DIV",{class:!0});var p=T(c);g(fe.$$.fragment,p),Ft=a(p),Fe=i(p,"P",{"data-svelte-h":!0}),M(Fe)!=="svelte-12nk4t7"&&(Fe.textContent=ns),Yt=a(p),Ye=i(p,"P",{"data-svelte-h":!0}),M(Ye)!=="svelte-ku6myw"&&(Ye.innerHTML=ss),qt=a(p),qe=i(p,"UL",{"data-svelte-h":!0}),M(qe)!=="svelte-kvpw1l"&&(qe.innerHTML=os),St=a(p),V=i(p,"DIV",{class:!0});var E=T(V);g(ue.$$.fragment,E),Qt=a(E),Se=i(E,"P",{"data-svelte-h":!0}),M(Se)!=="svelte-38nsj2"&&(Se.innerHTML=as),At=a(E),Qe=i(E,"P",{"data-svelte-h":!0}),M(Qe)!=="svelte-1et28mh"&&(Qe.innerHTML=rs),Ot=a(E),Ae=i(E,"P",{"data-svelte-h":!0}),M(Ae)!=="svelte-k8xxs3"&&(Ae.innerHTML=is),E.forEach(d),Kt=a(p),L=i(p,"DIV",{class:!0});var Re=T(L);g(he.$$.fragment,Re),en=a(Re),Oe=i(Re,"P",{"data-svelte-h":!0}),M(Oe)!=="svelte-on69a4"&&(Oe.textContent=ls),Re.forEach(d),tn=a(p),X=i(p,"DIV",{class:!0});var Ne=T(X);g(ge.$$.fragment,Ne),nn=a(Ne),Ke=i(Ne,"P",{"data-svelte-h":!0}),M(Ke)!=="svelte-jedy0o"&&(Ke.innerHTML=ds),Ne.forEach(d),sn=a(p),B=i(p,"DIV",{class:!0});var ze=T(B);g(be.$$.fragment,ze),on=a(ze),et=i(ze,"P",{"data-svelte-h":!0}),M(et)!=="svelte-advgdt"&&(et.textContent=ms),ze.forEach(d),an=a(p),D=i(p,"DIV",{class:!0});var Pe=T(D);g(_e.$$.fragment,Pe),rn=a(Pe),tt=i(Pe,"P",{"data-svelte-h":!0}),M(tt)!=="svelte-1vfte1e"&&(tt.innerHTML=cs),Pe.forEach(d),ln=a(p),F=i(p,"DIV",{class:!0});var Le=T(F);g(ye.$$.fragment,Le),dn=a(Le),nt=i(Le,"P",{"data-svelte-h":!0}),M(nt)!=="svelte-l9u3py"&&(nt.textContent=ps),Le.forEach(d),mn=a(p),Y=i(p,"DIV",{class:!0});var Xe=T(Y);g(ve.$$.fragment,Xe),cn=a(Xe),st=i(Xe,"P",{"data-svelte-h":!0}),M(st)!=="svelte-1rv66k9"&&(st.innerHTML=fs),Xe.forEach(d),pn=a(p),W=i(p,"DIV",{class:!0});var me=T(W);g(Me.$$.fragment,me),fn=a(me),ot=i(me,"P",{"data-svelte-h":!0}),M(ot)!=="svelte-h27n1e"&&(ot.textContent=us),un=a(me),at=i(me,"P",{"data-svelte-h":!0}),M(at)!=="svelte-l2yd37"&&(at.innerHTML=hs),hn=a(me),g(q.$$.fragment,me),me.forEach(d),gn=a(p),Z=i(p,"DIV",{class:!0});var G=T(Z);g($e.$$.fragment,G),bn=a(G),rt=i(G,"P",{"data-svelte-h":!0}),M(rt)!=="svelte-1iclqp4"&&(rt.textContent=gs),_n=a(G),it=i(G,"P",{"data-svelte-h":!0}),M(it)!=="svelte-1qne8y2"&&(it.textContent=bs),yn=a(G),lt=i(G,"P",{"data-svelte-h":!0}),M(lt)!=="svelte-ss6or"&&(lt.innerHTML=_s),vn=a(G),dt=i(G,"P",{"data-svelte-h":!0}),M(dt)!=="svelte-11lpom8"&&(dt.textContent=ys),Mn=a(G),g(S.$$.fragment,G),G.forEach(d),$n=a(p),Q=i(p,"DIV",{class:!0});var Rt=T(Q);g(xe.$$.fragment,Rt),xn=a(Rt),mt=i(Rt,"P",{"data-svelte-h":!0}),M(mt)!=="svelte-10xtjge"&&(mt.textContent=vs),Rt.forEach(d),wn=a(p),j=i(p,"DIV",{class:!0});var z=T(j);g(we.$$.fragment,z),Tn=a(z),ct=i(z,"P",{"data-svelte-h":!0}),M(ct)!=="svelte-yfpdyb"&&(ct.innerHTML=Ms),kn=a(z),pt=i(z,"P",{"data-svelte-h":!0}),M(pt)!=="svelte-z1uct7"&&(pt.textContent=$s),Cn=a(z),g(A.$$.fragment,z),Un=a(z),g(O.$$.fragment,z),z.forEach(d),Zn=a(p),K=i(p,"DIV",{class:!0});var Nt=T(K);g(Te.$$.fragment,Nt),Jn=a(Nt),ft=i(Nt,"P",{"data-svelte-h":!0}),M(ft)!=="svelte-17oym6v"&&(ft.textContent=xs),Nt.forEach(d),jn=a(p),J=i(p,"DIV",{class:!0});var I=T(J);g(ke.$$.fragment,I),Vn=a(I),ut=i(I,"P",{"data-svelte-h":!0}),M(ut)!=="svelte-1lisopl"&&(ut.textContent=ws),Wn=a(I),ht=i(I,"P",{"data-svelte-h":!0}),M(ht)!=="svelte-1fnd9e6"&&(ht.innerHTML=Ts),Gn=a(I),g(ee.$$.fragment,I),In=a(I),g(te.$$.fragment,I),Hn=a(I),g(ne.$$.fragment,I),I.forEach(d),En=a(p),se=i(p,"DIV",{class:!0});var zt=T(se);g(Ce.$$.fragment,zt),Rn=a(zt),gt=i(zt,"P",{"data-svelte-h":!0}),M(gt)!=="svelte-1o6lvix"&&(gt.innerHTML=ks),zt.forEach(d),Nn=a(p),R=i(p,"DIV",{class:!0});var wt=T(R);g(Ue.$$.fragment,wt),zn=a(wt),bt=i(wt,"P",{"data-svelte-h":!0}),M(bt)!=="svelte-1jxmzhx"&&(bt.textContent=Cs),Pn=a(wt),g(oe.$$.fragment,wt),wt.forEach(d),Ln=a(p),ae=i(p,"DIV",{class:!0});var Pt=T(ae);g(Ze.$$.fragment,Pt),Xn=a(Pt),_t=i(Pt,"P",{"data-svelte-h":!0}),M(_t)!=="svelte-mecl9"&&(_t.innerHTML=Us),Pt.forEach(d),Bn=a(p),re=i(p,"DIV",{class:!0});var Lt=T(re);g(Je.$$.fragment,Lt),Dn=a(Lt),yt=i(Lt,"P",{"data-svelte-h":!0}),M(yt)!=="svelte-1y16a8m"&&(yt.innerHTML=Zs),Lt.forEach(d),Fn=a(p),ie=i(p,"DIV",{class:!0});var Xt=T(ie);g(je.$$.fragment,Xt),Yn=a(Xt),vt=i(Xt,"P",{"data-svelte-h":!0}),M(vt)!=="svelte-e25n5q"&&(vt.textContent=Js),Xt.forEach(d),qn=a(p),le=i(p,"DIV",{class:!0});var Bt=T(le);g(Ve.$$.fragment,Bt),Sn=a(Bt),Mt=i(Bt,"P",{"data-svelte-h":!0}),M(Mt)!=="svelte-qmktby"&&(Mt.textContent=js),Bt.forEach(d),p.forEach(d),Wt=a(e),g(We.$$.fragment,e),Gt=a(e),H=i(e,"DIV",{class:!0});var Tt=T(H);g(Ge.$$.fragment,Tt),Qn=a(Tt),$t=i(Tt,"P",{"data-svelte-h":!0}),M($t)!=="svelte-7y8zei"&&($t.textContent=Vs),An=a(Tt),N=i(Tt,"DIV",{class:!0});var kt=T(N);g(Ie.$$.fragment,kt),On=a(kt),xt=i(kt,"P",{"data-svelte-h":!0}),M(xt)!=="svelte-5nfhmh"&&(xt.textContent=Ws),Kn=a(kt),g(de.$$.fragment,kt),kt.forEach(d),Tt.forEach(d),It=a(e),g(He.$$.fragment,e),Ht=a(e),Ct=i(e,"P",{}),T(Ct).forEach(d),this.h()},h(){k(s,"name","hf:doc:metadata"),k(s,"content",no),Ut.a=Zt,k(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(c,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),k(H,"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,u){t(document.head,s),x(e,w,u),x(e,m,u),x(e,l,u),b(f,e,u),x(e,n,u),x(e,$,u),t($,Dt),Ut.m(Es,$),t($,Zt),x(e,Jt,u),x(e,ce,u),x(e,jt,u),b(pe,e,u),x(e,Vt,u),x(e,c,u),b(fe,c,null),t(c,Ft),t(c,Fe),t(c,Yt),t(c,Ye),t(c,qt),t(c,qe),t(c,St),t(c,V),b(ue,V,null),t(V,Qt),t(V,Se),t(V,At),t(V,Qe),t(V,Ot),t(V,Ae),t(c,Kt),t(c,L),b(he,L,null),t(L,en),t(L,Oe),t(c,tn),t(c,X),b(ge,X,null),t(X,nn),t(X,Ke),t(c,sn),t(c,B),b(be,B,null),t(B,on),t(B,et),t(c,an),t(c,D),b(_e,D,null),t(D,rn),t(D,tt),t(c,ln),t(c,F),b(ye,F,null),t(F,dn),t(F,nt),t(c,mn),t(c,Y),b(ve,Y,null),t(Y,cn),t(Y,st),t(c,pn),t(c,W),b(Me,W,null),t(W,fn),t(W,ot),t(W,un),t(W,at),t(W,hn),b(q,W,null),t(c,gn),t(c,Z),b($e,Z,null),t(Z,bn),t(Z,rt),t(Z,_n),t(Z,it),t(Z,yn),t(Z,lt),t(Z,vn),t(Z,dt),t(Z,Mn),b(S,Z,null),t(c,$n),t(c,Q),b(xe,Q,null),t(Q,xn),t(Q,mt),t(c,wn),t(c,j),b(we,j,null),t(j,Tn),t(j,ct),t(j,kn),t(j,pt),t(j,Cn),b(A,j,null),t(j,Un),b(O,j,null),t(c,Zn),t(c,K),b(Te,K,null),t(K,Jn),t(K,ft),t(c,jn),t(c,J),b(ke,J,null),t(J,Vn),t(J,ut),t(J,Wn),t(J,ht),t(J,Gn),b(ee,J,null),t(J,In),b(te,J,null),t(J,Hn),b(ne,J,null),t(c,En),t(c,se),b(Ce,se,null),t(se,Rn),t(se,gt),t(c,Nn),t(c,R),b(Ue,R,null),t(R,zn),t(R,bt),t(R,Pn),b(oe,R,null),t(c,Ln),t(c,ae),b(Ze,ae,null),t(ae,Xn),t(ae,_t),t(c,Bn),t(c,re),b(Je,re,null),t(re,Dn),t(re,yt),t(c,Fn),t(c,ie),b(je,ie,null),t(ie,Yn),t(ie,vt),t(c,qn),t(c,le),b(Ve,le,null),t(le,Sn),t(le,Mt),x(e,Wt,u),b(We,e,u),x(e,Gt,u),x(e,H,u),b(Ge,H,null),t(H,Qn),t(H,$t),t(H,An),t(H,N),b(Ie,N,null),t(N,On),t(N,xt),t(N,Kn),b(de,N,null),x(e,It,u),b(He,e,u),x(e,Ht,u),x(e,Ct,u),Et=!0},p(e,[u]){const Ee={};u&2&&(Ee.$$scope={dirty:u,ctx:e}),q.$set(Ee);const p={};u&2&&(p.$$scope={dirty:u,ctx:e}),S.$set(p);const E={};u&2&&(E.$$scope={dirty:u,ctx:e}),A.$set(E);const Re={};u&2&&(Re.$$scope={dirty:u,ctx:e}),O.$set(Re);const Ne={};u&2&&(Ne.$$scope={dirty:u,ctx:e}),ee.$set(Ne);const ze={};u&2&&(ze.$$scope={dirty:u,ctx:e}),te.$set(ze);const Pe={};u&2&&(Pe.$$scope={dirty:u,ctx:e}),ne.$set(Pe);const Le={};u&2&&(Le.$$scope={dirty:u,ctx:e}),oe.$set(Le);const Xe={};u&2&&(Xe.$$scope={dirty:u,ctx:e}),de.$set(Xe)},i(e){Et||(_(f.$$.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),_(ve.$$.fragment,e),_(Me.$$.fragment,e),_(q.$$.fragment,e),_($e.$$.fragment,e),_(S.$$.fragment,e),_(xe.$$.fragment,e),_(we.$$.fragment,e),_(A.$$.fragment,e),_(O.$$.fragment,e),_(Te.$$.fragment,e),_(ke.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),_(Ce.$$.fragment,e),_(Ue.$$.fragment,e),_(oe.$$.fragment,e),_(Ze.$$.fragment,e),_(Je.$$.fragment,e),_(je.$$.fragment,e),_(Ve.$$.fragment,e),_(We.$$.fragment,e),_(Ge.$$.fragment,e),_(Ie.$$.fragment,e),_(de.$$.fragment,e),_(He.$$.fragment,e),Et=!0)},o(e){y(f.$$.fragment,e),y(pe.$$.fragment,e),y(fe.$$.fragment,e),y(ue.$$.fragment,e),y(he.$$.fragment,e),y(ge.$$.fragment,e),y(be.$$.fragment,e),y(_e.$$.fragment,e),y(ye.$$.fragment,e),y(ve.$$.fragment,e),y(Me.$$.fragment,e),y(q.$$.fragment,e),y($e.$$.fragment,e),y(S.$$.fragment,e),y(xe.$$.fragment,e),y(we.$$.fragment,e),y(A.$$.fragment,e),y(O.$$.fragment,e),y(Te.$$.fragment,e),y(ke.$$.fragment,e),y(ee.$$.fragment,e),y(te.$$.fragment,e),y(ne.$$.fragment,e),y(Ce.$$.fragment,e),y(Ue.$$.fragment,e),y(oe.$$.fragment,e),y(Ze.$$.fragment,e),y(Je.$$.fragment,e),y(je.$$.fragment,e),y(Ve.$$.fragment,e),y(We.$$.fragment,e),y(Ge.$$.fragment,e),y(Ie.$$.fragment,e),y(de.$$.fragment,e),y(He.$$.fragment,e),Et=!1},d(e){e&&(d(w),d(m),d(l),d(n),d($),d(Jt),d(ce),d(jt),d(Vt),d(c),d(Wt),d(Gt),d(H),d(It),d(Ht),d(Ct)),d(s),v(f,e),v(pe,e),v(fe),v(ue),v(he),v(ge),v(be),v(_e),v(ye),v(ve),v(Me),v(q),v($e),v(S),v(xe),v(we),v(A),v(O),v(Te),v(ke),v(ee),v(te),v(ne),v(Ce),v(Ue),v(oe),v(Ze),v(Je),v(je),v(Ve),v(We,e),v(Ge),v(Ie),v(de),v(He,e)}}}const no='{"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 so(U){return Ns(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class po extends zs{constructor(s){super(),Ps(this,s,so,to,Rs,{})}}export{po as component};
