import{S as Hn,i as Ln,s as qn,e as r,k as f,w as b,t as s,a1 as On,M as Kn,c as l,d as o,m as h,a as i,x as v,h as n,a2 as er,b as M,G as e,g as U,y as _,q as w,o as x,B as $,v as tr,L as ie}from"../../../chunks/vendor-hf-doc-builder.js";import{T as Pn}from"../../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as de}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as tn}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as le}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function or(J){let d,g;return{c(){d=r("p"),g=s(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(p){d=l(p,"P",{});var c=i(d);g=n(c,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),c.forEach(o)},m(p,c){U(p,d,c),e(d,g)},d(p){p&&o(d)}}}function ar(J){let d,g,p,c,u;return c=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)`}}),{c(){d=r("p"),g=s("Examples:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"Examples:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function sr(J){let d,g,p,c,u,t,m,K,X,ce,V;return{c(){d=r("p"),g=s("To use private or "),p=r("a"),c=s("gated models"),u=s(`, log-in with
`),t=r("code"),m=s("huggingface-cli login"),K=s(`. You can also activate the special
`),X=r("a"),ce=s("\u201Coffline-mode\u201D"),V=s(` to use this method in a
firewalled environment.`),this.h()},l(ee){d=l(ee,"P",{});var E=i(d);g=n(E,"To use private or "),p=l(E,"A",{href:!0,rel:!0});var fo=i(p);c=n(fo,"gated models"),fo.forEach(o),u=n(E,`, log-in with
`),t=l(E,"CODE",{});var Ee=i(t);m=n(Ee,"huggingface-cli login"),Ee.forEach(o),K=n(E,`. You can also activate the special
`),X=l(E,"A",{href:!0,rel:!0});var Fe=i(X);ce=n(Fe,"\u201Coffline-mode\u201D"),Fe.forEach(o),V=n(E,` to use this method in a
firewalled environment.`),E.forEach(o),this.h()},h(){M(p,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),M(p,"rel","nofollow"),M(X,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),M(X,"rel","nofollow")},m(ee,E){U(ee,d,E),e(d,g),e(d,p),e(p,c),e(d,u),e(d,t),e(t,m),e(d,K),e(d,X),e(X,ce),e(d,V)},d(ee){ee&&o(d)}}}function nr(J){let d,g,p,c,u;return c=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>)`}}),{c(){d=r("p"),g=s("Example:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"Example:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function rr(J){let d,g,p,c,u;return c=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.`}}),{c(){d=r("p"),g=s("If you get the error message below, you need to finetune the weights for your downstream task:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"If you get the error message below, you need to finetune the weights for your downstream task:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function lr(J){let d,g,p,c,u;return c=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>`}}),{c(){d=r("p"),g=s("Example:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"Example:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function ir(J){let d,g,p,c,u;return c=new de({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMERvd25sb2FkJTIwbW9kZWwlMjBhbmQlMjBjb25maWd1cmF0aW9uJTIwZnJvbSUyMGh1Z2dpbmdmYWNlLmNvJTIwYW5kJTIwY2FjaGUuJTBBbW9kZWwlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4VU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQSUyMyUyME1vZGVsJTIwd2FzJTIwc2F2ZWQlMjB1c2luZyUyMCpzYXZlX3ByZXRyYWluZWQoJy4lMkZ0ZXN0JTJGc2F2ZWRfbW9kZWwlMkYnKSolMjAoZm9yJTIwZXhhbXBsZSUyMHB1cnBvc2VzJTJDJTIwbm90JTIwcnVubmFibGUpLiUwQW1vZGVsJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjIuJTJGdGVzdCUyRnNhdmVkX21vZGVsJTJGJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Model was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)* (for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/&quot;</span>)`}}),{c(){d=r("p"),g=s("Examples:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"Examples:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function dr(J){let d,g,p,c,u;return c=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.`}}),{c(){d=r("p"),g=s("If you get the error message below, you need to finetune the weights for your downstream task:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"If you get the error message below, you need to finetune the weights for your downstream task:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function cr(J){let d,g,p,c,u;return c=new de({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMGxvYWQlMjBtb2RlbCUwQW1vZGVsJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiklMEElMjMlMjBCeSUyMGRlZmF1bHQlMkMlMjB0aGUlMjBtb2RlbCUyMHBhcmFtZXRlcnMlMjB3aWxsJTIwYmUlMjBpbiUyMGZwMzIlMjBwcmVjaXNpb24lMkMlMjB0byUyMGNhc3QlMjB0aGVzZSUyMHRvJTIwYmZsb2F0MTYlMjBwcmVjaXNpb24lMEFwYXJhbXMlMjAlM0QlMjBtb2RlbC50b19iZjE2KHBhcmFtcyklMEElMjMlMjBJZiUyMHlvdSUyMGRvbid0JTIwd2FudCUyMHRvJTIwY2FzdCUyMGNlcnRhaW4lMjBwYXJhbWV0ZXJzJTIwKGZvciUyMGV4YW1wbGUlMjBsYXllciUyMG5vcm0lMjBiaWFzJTIwYW5kJTIwc2NhbGUpJTBBJTIzJTIwdGhlbiUyMHBhc3MlMjB0aGUlMjBtYXNrJTIwYXMlMjBmb2xsb3dzJTBBZnJvbSUyMGZsYXglMjBpbXBvcnQlMjB0cmF2ZXJzZV91dGlsJTBBJTBBbW9kZWwlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4VU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQWZsYXRfcGFyYW1zJTIwJTNEJTIwdHJhdmVyc2VfdXRpbC5mbGF0dGVuX2RpY3QocGFyYW1zKSUwQW1hc2slMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjBwYXRoJTNBJTIwKHBhdGglNUItMiU1RCUyMCElM0QlMjAoJTIyTGF5ZXJOb3JtJTIyJTJDJTIwJTIyYmlhcyUyMiklMjBhbmQlMjBwYXRoJTVCLTIlM0ElNUQlMjAhJTNEJTIwKCUyMkxheWVyTm9ybSUyMiUyQyUyMCUyMnNjYWxlJTIyKSklMEElMjAlMjAlMjAlMjBmb3IlMjBwYXRoJTIwaW4lMjBmbGF0X3BhcmFtcyUwQSU3RCUwQW1hc2slMjAlM0QlMjB0cmF2ZXJzZV91dGlsLnVuZmxhdHRlbl9kaWN0KG1hc2spJTBBcGFyYW1zJTIwJTNEJTIwbW9kZWwudG9fYmYxNihwYXJhbXMlMkMlMjBtYXNrKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model parameters will be in fp32 precision, to cast these to bfloat16 precision</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_bf16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util

<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span>    path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_bf16(params, mask)`}}),{c(){d=r("p"),g=s("Examples:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"Examples:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function mr(J){let d,g,p,c,u;return c=new de({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMGxvYWQlMjBtb2RlbCUwQW1vZGVsJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheFVOZXQyRENvbmRpdGlvbk1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiklMEElMjMlMjBCeSUyMGRlZmF1bHQlMkMlMjB0aGUlMjBtb2RlbCUyMHBhcmFtcyUyMHdpbGwlMjBiZSUyMGluJTIwZnAzMiUyQyUyMHRvJTIwY2FzdCUyMHRoZXNlJTIwdG8lMjBmbG9hdDE2JTBBcGFyYW1zJTIwJTNEJTIwbW9kZWwudG9fZnAxNihwYXJhbXMpJTBBJTIzJTIwSWYlMjB5b3UlMjB3YW50JTIwZG9uJ3QlMjB3YW50JTIwdG8lMjBjYXN0JTIwY2VydGFpbiUyMHBhcmFtZXRlcnMlMjAoZm9yJTIwZXhhbXBsZSUyMGxheWVyJTIwbm9ybSUyMGJpYXMlMjBhbmQlMjBzY2FsZSklMEElMjMlMjB0aGVuJTIwcGFzcyUyMHRoZSUyMG1hc2slMjBhcyUyMGZvbGxvd3MlMEFmcm9tJTIwZmxheCUyMGltcG9ydCUyMHRyYXZlcnNlX3V0aWwlMEElMEFtb2RlbCUyQyUyMHBhcmFtcyUyMCUzRCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIpJTBBZmxhdF9wYXJhbXMlMjAlM0QlMjB0cmF2ZXJzZV91dGlsLmZsYXR0ZW5fZGljdChwYXJhbXMpJTBBbWFzayUyMCUzRCUyMCU3QiUwQSUyMCUyMCUyMCUyMHBhdGglM0ElMjAocGF0aCU1Qi0yJTVEJTIwISUzRCUyMCglMjJMYXllck5vcm0lMjIlMkMlMjAlMjJiaWFzJTIyKSUyMGFuZCUyMHBhdGglNUItMiUzQSU1RCUyMCElM0QlMjAoJTIyTGF5ZXJOb3JtJTIyJTJDJTIwJTIyc2NhbGUlMjIpKSUwQSUyMCUyMCUyMCUyMGZvciUyMHBhdGglMjBpbiUyMGZsYXRfcGFyYW1zJTBBJTdEJTBBbWFzayUyMCUzRCUyMHRyYXZlcnNlX3V0aWwudW5mbGF0dGVuX2RpY3QobWFzayklMEFwYXJhbXMlMjAlM0QlMjBtb2RlbC50b19mcDE2KHBhcmFtcyUyQyUyMG1hc2sp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to cast these to float16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you want don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util

<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span>    path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp16(params, mask)`}}),{c(){d=r("p"),g=s("Examples:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"Examples:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function pr(J){let d,g,p,c,u;return c=new de({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUwQSUwQSUyMyUyMERvd25sb2FkJTIwbW9kZWwlMjBhbmQlMjBjb25maWd1cmF0aW9uJTIwZnJvbSUyMGh1Z2dpbmdmYWNlLmNvJTBBbW9kZWwlMkMlMjBwYXJhbXMlMjAlM0QlMjBGbGF4VU5ldDJEQ29uZGl0aW9uTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyKSUwQSUyMyUyMEJ5JTIwZGVmYXVsdCUyQyUyMHRoZSUyMG1vZGVsJTIwcGFyYW1zJTIwd2lsbCUyMGJlJTIwaW4lMjBmcDMyJTJDJTIwdG8lMjBpbGx1c3RyYXRlJTIwdGhlJTIwdXNlJTIwb2YlMjB0aGlzJTIwbWV0aG9kJTJDJTBBJTIzJTIwd2UnbGwlMjBmaXJzdCUyMGNhc3QlMjB0byUyMGZwMTYlMjBhbmQlMjBiYWNrJTIwdG8lMjBmcDMyJTBBcGFyYW1zJTIwJTNEJTIwbW9kZWwudG9fZjE2KHBhcmFtcyklMEElMjMlMjBub3clMjBjYXN0JTIwYmFjayUyMHRvJTIwZnAzMiUwQXBhcmFtcyUyMCUzRCUyMG1vZGVsLnRvX2ZwMzIocGFyYW1zKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to illustrate the use of this method,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># we&#x27;ll first cast to fp16 and back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_f16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now cast back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp32(params)`}}),{c(){d=r("p"),g=s("Examples:"),p=f(),b(c.$$.fragment)},l(t){d=l(t,"P",{});var m=i(d);g=n(m,"Examples:"),m.forEach(o),p=h(t),v(c.$$.fragment,t)},m(t,m){U(t,d,m),e(d,g),U(t,p,m),_(c,t,m),u=!0},p:ie,i(t){u||(w(c.$$.fragment,t),u=!0)},o(t){x(c.$$.fragment,t),u=!1},d(t){t&&o(d),t&&o(p),$(c,t)}}}function fr(J){let d,g,p,c,u,t,m,K,X,ce,V,ee,E,fo='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>p</mi><mi>\u03B8</mi></msub><mo stretchy="false">(</mo><msub><mi>x</mi><mrow><mi>t</mi><mo>\u2212</mo><mn>1</mn></mrow></msub><mi mathvariant="normal">\u2223</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;">\u03B8</span></span></span></span></span><span class="vlist-s">\u200B</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">\u2212</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2083em;"><span></span></span></span></span></span></span><span class="mord">\u2223</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">\u200B</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>',Ee,Fe,S,ko,it,Zo,Go,Ie,wt,Eo,Fo,ho,te,me,xt,We,Io,$t,Wo,uo,T,Be,Bo,Ut,Co,Vo,dt,ct,Ro,No,Do,Tt,z,Jt,Yo,Xo,jt,So,zo,mt,Qo,Ao,Po,pe,Ce,Ho,oe,Lo,kt,qo,Oo,Zt,Ko,ea,ta,fe,Ve,oa,Re,aa,Ne,sa,na,ra,he,De,la,ae,ia,Gt,da,ca,Et,ma,pa,fa,F,Ye,ha,Xe,ua,Se,ga,Ma,ya,Ft,ba,va,ue,_a,ge,wa,G,ze,xa,It,$a,Ua,se,Ta,Wt,Ja,ja,Bt,ka,Za,Ga,Me,Ea,ye,Fa,be,Ia,Q,Qe,Wa,Ct,Ba,Ca,ve,Va,_e,Ae,Ra,Pe,Na,pt,Da,Ya,go,ne,we,Vt,He,Xa,Rt,Sa,Mo,j,Le,za,Nt,Qa,Aa,ft,ht,Pa,Ha,La,Dt,A,Yt,qa,Oa,Xt,Ka,es,ut,ts,os,as,R,qe,ss,St,ns,rs,xe,ls,$e,is,Ue,Oe,ds,Ke,cs,gt,ms,ps,fs,N,et,hs,W,us,zt,gs,Ms,Qt,ys,bs,At,vs,_s,Pt,ws,xs,$s,Ht,Us,Ts,Te,Js,D,tt,js,B,ks,Lt,Zs,Gs,qt,Es,Fs,Ot,Is,Ws,Kt,Bs,Cs,Vs,eo,Rs,Ns,Je,Ds,P,ot,Ys,C,Xs,to,Ss,zs,oo,Qs,As,ao,Ps,Hs,so,Ls,qs,Os,je,yo;return t=new tn({}),We=new tn({}),Be=new I({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_utils.py#L153"}}),Ce=new I({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_utils.py#L204"}}),Ve=new I({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_utils.py#L265"}}),De=new I({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_utils.py#L195"}}),Ye=new I({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/v0.19.2/src/diffusers/models/modeling_utils.py#L229"}}),ue=new Pn({props:{warning:!0,$$slots:{default:[or]},$$scope:{ctx:J}}}),ge=new le({props:{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.example",$$slots:{default:[ar]},$$scope:{ctx:J}}}),ze=new I({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/v0.19.2/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>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model with another dtype. If <code>&quot;auto&quot;</code> is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,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.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_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.use_auth_token",description:`<strong>use_auth_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:"use_auth_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>str</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.</p>
<p>Set <code>device_map=&quot;auto&quot;</code> to have &#x1F917; Accelerate automatically compute the most optimized <code>device_map</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.ModelMixin.from_pretrained.max_memory",description:`<strong>max_memory</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
A dictionary device identifier for the maximum memory. Will default to the maximum memory available for
each GPU and the available CPU RAM if unset.`,name:"max_memory"},{anchor:"diffusers.ModelMixin.from_pretrained.offload_folder",description:`<strong>offload_folder</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
The path to offload weights if <code>device_map</code> contains the value <code>&quot;disk&quot;</code>.`,name:"offload_folder"},{anchor:"diffusers.ModelMixin.from_pretrained.offload_state_dict",description:`<strong>offload_state_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If <code>True</code>, temporarily offloads the CPU state dict to the hard drive to avoid running out of CPU RAM if
the weight of the CPU state dict + the biggest shard of the checkpoint does not fit. Defaults to <code>True</code>
when there is some disk offload.`,name:"offload_state_dict"},{anchor:"diffusers.ModelMixin.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading only loading the pretrained weights and not initializing the weights. This also
tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model.
Only supported for PyTorch &gt;= 1.9.0. If you are using an older version of PyTorch, setting this
argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.ModelMixin.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Load weights from a specified <code>variant</code> filename such as <code>&quot;fp16&quot;</code> or <code>&quot;ema&quot;</code>. This is ignored when
loading <code>from_flax</code>.`,name:"variant"},{anchor:"diffusers.ModelMixin.from_pretrained.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>None</code>, the <code>safetensors</code> weights are downloaded if they&#x2019;re available <strong>and</strong> if the
<code>safetensors</code> library is installed. If set to <code>True</code>, the model is forcibly loaded from <code>safetensors</code>
weights. If set to <code>False</code>, <code>safetensors</code> weights are not loaded.`,name:"use_safetensors"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_utils.py#L331"}}),Me=new Pn({props:{$$slots:{default:[sr]},$$scope:{ctx:J}}}),ye=new le({props:{anchor:"diffusers.ModelMixin.from_pretrained.example",$$slots:{default:[nr]},$$scope:{ctx:J}}}),be=new le({props:{anchor:"diffusers.ModelMixin.from_pretrained.example-2",$$slots:{default:[rr]},$$scope:{ctx:J}}}),Qe=new I({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/v0.19.2/src/diffusers/models/modeling_utils.py#L850",returnDescription:`
<p>The number of parameters.</p>
`,returnType:`
<p><code>int</code></p>
`}}),ve=new le({props:{anchor:"diffusers.ModelMixin.num_parameters.example",$$slots:{default:[lr]},$$scope:{ctx:J}}}),Ae=new I({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.Callable = None"},{name:"safe_serialization",val:": bool = False"},{name:"variant",val:": typing.Optional[str] = None"}],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>False</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"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_utils.py#L271"}}),He=new tn({}),Le=new I({props:{name:"class diffusers.FlaxModelMixin",anchor:"diffusers.FlaxModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_flax_utils.py#L45"}}),qe=new I({props:{name:"from_pretrained",anchor:"diffusers.FlaxModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"*model_args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> (for example <code>runwayml/stable-diffusion-v1-5</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
using <a href="/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.FlaxModelMixin.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified, all the computation will be performed with the given <code>dtype</code>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>This only specifies the dtype of the <em>computation</em> and does not influence the dtype of model
parameters.</p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.FlaxModelMixin.to_fp16">to_fp16()</a> and
<a href="/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.FlaxModelMixin.to_bf16">to_bf16()</a>.</p>

					</div>`,name:"dtype"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.model_args",description:`<strong>model_args</strong> (sequence of positional arguments, <em>optional</em>) &#x2014;
All remaining positional arguments are passed to the underlying model&#x2019;s <code>__init__</code> method.`,name:"model_args"},{anchor:"diffusers.FlaxModelMixin.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.FlaxModelMixin.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.FlaxModelMixin.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to resume downloading the model weights and configuration files. If set to <code>False</code>, any
incompletely downloaded files are deleted.`,name:"resume_download"},{anchor:"diffusers.FlaxModelMixin.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.FlaxModelMixin.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.FlaxModelMixin.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.FlaxModelMixin.from_pretrained.from_pt",description:`<strong>from_pt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a PyTorch checkpoint save file.`,name:"from_pt"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to update the configuration object (after it is loaded) and initiate the model (for
example, <code>output_attentions=True</code>). Behaves differently depending on whether a <code>config</code> is provided or
automatically loaded:</p>
<ul>
<li>If a configuration is provided with <code>config</code>, <code>kwargs</code> are directly passed to the underlying
model&#x2019;s <code>__init__</code> method (we assume all relevant updates to the configuration have already been
done).</li>
<li>If a configuration is not provided, <code>kwargs</code> are first passed to the configuration class
initialization function <a href="/docs/diffusers/v0.19.2/en/api/configuration#diffusers.ConfigMixin.from_config">from_config()</a>. Each key of the <code>kwargs</code> that corresponds
to a configuration attribute is used to override said attribute with the supplied <code>kwargs</code> value.
Remaining keys that do not correspond to any configuration attribute are passed to the underlying
model&#x2019;s <code>__init__</code> function.</li>
</ul>`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_flax_utils.py#L197"}}),xe=new le({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example",$$slots:{default:[ir]},$$scope:{ctx:J}}}),$e=new le({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example-2",$$slots:{default:[dr]},$$scope:{ctx:J}}}),Oe=new I({props:{name:"save_pretrained",anchor:"diffusers.FlaxModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"is_main_process",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.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.FlaxModelMixin.save_pretrained.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_flax_utils.py#L495"}}),et=new I({props:{name:"to_bf16",anchor:"diffusers.FlaxModelMixin.to_bf16",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_bf16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_bf16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans. It should be <code>True</code>
for params you want to cast, and <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_flax_utils.py#L89"}}),Te=new le({props:{anchor:"diffusers.FlaxModelMixin.to_bf16.example",$$slots:{default:[cr]},$$scope:{ctx:J}}}),tt=new I({props:{name:"to_fp16",anchor:"diffusers.FlaxModelMixin.to_fp16",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_fp16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_fp16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans. It should be <code>True</code>
for params you want to cast, and <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_flax_utils.py#L155"}}),Je=new le({props:{anchor:"diffusers.FlaxModelMixin.to_fp16.example",$$slots:{default:[mr]},$$scope:{ctx:J}}}),ot=new I({props:{name:"to_fp32",anchor:"diffusers.FlaxModelMixin.to_fp32",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_fp32.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_fp32.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans. It should be <code>True</code>
for params you want to cast, and <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/models/modeling_flax_utils.py#L128"}}),je=new le({props:{anchor:"diffusers.FlaxModelMixin.to_fp32.example",$$slots:{default:[pr]},$$scope:{ctx:J}}}),{c(){d=r("meta"),g=f(),p=r("h1"),c=r("a"),u=r("span"),b(t.$$.fragment),m=f(),K=r("span"),X=s("Models"),ce=f(),V=r("p"),ee=s("\u{1F917} 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 "),E=new On,Ee=s("."),Fe=f(),S=r("p"),ko=s("All models are built from the base "),it=r("a"),Zo=s("ModelMixin"),Go=s(" class which is a "),Ie=r("a"),wt=r("code"),Eo=s("torch.nn.module"),Fo=s(" providing basic functionality for saving and loading models, locally and from the Hugging Face Hub."),ho=f(),te=r("h2"),me=r("a"),xt=r("span"),b(We.$$.fragment),Io=f(),$t=r("span"),Wo=s("ModelMixin"),uo=f(),T=r("div"),b(Be.$$.fragment),Bo=f(),Ut=r("p"),Co=s("Base class for all models."),Vo=f(),dt=r("p"),ct=r("a"),Ro=s("ModelMixin"),No=s(` takes care of storing the model configuration and provides methods for loading, downloading and
saving models.`),Do=f(),Tt=r("ul"),z=r("li"),Jt=r("strong"),Yo=s("config_name"),Xo=s(" ("),jt=r("code"),So=s("str"),zo=s(") \u2014 Filename to save a model to when calling "),mt=r("a"),Qo=s("save_pretrained()"),Ao=s("."),Po=f(),pe=r("div"),b(Ce.$$.fragment),Ho=f(),oe=r("p"),Lo=s("Deactivates gradient checkpointing for the current model (may be referred to as "),kt=r("em"),qo=s("activation checkpointing"),Oo=s(` or
`),Zt=r("em"),Ko=s("checkpoint activations"),ea=s(" in other frameworks)."),ta=f(),fe=r("div"),b(Ve.$$.fragment),oa=f(),Re=r("p"),aa=s("Disable memory efficient attention from "),Ne=r("a"),sa=s("xFormers"),na=s("."),ra=f(),he=r("div"),b(De.$$.fragment),la=f(),ae=r("p"),ia=s("Activates gradient checkpointing for the current model (may be referred to as "),Gt=r("em"),da=s("activation checkpointing"),ca=s(` or
`),Et=r("em"),ma=s("checkpoint activations"),pa=s(" in other frameworks)."),fa=f(),F=r("div"),b(Ye.$$.fragment),ha=f(),Xe=r("p"),ua=s("Enable memory efficient attention from "),Se=r("a"),ga=s("xFormers"),Ma=s("."),ya=f(),Ft=r("p"),ba=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.`),va=f(),b(ue.$$.fragment),_a=f(),b(ge.$$.fragment),wa=f(),G=r("div"),b(ze.$$.fragment),xa=f(),It=r("p"),$a=s("Instantiate a pretrained PyTorch model from a pretrained model configuration."),Ua=f(),se=r("p"),Ta=s("The model is set in evaluation mode - "),Wt=r("code"),Ja=s("model.eval()"),ja=s(` - by default, and dropout modules are deactivated. To
train the model, set it back in training mode with `),Bt=r("code"),ka=s("model.train()"),Za=s("."),Ga=f(),b(Me.$$.fragment),Ea=f(),b(ye.$$.fragment),Fa=f(),b(be.$$.fragment),Ia=f(),Q=r("div"),b(Qe.$$.fragment),Wa=f(),Ct=r("p"),Ba=s("Get number of (trainable or non-embedding) parameters in the module."),Ca=f(),b(ve.$$.fragment),Va=f(),_e=r("div"),b(Ae.$$.fragment),Ra=f(),Pe=r("p"),Na=s(`Save a model and its configuration file to a directory so that it can be reloaded using the
`),pt=r("a"),Da=s("from_pretrained()"),Ya=s(" class method."),go=f(),ne=r("h2"),we=r("a"),Vt=r("span"),b(He.$$.fragment),Xa=f(),Rt=r("span"),Sa=s("FlaxModelMixin"),Mo=f(),j=r("div"),b(Le.$$.fragment),za=f(),Nt=r("p"),Qa=s("Base class for all Flax models."),Aa=f(),ft=r("p"),ht=r("a"),Pa=s("FlaxModelMixin"),Ha=s(` takes care of storing the model configuration and provides methods for loading, downloading and
saving models.`),La=f(),Dt=r("ul"),A=r("li"),Yt=r("strong"),qa=s("config_name"),Oa=s(" ("),Xt=r("code"),Ka=s("str"),es=s(") \u2014 Filename to save a model to when calling "),ut=r("a"),ts=s("save_pretrained()"),os=s("."),as=f(),R=r("div"),b(qe.$$.fragment),ss=f(),St=r("p"),ns=s("Instantiate a pretrained Flax model from a pretrained model configuration."),rs=f(),b(xe.$$.fragment),ls=f(),b($e.$$.fragment),is=f(),Ue=r("div"),b(Oe.$$.fragment),ds=f(),Ke=r("p"),cs=s(`Save a model and its configuration file to a directory so that it can be reloaded using the
`),gt=r("a"),ms=s("from_pretrained()"),ps=s(" class method."),fs=f(),N=r("div"),b(et.$$.fragment),hs=f(),W=r("p"),us=s("Cast the floating-point "),zt=r("code"),gs=s("params"),Ms=s(" to "),Qt=r("code"),ys=s("jax.numpy.bfloat16"),bs=s(". This returns a new "),At=r("code"),vs=s("params"),_s=s(` tree and does not cast
the `),Pt=r("code"),ws=s("params"),xs=s(" in place."),$s=f(),Ht=r("p"),Us=s(`This method can be used on a TPU to explicitly convert the model parameters to bfloat16 precision to do full
half-precision training or to save weights in bfloat16 for inference in order to save memory and improve speed.`),Ts=f(),b(Te.$$.fragment),Js=f(),D=r("div"),b(tt.$$.fragment),js=f(),B=r("p"),ks=s("Cast the floating-point "),Lt=r("code"),Zs=s("params"),Gs=s(" to "),qt=r("code"),Es=s("jax.numpy.float16"),Fs=s(". This returns a new "),Ot=r("code"),Is=s("params"),Ws=s(` tree and does not cast the
`),Kt=r("code"),Bs=s("params"),Cs=s(" in place."),Vs=f(),eo=r("p"),Rs=s(`This method can be used on a GPU to explicitly convert the model parameters to float16 precision to do full
half-precision training or to save weights in float16 for inference in order to save memory and improve speed.`),Ns=f(),b(Je.$$.fragment),Ds=f(),P=r("div"),b(ot.$$.fragment),Ys=f(),C=r("p"),Xs=s("Cast the floating-point "),to=r("code"),Ss=s("params"),zs=s(" to "),oo=r("code"),Qs=s("jax.numpy.float32"),As=s(`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),ao=r("code"),Ps=s("params"),Hs=s(" tree and does not cast the "),so=r("code"),Ls=s("params"),qs=s(" in place."),Os=f(),b(je.$$.fragment),this.h()},l(a){const y=Kn('[data-svelte="svelte-1phssyn"]',document.head);d=l(y,"META",{name:!0,content:!0}),y.forEach(o),g=h(a),p=l(a,"H1",{class:!0});var at=i(p);c=l(at,"A",{id:!0,class:!0,href:!0});var no=i(c);u=l(no,"SPAN",{});var ro=i(u);v(t.$$.fragment,ro),ro.forEach(o),no.forEach(o),m=h(at),K=l(at,"SPAN",{});var lo=i(K);X=n(lo,"Models"),lo.forEach(o),at.forEach(o),ce=h(a),V=l(a,"P",{});var st=i(V);ee=n(st,"\u{1F917} 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 "),E=er(st),Ee=n(st,"."),st.forEach(o),Fe=h(a),S=l(a,"P",{});var re=i(S);ko=n(re,"All models are built from the base "),it=l(re,"A",{href:!0});var io=i(it);Zo=n(io,"ModelMixin"),io.forEach(o),Go=n(re," class which is a "),Ie=l(re,"A",{href:!0,rel:!0});var co=i(Ie);wt=l(co,"CODE",{});var mo=i(wt);Eo=n(mo,"torch.nn.module"),mo.forEach(o),co.forEach(o),Fo=n(re," providing basic functionality for saving and loading models, locally and from the Hugging Face Hub."),re.forEach(o),ho=h(a),te=l(a,"H2",{class:!0});var nt=i(te);me=l(nt,"A",{id:!0,class:!0,href:!0});var po=i(me);xt=l(po,"SPAN",{});var on=i(xt);v(We.$$.fragment,on),on.forEach(o),po.forEach(o),Io=h(nt),$t=l(nt,"SPAN",{});var an=i($t);Wo=n(an,"ModelMixin"),an.forEach(o),nt.forEach(o),uo=h(a),T=l(a,"DIV",{class:!0});var k=i(T);v(Be.$$.fragment,k),Bo=h(k),Ut=l(k,"P",{});var sn=i(Ut);Co=n(sn,"Base class for all models."),sn.forEach(o),Vo=h(k),dt=l(k,"P",{});var Ks=i(dt);ct=l(Ks,"A",{href:!0});var nn=i(ct);Ro=n(nn,"ModelMixin"),nn.forEach(o),No=n(Ks,` takes care of storing the model configuration and provides methods for loading, downloading and
saving models.`),Ks.forEach(o),Do=h(k),Tt=l(k,"UL",{});var rn=i(Tt);z=l(rn,"LI",{});var rt=i(z);Jt=l(rt,"STRONG",{});var ln=i(Jt);Yo=n(ln,"config_name"),ln.forEach(o),Xo=n(rt," ("),jt=l(rt,"CODE",{});var dn=i(jt);So=n(dn,"str"),dn.forEach(o),zo=n(rt,") \u2014 Filename to save a model to when calling "),mt=l(rt,"A",{href:!0});var cn=i(mt);Qo=n(cn,"save_pretrained()"),cn.forEach(o),Ao=n(rt,"."),rt.forEach(o),rn.forEach(o),Po=h(k),pe=l(k,"DIV",{class:!0});var bo=i(pe);v(Ce.$$.fragment,bo),Ho=h(bo),oe=l(bo,"P",{});var Mt=i(oe);Lo=n(Mt,"Deactivates gradient checkpointing for the current model (may be referred to as "),kt=l(Mt,"EM",{});var mn=i(kt);qo=n(mn,"activation checkpointing"),mn.forEach(o),Oo=n(Mt,` or
`),Zt=l(Mt,"EM",{});var pn=i(Zt);Ko=n(pn,"checkpoint activations"),pn.forEach(o),ea=n(Mt," in other frameworks)."),Mt.forEach(o),bo.forEach(o),ta=h(k),fe=l(k,"DIV",{class:!0});var vo=i(fe);v(Ve.$$.fragment,vo),oa=h(vo),Re=l(vo,"P",{});var _o=i(Re);aa=n(_o,"Disable memory efficient attention from "),Ne=l(_o,"A",{href:!0,rel:!0});var fn=i(Ne);sa=n(fn,"xFormers"),fn.forEach(o),na=n(_o,"."),_o.forEach(o),vo.forEach(o),ra=h(k),he=l(k,"DIV",{class:!0});var wo=i(he);v(De.$$.fragment,wo),la=h(wo),ae=l(wo,"P",{});var yt=i(ae);ia=n(yt,"Activates gradient checkpointing for the current model (may be referred to as "),Gt=l(yt,"EM",{});var hn=i(Gt);da=n(hn,"activation checkpointing"),hn.forEach(o),ca=n(yt,` or
`),Et=l(yt,"EM",{});var un=i(Et);ma=n(un,"checkpoint activations"),un.forEach(o),pa=n(yt," in other frameworks)."),yt.forEach(o),wo.forEach(o),fa=h(k),F=l(k,"DIV",{class:!0});var H=i(F);v(Ye.$$.fragment,H),ha=h(H),Xe=l(H,"P",{});var xo=i(Xe);ua=n(xo,"Enable memory efficient attention from "),Se=l(xo,"A",{href:!0,rel:!0});var gn=i(Se);ga=n(gn,"xFormers"),gn.forEach(o),Ma=n(xo,"."),xo.forEach(o),ya=h(H),Ft=l(H,"P",{});var Mn=i(Ft);ba=n(Mn,`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.`),Mn.forEach(o),va=h(H),v(ue.$$.fragment,H),_a=h(H),v(ge.$$.fragment,H),H.forEach(o),wa=h(k),G=l(k,"DIV",{class:!0});var Y=i(G);v(ze.$$.fragment,Y),xa=h(Y),It=l(Y,"P",{});var yn=i(It);$a=n(yn,"Instantiate a pretrained PyTorch model from a pretrained model configuration."),yn.forEach(o),Ua=h(Y),se=l(Y,"P",{});var bt=i(se);Ta=n(bt,"The model is set in evaluation mode - "),Wt=l(bt,"CODE",{});var bn=i(Wt);Ja=n(bn,"model.eval()"),bn.forEach(o),ja=n(bt,` - by default, and dropout modules are deactivated. To
train the model, set it back in training mode with `),Bt=l(bt,"CODE",{});var vn=i(Bt);ka=n(vn,"model.train()"),vn.forEach(o),Za=n(bt,"."),bt.forEach(o),Ga=h(Y),v(Me.$$.fragment,Y),Ea=h(Y),v(ye.$$.fragment,Y),Fa=h(Y),v(be.$$.fragment,Y),Y.forEach(o),Ia=h(k),Q=l(k,"DIV",{class:!0});var vt=i(Q);v(Qe.$$.fragment,vt),Wa=h(vt),Ct=l(vt,"P",{});var _n=i(Ct);Ba=n(_n,"Get number of (trainable or non-embedding) parameters in the module."),_n.forEach(o),Ca=h(vt),v(ve.$$.fragment,vt),vt.forEach(o),Va=h(k),_e=l(k,"DIV",{class:!0});var $o=i(_e);v(Ae.$$.fragment,$o),Ra=h($o),Pe=l($o,"P",{});var Uo=i(Pe);Na=n(Uo,`Save a model and its configuration file to a directory so that it can be reloaded using the
`),pt=l(Uo,"A",{href:!0});var wn=i(pt);Da=n(wn,"from_pretrained()"),wn.forEach(o),Ya=n(Uo," class method."),Uo.forEach(o),$o.forEach(o),k.forEach(o),go=h(a),ne=l(a,"H2",{class:!0});var To=i(ne);we=l(To,"A",{id:!0,class:!0,href:!0});var xn=i(we);Vt=l(xn,"SPAN",{});var $n=i(Vt);v(He.$$.fragment,$n),$n.forEach(o),xn.forEach(o),Xa=h(To),Rt=l(To,"SPAN",{});var Un=i(Rt);Sa=n(Un,"FlaxModelMixin"),Un.forEach(o),To.forEach(o),Mo=h(a),j=l(a,"DIV",{class:!0});var Z=i(j);v(Le.$$.fragment,Z),za=h(Z),Nt=l(Z,"P",{});var Tn=i(Nt);Qa=n(Tn,"Base class for all Flax models."),Tn.forEach(o),Aa=h(Z),ft=l(Z,"P",{});var en=i(ft);ht=l(en,"A",{href:!0});var Jn=i(ht);Pa=n(Jn,"FlaxModelMixin"),Jn.forEach(o),Ha=n(en,` takes care of storing the model configuration and provides methods for loading, downloading and
saving models.`),en.forEach(o),La=h(Z),Dt=l(Z,"UL",{});var jn=i(Dt);A=l(jn,"LI",{});var lt=i(A);Yt=l(lt,"STRONG",{});var kn=i(Yt);qa=n(kn,"config_name"),kn.forEach(o),Oa=n(lt," ("),Xt=l(lt,"CODE",{});var Zn=i(Xt);Ka=n(Zn,"str"),Zn.forEach(o),es=n(lt,") \u2014 Filename to save a model to when calling "),ut=l(lt,"A",{href:!0});var Gn=i(ut);ts=n(Gn,"save_pretrained()"),Gn.forEach(o),os=n(lt,"."),lt.forEach(o),jn.forEach(o),as=h(Z),R=l(Z,"DIV",{class:!0});var ke=i(R);v(qe.$$.fragment,ke),ss=h(ke),St=l(ke,"P",{});var En=i(St);ns=n(En,"Instantiate a pretrained Flax model from a pretrained model configuration."),En.forEach(o),rs=h(ke),v(xe.$$.fragment,ke),ls=h(ke),v($e.$$.fragment,ke),ke.forEach(o),is=h(Z),Ue=l(Z,"DIV",{class:!0});var Jo=i(Ue);v(Oe.$$.fragment,Jo),ds=h(Jo),Ke=l(Jo,"P",{});var jo=i(Ke);cs=n(jo,`Save a model and its configuration file to a directory so that it can be reloaded using the
`),gt=l(jo,"A",{href:!0});var Fn=i(gt);ms=n(Fn,"from_pretrained()"),Fn.forEach(o),ps=n(jo," class method."),jo.forEach(o),Jo.forEach(o),fs=h(Z),N=l(Z,"DIV",{class:!0});var Ze=i(N);v(et.$$.fragment,Ze),hs=h(Ze),W=l(Ze,"P",{});var L=i(W);us=n(L,"Cast the floating-point "),zt=l(L,"CODE",{});var In=i(zt);gs=n(In,"params"),In.forEach(o),Ms=n(L," to "),Qt=l(L,"CODE",{});var Wn=i(Qt);ys=n(Wn,"jax.numpy.bfloat16"),Wn.forEach(o),bs=n(L,". This returns a new "),At=l(L,"CODE",{});var Bn=i(At);vs=n(Bn,"params"),Bn.forEach(o),_s=n(L,` tree and does not cast
the `),Pt=l(L,"CODE",{});var Cn=i(Pt);ws=n(Cn,"params"),Cn.forEach(o),xs=n(L," in place."),L.forEach(o),$s=h(Ze),Ht=l(Ze,"P",{});var Vn=i(Ht);Us=n(Vn,`This method can be used on a TPU to explicitly convert the model parameters to bfloat16 precision to do full
half-precision training or to save weights in bfloat16 for inference in order to save memory and improve speed.`),Vn.forEach(o),Ts=h(Ze),v(Te.$$.fragment,Ze),Ze.forEach(o),Js=h(Z),D=l(Z,"DIV",{class:!0});var Ge=i(D);v(tt.$$.fragment,Ge),js=h(Ge),B=l(Ge,"P",{});var q=i(B);ks=n(q,"Cast the floating-point "),Lt=l(q,"CODE",{});var Rn=i(Lt);Zs=n(Rn,"params"),Rn.forEach(o),Gs=n(q," to "),qt=l(q,"CODE",{});var Nn=i(qt);Es=n(Nn,"jax.numpy.float16"),Nn.forEach(o),Fs=n(q,". This returns a new "),Ot=l(q,"CODE",{});var Dn=i(Ot);Is=n(Dn,"params"),Dn.forEach(o),Ws=n(q,` tree and does not cast the
`),Kt=l(q,"CODE",{});var Yn=i(Kt);Bs=n(Yn,"params"),Yn.forEach(o),Cs=n(q," in place."),q.forEach(o),Vs=h(Ge),eo=l(Ge,"P",{});var Xn=i(eo);Rs=n(Xn,`This method can be used on a GPU to explicitly convert the model parameters to float16 precision to do full
half-precision training or to save weights in float16 for inference in order to save memory and improve speed.`),Xn.forEach(o),Ns=h(Ge),v(Je.$$.fragment,Ge),Ge.forEach(o),Ds=h(Z),P=l(Z,"DIV",{class:!0});var _t=i(P);v(ot.$$.fragment,_t),Ys=h(_t),C=l(_t,"P",{});var O=i(C);Xs=n(O,"Cast the floating-point "),to=l(O,"CODE",{});var Sn=i(to);Ss=n(Sn,"params"),Sn.forEach(o),zs=n(O," to "),oo=l(O,"CODE",{});var zn=i(oo);Qs=n(zn,"jax.numpy.float32"),zn.forEach(o),As=n(O,`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),ao=l(O,"CODE",{});var Qn=i(ao);Ps=n(Qn,"params"),Qn.forEach(o),Hs=n(O," tree and does not cast the "),so=l(O,"CODE",{});var An=i(so);Ls=n(An,"params"),An.forEach(o),qs=n(O," in place."),O.forEach(o),Os=h(_t),v(je.$$.fragment,_t),_t.forEach(o),Z.forEach(o),this.h()},h(){M(d,"name","hf:doc:metadata"),M(d,"content",JSON.stringify(hr)),M(c,"id","models"),M(c,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),M(c,"href","#models"),M(p,"class","relative group"),E.a=Ee,M(it,"href","/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.ModelMixin"),M(Ie,"href","https://pytorch.org/docs/stable/generated/torch.nn.Module.html"),M(Ie,"rel","nofollow"),M(me,"id","diffusers.ModelMixin"),M(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),M(me,"href","#diffusers.ModelMixin"),M(te,"class","relative group"),M(ct,"href","/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.ModelMixin"),M(mt,"href","/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.ModelMixin.save_pretrained"),M(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Ne,"href","https://facebookresearch.github.io/xformers/"),M(Ne,"rel","nofollow"),M(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Se,"href","https://facebookresearch.github.io/xformers/"),M(Se,"rel","nofollow"),M(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(pt,"href","/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.ModelMixin.from_pretrained"),M(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(we,"id","diffusers.FlaxModelMixin"),M(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),M(we,"href","#diffusers.FlaxModelMixin"),M(ne,"class","relative group"),M(ht,"href","/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.FlaxModelMixin"),M(ut,"href","/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.FlaxModelMixin.save_pretrained"),M(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(gt,"href","/docs/diffusers/v0.19.2/en/api/models/overview#diffusers.FlaxModelMixin.from_pretrained"),M(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),M(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(a,y){e(document.head,d),U(a,g,y),U(a,p,y),e(p,c),e(c,u),_(t,u,null),e(p,m),e(p,K),e(K,X),U(a,ce,y),U(a,V,y),e(V,ee),E.m(fo,V),e(V,Ee),U(a,Fe,y),U(a,S,y),e(S,ko),e(S,it),e(it,Zo),e(S,Go),e(S,Ie),e(Ie,wt),e(wt,Eo),e(S,Fo),U(a,ho,y),U(a,te,y),e(te,me),e(me,xt),_(We,xt,null),e(te,Io),e(te,$t),e($t,Wo),U(a,uo,y),U(a,T,y),_(Be,T,null),e(T,Bo),e(T,Ut),e(Ut,Co),e(T,Vo),e(T,dt),e(dt,ct),e(ct,Ro),e(dt,No),e(T,Do),e(T,Tt),e(Tt,z),e(z,Jt),e(Jt,Yo),e(z,Xo),e(z,jt),e(jt,So),e(z,zo),e(z,mt),e(mt,Qo),e(z,Ao),e(T,Po),e(T,pe),_(Ce,pe,null),e(pe,Ho),e(pe,oe),e(oe,Lo),e(oe,kt),e(kt,qo),e(oe,Oo),e(oe,Zt),e(Zt,Ko),e(oe,ea),e(T,ta),e(T,fe),_(Ve,fe,null),e(fe,oa),e(fe,Re),e(Re,aa),e(Re,Ne),e(Ne,sa),e(Re,na),e(T,ra),e(T,he),_(De,he,null),e(he,la),e(he,ae),e(ae,ia),e(ae,Gt),e(Gt,da),e(ae,ca),e(ae,Et),e(Et,ma),e(ae,pa),e(T,fa),e(T,F),_(Ye,F,null),e(F,ha),e(F,Xe),e(Xe,ua),e(Xe,Se),e(Se,ga),e(Xe,Ma),e(F,ya),e(F,Ft),e(Ft,ba),e(F,va),_(ue,F,null),e(F,_a),_(ge,F,null),e(T,wa),e(T,G),_(ze,G,null),e(G,xa),e(G,It),e(It,$a),e(G,Ua),e(G,se),e(se,Ta),e(se,Wt),e(Wt,Ja),e(se,ja),e(se,Bt),e(Bt,ka),e(se,Za),e(G,Ga),_(Me,G,null),e(G,Ea),_(ye,G,null),e(G,Fa),_(be,G,null),e(T,Ia),e(T,Q),_(Qe,Q,null),e(Q,Wa),e(Q,Ct),e(Ct,Ba),e(Q,Ca),_(ve,Q,null),e(T,Va),e(T,_e),_(Ae,_e,null),e(_e,Ra),e(_e,Pe),e(Pe,Na),e(Pe,pt),e(pt,Da),e(Pe,Ya),U(a,go,y),U(a,ne,y),e(ne,we),e(we,Vt),_(He,Vt,null),e(ne,Xa),e(ne,Rt),e(Rt,Sa),U(a,Mo,y),U(a,j,y),_(Le,j,null),e(j,za),e(j,Nt),e(Nt,Qa),e(j,Aa),e(j,ft),e(ft,ht),e(ht,Pa),e(ft,Ha),e(j,La),e(j,Dt),e(Dt,A),e(A,Yt),e(Yt,qa),e(A,Oa),e(A,Xt),e(Xt,Ka),e(A,es),e(A,ut),e(ut,ts),e(A,os),e(j,as),e(j,R),_(qe,R,null),e(R,ss),e(R,St),e(St,ns),e(R,rs),_(xe,R,null),e(R,ls),_($e,R,null),e(j,is),e(j,Ue),_(Oe,Ue,null),e(Ue,ds),e(Ue,Ke),e(Ke,cs),e(Ke,gt),e(gt,ms),e(Ke,ps),e(j,fs),e(j,N),_(et,N,null),e(N,hs),e(N,W),e(W,us),e(W,zt),e(zt,gs),e(W,Ms),e(W,Qt),e(Qt,ys),e(W,bs),e(W,At),e(At,vs),e(W,_s),e(W,Pt),e(Pt,ws),e(W,xs),e(N,$s),e(N,Ht),e(Ht,Us),e(N,Ts),_(Te,N,null),e(j,Js),e(j,D),_(tt,D,null),e(D,js),e(D,B),e(B,ks),e(B,Lt),e(Lt,Zs),e(B,Gs),e(B,qt),e(qt,Es),e(B,Fs),e(B,Ot),e(Ot,Is),e(B,Ws),e(B,Kt),e(Kt,Bs),e(B,Cs),e(D,Vs),e(D,eo),e(eo,Rs),e(D,Ns),_(Je,D,null),e(j,Ds),e(j,P),_(ot,P,null),e(P,Ys),e(P,C),e(C,Xs),e(C,to),e(to,Ss),e(C,zs),e(C,oo),e(oo,Qs),e(C,As),e(C,ao),e(ao,Ps),e(C,Hs),e(C,so),e(so,Ls),e(C,qs),e(P,Os),_(je,P,null),yo=!0},p(a,[y]){const at={};y&2&&(at.$$scope={dirty:y,ctx:a}),ue.$set(at);const no={};y&2&&(no.$$scope={dirty:y,ctx:a}),ge.$set(no);const ro={};y&2&&(ro.$$scope={dirty:y,ctx:a}),Me.$set(ro);const lo={};y&2&&(lo.$$scope={dirty:y,ctx:a}),ye.$set(lo);const st={};y&2&&(st.$$scope={dirty:y,ctx:a}),be.$set(st);const re={};y&2&&(re.$$scope={dirty:y,ctx:a}),ve.$set(re);const io={};y&2&&(io.$$scope={dirty:y,ctx:a}),xe.$set(io);const co={};y&2&&(co.$$scope={dirty:y,ctx:a}),$e.$set(co);const mo={};y&2&&(mo.$$scope={dirty:y,ctx:a}),Te.$set(mo);const nt={};y&2&&(nt.$$scope={dirty:y,ctx:a}),Je.$set(nt);const po={};y&2&&(po.$$scope={dirty:y,ctx:a}),je.$set(po)},i(a){yo||(w(t.$$.fragment,a),w(We.$$.fragment,a),w(Be.$$.fragment,a),w(Ce.$$.fragment,a),w(Ve.$$.fragment,a),w(De.$$.fragment,a),w(Ye.$$.fragment,a),w(ue.$$.fragment,a),w(ge.$$.fragment,a),w(ze.$$.fragment,a),w(Me.$$.fragment,a),w(ye.$$.fragment,a),w(be.$$.fragment,a),w(Qe.$$.fragment,a),w(ve.$$.fragment,a),w(Ae.$$.fragment,a),w(He.$$.fragment,a),w(Le.$$.fragment,a),w(qe.$$.fragment,a),w(xe.$$.fragment,a),w($e.$$.fragment,a),w(Oe.$$.fragment,a),w(et.$$.fragment,a),w(Te.$$.fragment,a),w(tt.$$.fragment,a),w(Je.$$.fragment,a),w(ot.$$.fragment,a),w(je.$$.fragment,a),yo=!0)},o(a){x(t.$$.fragment,a),x(We.$$.fragment,a),x(Be.$$.fragment,a),x(Ce.$$.fragment,a),x(Ve.$$.fragment,a),x(De.$$.fragment,a),x(Ye.$$.fragment,a),x(ue.$$.fragment,a),x(ge.$$.fragment,a),x(ze.$$.fragment,a),x(Me.$$.fragment,a),x(ye.$$.fragment,a),x(be.$$.fragment,a),x(Qe.$$.fragment,a),x(ve.$$.fragment,a),x(Ae.$$.fragment,a),x(He.$$.fragment,a),x(Le.$$.fragment,a),x(qe.$$.fragment,a),x(xe.$$.fragment,a),x($e.$$.fragment,a),x(Oe.$$.fragment,a),x(et.$$.fragment,a),x(Te.$$.fragment,a),x(tt.$$.fragment,a),x(Je.$$.fragment,a),x(ot.$$.fragment,a),x(je.$$.fragment,a),yo=!1},d(a){o(d),a&&o(g),a&&o(p),$(t),a&&o(ce),a&&o(V),a&&o(Fe),a&&o(S),a&&o(ho),a&&o(te),$(We),a&&o(uo),a&&o(T),$(Be),$(Ce),$(Ve),$(De),$(Ye),$(ue),$(ge),$(ze),$(Me),$(ye),$(be),$(Qe),$(ve),$(Ae),a&&o(go),a&&o(ne),$(He),a&&o(Mo),a&&o(j),$(Le),$(qe),$(xe),$($e),$(Oe),$(et),$(Te),$(tt),$(Je),$(ot),$(je)}}}const hr={local:"models",sections:[{local:"diffusers.ModelMixin",title:"ModelMixin"},{local:"diffusers.FlaxModelMixin",title:"FlaxModelMixin"}],title:"Models"};function ur(J){return tr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wr extends Hn{constructor(d){super();Ln(this,d,ur,fr,qn,{})}}export{wr as default,hr as metadata};
