import{S as dr,i as pr,s as cr,e as s,k as f,w as y,t as l,M as fr,c as a,d as o,m,a as r,x as v,h as d,b,G as e,g as U,y as w,q as $,o as M,B as x,v as mr,L as Fe}from"../../../chunks/vendor-hf-doc-builder.js";import{T as No}from"../../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as Ve}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as $n}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Be}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ur(Z){let i,g,c,p,h,t,u,E,J,P,W,B;return{c(){i=s("p"),g=l("Pipelines do not offer any training functionality. You\u2019ll notice PyTorch\u2019s autograd is disabled by decorating the "),c=s("code"),p=l("__call__()"),h=l(" method with a "),t=s("a"),u=s("code"),E=l("torch.no_grad"),J=l(" decorator because pipelines should not be used for training. If you\u2019re interested in training, please take a look at the "),P=s("a"),W=l("Training"),B=l(" guides instead!"),this.h()},l(G){i=a(G,"P",{});var k=r(i);g=d(k,"Pipelines do not offer any training functionality. You\u2019ll notice PyTorch\u2019s autograd is disabled by decorating the "),c=a(k,"CODE",{});var ee=r(c);p=d(ee,"__call__()"),ee.forEach(o),h=d(k," method with a "),t=a(k,"A",{href:!0,rel:!0});var S=r(t);u=a(S,"CODE",{});var Uo=r(u);E=d(Uo,"torch.no_grad"),Uo.forEach(o),S.forEach(o),J=d(k," decorator because pipelines should not be used for training. If you\u2019re interested in training, please take a look at the "),P=a(k,"A",{href:!0});var Po=r(P);W=d(Po,"Training"),Po.forEach(o),B=d(k," guides instead!"),k.forEach(o),this.h()},h(){b(t,"href","https://pytorch.org/docs/stable/generated/torch.no_grad.html"),b(t,"rel","nofollow"),b(P,"href","../traininig/overview")},m(G,k){U(G,i,k),e(i,g),e(i,c),e(c,p),e(i,h),e(i,t),e(t,u),e(u,E),e(i,J),e(i,P),e(P,W),e(i,B)},d(G){G&&o(i)}}}function hr(Z){let i,g,c,p,h;return p=new Ve({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMCglMEElMjAlMjAlMjAlMjBTdGFibGVEaWZmdXNpb25QaXBlbGluZSUyQyUwQSUyMCUyMCUyMCUyMFN0YWJsZURpZmZ1c2lvbkltZzJJbWdQaXBlbGluZSUyQyUwQSUyMCUyMCUyMCUyMFN0YWJsZURpZmZ1c2lvbklucGFpbnRQaXBlbGluZSUyQyUwQSklMEElMEF0ZXh0MmltZyUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiklMEFpbWcyaW1nJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uSW1nMkltZ1BpcGVsaW5lKCoqdGV4dDJpbWcuY29tcG9uZW50cyklMEFpbnBhaW50JTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uSW5wYWludFBpcGVsaW5lKCoqdGV4dDJpbWcuY29tcG9uZW50cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> (
<span class="hljs-meta">... </span>    StableDiffusionPipeline,
<span class="hljs-meta">... </span>    StableDiffusionImg2ImgPipeline,
<span class="hljs-meta">... </span>    StableDiffusionInpaintPipeline,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text2img = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>img2img = StableDiffusionImg2ImgPipeline(**text2img.components)
<span class="hljs-meta">&gt;&gt;&gt; </span>inpaint = StableDiffusionInpaintPipeline(**text2img.components)`}}),{c(){i=s("p"),g=l("Examples:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"Examples:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function gr(Z){let i,g,c,p,h,t,u,E;return{c(){i=s("p"),g=l("To use private or "),c=s("a"),p=l("gated models"),h=l(`, log-in with
`),t=s("code"),u=l("huggingface-cli login"),E=l("."),this.h()},l(J){i=a(J,"P",{});var P=r(i);g=d(P,"To use private or "),c=a(P,"A",{href:!0,rel:!0});var W=r(c);p=d(W,"gated models"),W.forEach(o),h=d(P,`, log-in with
`),t=a(P,"CODE",{});var B=r(t);u=d(B,"huggingface-cli login"),B.forEach(o),E=d(P,"."),P.forEach(o),this.h()},h(){b(c,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),b(c,"rel","nofollow")},m(J,P){U(J,i,P),e(i,g),e(i,c),e(c,p),e(i,h),e(i,t),e(t,u),e(i,E)},d(J){J&&o(i)}}}function br(Z){let i,g,c,p,h;return{c(){i=s("p"),g=l("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),c=s("code"),p=l("scaled_dot_product_attention"),h=l(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),c=a(u,"CODE",{});var E=r(c);p=d(E,"scaled_dot_product_attention"),E.forEach(o),h=d(u,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),u.forEach(o)},m(t,u){U(t,i,u),e(i,g),e(i,c),e(c,p),e(i,h)},d(t){t&&o(i)}}}function _r(Z){let i,g,c,p,h;return p=new Ve({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",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> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){i=s("p"),g=l("Examples:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"Examples:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function yr(Z){let i,g;return{c(){i=s("p"),g=l(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(c){i=a(c,"P",{});var p=r(i);g=d(p,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),p.forEach(o)},m(c,p){U(c,i,p),e(i,g)},d(c){c&&o(i)}}}function vr(Z){let i,g,c,p,h;return p=new Ve({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQXBpcGUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKGF0dGVudGlvbl9vcCUzRE1lbW9yeUVmZmljaWVudEF0dGVudGlvbkZsYXNoQXR0ZW50aW9uT3ApJTBBJTIzJTIwV29ya2Fyb3VuZCUyMGZvciUyMG5vdCUyMGFjY2VwdGluZyUyMGF0dGVudGlvbiUyMHNoYXBlJTIwdXNpbmclMjBWQUUlMjBmb3IlMjBGbGFzaCUyMEF0dGVudGlvbiUwQXBpcGUudmFlLmVuYWJsZV94Zm9ybWVyc19tZW1vcnlfZWZmaWNpZW50X2F0dGVudGlvbihhdHRlbnRpb25fb3AlM0ROb25lKQ==",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> DiffusionPipeline
<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>pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Workaround for not accepting attention shape using VAE for Flash Attention</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_xformers_memory_efficient_attention(attention_op=<span class="hljs-literal">None</span>)`}}),{c(){i=s("p"),g=l("Examples:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"Examples:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function wr(Z){let i,g,c,p,h;return p=new Ve({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMFVOZXQyRENvbmRpdGlvbk1vZGVsJTIwd2VyZSUyMG5vdCUyMGluaXRpYWxpemVkJTIwZnJvbSUyMHRoZSUyMG1vZGVsJTIwY2hlY2twb2ludCUyMGF0JTIwcnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjBhbmQlMjBhcmUlMjBuZXdseSUyMGluaXRpYWxpemVkJTIwYmVjYXVzZSUyMHRoZSUyMHNoYXBlcyUyMGRpZCUyMG5vdCUyMG1hdGNoJTNBJTBBLSUyMGNvbnZfaW4ud2VpZ2h0JTNBJTIwZm91bmQlMjBzaGFwZSUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwNCUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwY2hlY2twb2ludCUyMGFuZCUyMHRvcmNoLlNpemUoJTVCMzIwJTJDJTIwOSUyQyUyMDMlMkMlMjAzJTVEKSUyMGluJTIwdGhlJTIwbW9kZWwlMjBpbnN0YW50aWF0ZWQlMEFZb3UlMjBzaG91bGQlMjBwcm9iYWJseSUyMFRSQUlOJTIwdGhpcyUyMG1vZGVsJTIwb24lMjBhJTIwZG93bi1zdHJlYW0lMjB0YXNrJTIwdG8lMjBiZSUyMGFibGUlMjB0byUyMHVzZSUyMGl0JTIwZm9yJTIwcHJlZGljdGlvbnMlMjBhbmQlMjBpbmZlcmVuY2Uu",highlighted:`<span class="hljs-comment">Some</span> <span class="hljs-comment">weights</span> <span class="hljs-comment">of</span> <span class="hljs-comment">UNet2DConditionModel were not initialized from the model checkpoint at</span> <span class="hljs-comment">runwayml/stable</span><span class="hljs-literal">-</span><span class="hljs-comment">diffusion</span><span class="hljs-literal">-</span><span class="hljs-comment">v1</span><span class="hljs-literal">-</span><span class="hljs-comment">5 and are newly initialized because the shapes did</span> <span class="hljs-comment">not</span> <span class="hljs-comment">match:</span>
<span class="hljs-literal">-</span> <span class="hljs-comment">conv_in</span><span class="hljs-string">.</span><span class="hljs-comment">weight:</span> <span class="hljs-comment">found</span> <span class="hljs-comment">shape</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">4</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the checkpoint and</span> <span class="hljs-comment">torch</span><span class="hljs-string">.</span><span class="hljs-comment">Size(</span><span class="hljs-title">[</span><span class="hljs-comment">320</span><span class="hljs-string">,</span> <span class="hljs-comment">9</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-string">,</span> <span class="hljs-comment">3</span><span class="hljs-title">]</span><span class="hljs-comment">) in the model instantiated</span>
<span class="hljs-comment">You</span> <span class="hljs-comment">should</span> <span class="hljs-comment">probably</span> <span class="hljs-comment">TRAIN this model on a down-stream task to be able to use it for predictions and inference</span><span class="hljs-string">.</span>`}}),{c(){i=s("p"),g=l("If you get the error message below, you need to finetune the weights for your downstream task:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"If you get the error message below, you need to finetune the weights for your downstream task:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function $r(Z){let i,g,c,p,h,t,u,E;return{c(){i=s("p"),g=l("To use private or "),c=s("a"),p=l("gated"),h=l(` models, log-in with
`),t=s("code"),u=l("huggingface-cli login"),E=l("."),this.h()},l(J){i=a(J,"P",{});var P=r(i);g=d(P,"To use private or "),c=a(P,"A",{href:!0,rel:!0});var W=r(c);p=d(W,"gated"),W.forEach(o),h=d(P,` models, log-in with
`),t=a(P,"CODE",{});var B=r(t);u=d(B,"huggingface-cli login"),B.forEach(o),E=d(P,"."),P.forEach(o),this.h()},h(){b(c,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),b(c,"rel","nofollow")},m(J,P){U(J,i,P),e(i,g),e(i,c),e(c,p),e(i,h),e(i,t),e(t,u),e(i,E)},d(J){J&&o(i)}}}function Mr(Z){let i,g,c,p,h;return p=new Ve({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMERpZmZ1c2lvblBpcGVsaW5lJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMGZyb20lMjBodWdnaW5nZmFjZS5jbyUyMGFuZCUyMGNhY2hlLiUwQXBpcGVsaW5lJTIwJTNEJTIwRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUyMkNvbXBWaXMlMkZsZG0tdGV4dDJpbS1sYXJnZS0yNTYlMjIpJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBwaXBlbGluZSUyMHRoYXQlMjByZXF1aXJlcyUyMGFuJTIwYXV0aG9yaXphdGlvbiUyMHRva2VuJTBBJTIzJTIwRm9yJTIwbW9yZSUyMGluZm9ybWF0aW9uJTIwb24lMjBhY2Nlc3MlMjB0b2tlbnMlMkMlMjBwbGVhc2UlMjByZWZlciUyMHRvJTIwdGhpcyUyMHNlY3Rpb24lMEElMjMlMjBvZiUyMHRoZSUyMGRvY3VtZW50YXRpb24lNUQoaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRvY3MlMkZodWIlMkZzZWN1cml0eS10b2tlbnMpJTBBcGlwZWxpbmUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIycnVud2F5bWwlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTUlMjIpJTBBJTBBJTIzJTIwVXNlJTIwYSUyMGRpZmZlcmVudCUyMHNjaGVkdWxlciUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBMTVNEaXNjcmV0ZVNjaGVkdWxlciUwQSUwQXNjaGVkdWxlciUyMCUzRCUyMExNU0Rpc2NyZXRlU2NoZWR1bGVyLmZyb21fY29uZmlnKHBpcGVsaW5lLnNjaGVkdWxlci5jb25maWcpJTBBcGlwZWxpbmUuc2NoZWR1bGVyJTIwJTNEJTIwc2NoZWR1bGVy",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;CompVis/ldm-text2im-large-256&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline that requires an authorization token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># For more information on access tokens, please refer to this section</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># of the documentation](https://huggingface.co/docs/hub/security-tokens)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline = DiffusionPipeline.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"># Use a different scheduler</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LMSDiscreteScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span>scheduler = LMSDiscreteScheduler.from_config(pipeline.scheduler.config)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline.scheduler = scheduler`}}),{c(){i=s("p"),g=l("Examples:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"Examples:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function xr(Z){let i,g,c,p,h;return p=new Ve({props:{code:"U29tZSUyMHdlaWdodHMlMjBvZiUyMEZsYXhVTmV0MkRDb25kaXRpb25Nb2RlbCUyMHdlcmUlMjBub3QlMjBpbml0aWFsaXplZCUyMGZyb20lMjB0aGUlMjBtb2RlbCUyMGNoZWNrcG9pbnQlMjBhdCUyMHJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIwYW5kJTIwYXJlJTIwbmV3bHklMjBpbml0aWFsaXplZCUyMGJlY2F1c2UlMjB0aGUlMjBzaGFwZXMlMjBkaWQlMjBub3QlMjBtYXRjaCUzQQ==",highlighted:'<span class="hljs-comment">Some</span> <span class="hljs-comment">weights</span> <span class="hljs-comment">of</span> <span class="hljs-comment">FlaxUNet2DConditionModel were not initialized from the model checkpoint at</span> <span class="hljs-comment">runwayml/stable</span><span class="hljs-literal">-</span><span class="hljs-comment">diffusion</span><span class="hljs-literal">-</span><span class="hljs-comment">v1</span><span class="hljs-literal">-</span><span class="hljs-comment">5 and are newly initialized because the shapes did</span> <span class="hljs-comment">not</span> <span class="hljs-comment">match:</span>'}}),{c(){i=s("p"),g=l("If you get the error message below, you need to finetune the weights for your downstream task:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"If you get the error message below, you need to finetune the weights for your downstream task:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function Tr(Z){let i,g,c,p,h,t,u,E,J,P,W;return{c(){i=s("p"),g=l("To use private or "),c=s("a"),p=l("gated models"),h=l(`, log-in with
`),t=s("code"),u=l("huggingface-cli login"),E=l(`. You can also activate the special
`),J=s("a"),P=l("\u201Coffline-mode\u201D"),W=l(` to use this method in a
firewalled environment.`),this.h()},l(B){i=a(B,"P",{});var G=r(i);g=d(G,"To use private or "),c=a(G,"A",{href:!0,rel:!0});var k=r(c);p=d(k,"gated models"),k.forEach(o),h=d(G,`, log-in with
`),t=a(G,"CODE",{});var ee=r(t);u=d(ee,"huggingface-cli login"),ee.forEach(o),E=d(G,`. You can also activate the special
`),J=a(G,"A",{href:!0,rel:!0});var S=r(J);P=d(S,"\u201Coffline-mode\u201D"),S.forEach(o),W=d(G,` to use this method in a
firewalled environment.`),G.forEach(o),this.h()},h(){b(c,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),b(c,"rel","nofollow"),b(J,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),b(J,"rel","nofollow")},m(B,G){U(B,i,G),e(i,g),e(i,c),e(c,p),e(i,h),e(i,t),e(t,u),e(i,E),e(i,J),e(J,P),e(i,W)},d(B){B&&o(i)}}}function jr(Z){let i,g,c,p,h;return p=new Ve({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhEaWZmdXNpb25QaXBlbGluZSUwQSUwQSUyMyUyMERvd25sb2FkJTIwcGlwZWxpbmUlMjBmcm9tJTIwaHVnZ2luZ2ZhY2UuY28lMjBhbmQlMjBjYWNoZS4lMEElMjMlMjBSZXF1aXJlcyUyMHRvJTIwYmUlMjBsb2dnZWQlMjBpbiUyMHRvJTIwSHVnZ2luZyUyMEZhY2UlMjBodWIlMkMlMEElMjMlMjBzZWUlMjBtb3JlJTIwaW4lMjAlNUJ0aGUlMjBkb2N1bWVudGF0aW9uJTVEKGh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkb2NzJTJGaHViJTJGc2VjdXJpdHktdG9rZW5zKSUwQXBpcGVsaW5lJTJDJTIwcGFyYW1zJTIwJTNEJTIwRmxheERpZmZ1c2lvblBpcGVsaW5lLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJydW53YXltbCUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNSUyMiUyQyUwQSUyMCUyMCUyMCUyMHJldmlzaW9uJTNEJTIyYmYxNiUyMiUyQyUwQSUyMCUyMCUyMCUyMGR0eXBlJTNEam5wLmJmbG9hdDE2JTJDJTBBKSUwQSUwQSUyMyUyMERvd25sb2FkJTIwcGlwZWxpbmUlMkMlMjBidXQlMjB1c2UlMjBhJTIwZGlmZmVyZW50JTIwc2NoZWR1bGVyJTBBZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEZsYXhEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIlMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTBBZHBtcHAlMkMlMjBkcG1wcF9zdGF0ZSUyMCUzRCUyMEZsYXhEUE1Tb2x2ZXJNdWx0aXN0ZXBTY2hlZHVsZXIuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMG1vZGVsX2lkJTJDJTBBJTIwJTIwJTIwJTIwc3ViZm9sZGVyJTNEJTIyc2NoZWR1bGVyJTIyJTJDJTBBKSUwQSUwQWRwbV9waXBlJTJDJTIwZHBtX3BhcmFtcyUyMCUzRCUyMEZsYXhTdGFibGVEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwbW9kZWxfaWQlMkMlMjByZXZpc2lvbiUzRCUyMmJmMTYlMjIlMkMlMjBkdHlwZSUzRGpucC5iZmxvYXQxNiUyQyUyMHNjaGVkdWxlciUzRGRwbXBwJTBBKSUwQWRwbV9wYXJhbXMlNUIlMjJzY2hlZHVsZXIlMjIlNUQlMjAlM0QlMjBkcG1wcF9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Requires to be logged in to Hugging Face hub,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># see more in [the documentation](https://huggingface.co/docs/hub/security-tokens)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipeline, params = FlaxDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    revision=<span class="hljs-string">&quot;bf16&quot;</span>,
<span class="hljs-meta">... </span>    dtype=jnp.bfloat16,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download pipeline, but use a different scheduler</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxDPMSolverMultistepScheduler

<span class="hljs-meta">&gt;&gt;&gt; </span>model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>dpmpp, dpmpp_state = FlaxDPMSolverMultistepScheduler.from_pretrained(
<span class="hljs-meta">... </span>    model_id,
<span class="hljs-meta">... </span>    subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>dpm_pipe, dpm_params = FlaxStableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    model_id, revision=<span class="hljs-string">&quot;bf16&quot;</span>, dtype=jnp.bfloat16, scheduler=dpmpp
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dpm_params[<span class="hljs-string">&quot;scheduler&quot;</span>] = dpmpp_state`}}),{c(){i=s("p"),g=l("Examples:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"Examples:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function Ur(Z){let i,g,c,p,h;return p=new Ve({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>)`}}),{c(){i=s("p"),g=l("Examples:"),c=f(),y(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);g=d(u,"Examples:"),u.forEach(o),c=m(t),v(p.$$.fragment,t)},m(t,u){U(t,i,u),e(i,g),U(t,c,u),w(p,t,u),h=!0},p:Fe,i(t){h||($(p.$$.fragment,t),h=!0)},o(t){M(p.$$.fragment,t),h=!1},d(t){t&&o(i),t&&o(c),x(p,t)}}}function Pr(Z){let i,g,c,p,h,t,u,E,J,P,W,B,G,k,ee,S,Uo,Po,Ht,se,Yt,oe,ae,Xo,Ce,Mn,So,xn,zt,T,Ne,Tn,Ro,jn,Un,Zo,Jo,Pn,Zn,Jn,Xe,Ho,En,Dn,Yo,kn,In,zo,Gn,Wn,Se,ie,Ao,Bn,Fn,Qo,Vn,Cn,Nn,re,qo,Xn,Sn,Lo,Rn,Hn,Yn,le,Re,zn,Oo,An,Qn,Eo,He,qn,Do,Ye,Ln,R,ze,On,Ae,Kn,Ko,es,os,ts,Qe,ns,et,ss,as,is,de,rs,pe,qe,ls,Le,ds,ot,ps,cs,fs,ce,Oe,ms,Ke,us,eo,hs,gs,bs,L,oo,_s,tt,ys,vs,fe,ws,H,to,$s,nt,Ms,xs,me,Ts,ue,js,he,no,Us,X,Ps,st,Zs,Js,at,Es,Ds,it,ks,Is,rt,Gs,Ws,Bs,ge,so,Fs,N,Vs,lt,Cs,Ns,dt,Xs,Ss,pt,Rs,Hs,ct,Ys,zs,ft,As,Qs,qs,Y,ao,Ls,io,Os,ro,Ks,ea,oa,be,ta,_e,na,V,lo,sa,mt,aa,ia,po,ra,ut,la,da,pa,ye,ca,ve,fa,we,ma,$e,co,ua,ht,ha,ga,Me,fo,ba,gt,_a,ya,xe,mo,va,uo,wa,ko,$a,Ma,At,te,Te,bt,ho,xa,_t,Ta,Qt,D,go,ja,yt,Ua,Pa,Io,Go,Za,Ja,Ea,vt,wt,Da,ka,$t,Ia,Ga,Mt,je,xt,Wa,Ba,Tt,Fa,Va,Ca,C,bo,Na,jt,Xa,Sa,Ut,Ra,Ha,Ue,Ya,Pe,za,Ze,Aa,Je,_o,Qa,Pt,qa,La,Ee,yo,Oa,vo,Ka,Wo,ei,oi,qt,ne,De,Zt,wo,ti,Jt,ni,Lt,q,$o,si,Et,ai,ii,O,Mo,ri,Dt,li,di,ke,Ot;return t=new $n({}),se=new No({props:{warning:!0,$$slots:{default:[ur]},$$scope:{ctx:Z}}}),Ce=new $n({}),Ne=new I({props:{name:"class diffusers.DiffusionPipeline",anchor:"diffusers.DiffusionPipeline",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L480"}}),Re=new I({props:{name:"__call__",anchor:"diffusers.DiffusionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),He=new I({props:{name:"device",anchor:"diffusers.DiffusionPipeline.device",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L750",returnDescription:`
<p>The torch device on which the pipeline is located.</p>
`,returnType:`
<p><code>torch.device</code></p>
`}}),Ye=new I({props:{name:"to",anchor:"diffusers.DiffusionPipeline.to",parameters:[{name:"torch_device",val:": typing.Union[str, torch.device, NoneType] = None"},{name:"torch_dtype",val:": typing.Optional[torch.dtype] = None"},{name:"silence_dtype_warnings",val:": bool = False"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L675"}}),ze=new I({props:{name:"components",anchor:"diffusers.DiffusionPipeline.components",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1658"}}),de=new Be({props:{anchor:"diffusers.DiffusionPipeline.components.example",$$slots:{default:[hr]},$$scope:{ctx:Z}}}),qe=new I({props:{name:"disable_attention_slicing",anchor:"diffusers.DiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1820"}}),Oe=new I({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.DiffusionPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1754"}}),oo=new I({props:{name:"download",anchor:"diffusers.DiffusionPipeline.download",parameters:[{name:"pretrained_model_name",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DiffusionPipeline.download.pretrained_model_name",description:`<strong>pretrained_model_name</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
A string, the <em>repository id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline
hosted on the Hub.`,name:"pretrained_model_name"},{anchor:"diffusers.DiffusionPipeline.download.custom_pipeline",description:`<strong>custom_pipeline</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>
<p>A string, the <em>repository id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained
pipeline hosted on the Hub. The repository must contain a file called <code>pipeline.py</code> that defines
the custom pipeline.</p>
</li>
<li>
<p>A string, the <em>file name</em> of a community pipeline hosted on GitHub under
<a href="https://github.com/huggingface/diffusers/tree/main/examples/community" rel="nofollow">Community</a>. Valid file
names must match the file name and not the pipeline script (<code>clip_guided_stable_diffusion</code>
instead of <code>clip_guided_stable_diffusion.py</code>). Community pipelines are always loaded from the
current <code>main</code> branch of GitHub.</p>
</li>
<li>
<p>A path to a <em>directory</em> (<code>./my_pipeline_directory/</code>) containing a custom pipeline. The directory
must contain a file called <code>pipeline.py</code> that defines the custom pipeline.</p>
</li>
</ul>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>&#x1F9EA; This is an experimental feature and may change in the future.</p>

					</div>
<p>For more information on how to load and create custom pipelines, take a look at <a href="https://huggingface.co/docs/diffusers/main/en/using-diffusers/contribute_pipeline" rel="nofollow">How to contribute a
community pipeline</a>.`,name:"custom_pipeline"},{anchor:"diffusers.DiffusionPipeline.download.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.DiffusionPipeline.download.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.DiffusionPipeline.download.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.DiffusionPipeline.download.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <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(bool,"},{anchor:"diffusers.DiffusionPipeline.download.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <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"},{anchor:"diffusers.DiffusionPipeline.download.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.DiffusionPipeline.download.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.DiffusionPipeline.download.custom_revision",description:`<strong>custom_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, or a commit id similar to
<code>revision</code> when loading a custom pipeline from the Hub. It can be a &#x1F917; Diffusers version when loading a
custom pipeline from GitHub, otherwise it defaults to <code>&quot;main&quot;</code> when loading from the Hub.`,name:"custom_revision"},{anchor:"diffusers.DiffusionPipeline.download.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.DiffusionPipeline.download.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Load weights from a specified variant 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.DiffusionPipeline.download.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 safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.DiffusionPipeline.download.use_onnx",description:`<strong>use_onnx</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
If set to <code>True</code>, ONNX weights will always be downloaded if present. If set to <code>False</code>, ONNX weights
will never be downloaded. By default <code>use_onnx</code> defaults to the <code>_is_onnx</code> class attribute which is
<code>False</code> for non-ONNX pipelines and <code>True</code> for ONNX pipelines. ONNX weights include both files ending
with <code>.onnx</code> and <code>.pb</code>.`,name:"use_onnx"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1328",returnDescription:`
<p>A path to the downloaded pipeline.</p>
`,returnType:`
<p><code>os.PathLike</code></p>
`}}),fe=new No({props:{$$slots:{default:[gr]},$$scope:{ctx:Z}}}),to=new I({props:{name:"enable_attention_slicing",anchor:"diffusers.DiffusionPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.DiffusionPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1780"}}),me=new No({props:{warning:!0,$$slots:{default:[br]},$$scope:{ctx:Z}}}),ue=new Be({props:{anchor:"diffusers.DiffusionPipeline.enable_attention_slicing.example",$$slots:{default:[_r]},$$scope:{ctx:Z}}}),no=new I({props:{name:"enable_model_cpu_offload",anchor:"diffusers.DiffusionPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:": int = 0"},{name:"device",val:": typing.Union[torch.device, str] = 'cuda'"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1228"}}),so=new I({props:{name:"enable_sequential_cpu_offload",anchor:"diffusers.DiffusionPipeline.enable_sequential_cpu_offload",parameters:[{name:"gpu_id",val:": int = 0"},{name:"device",val:": typing.Union[torch.device, str] = 'cuda'"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1294"}}),ao=new I({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.DiffusionPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.DiffusionPipeline.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.21.0/src/diffusers/pipelines/pipeline_utils.py#L1719"}}),be=new No({props:{warning:!0,$$slots:{default:[yr]},$$scope:{ctx:Z}}}),_e=new Be({props:{anchor:"diffusers.DiffusionPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[vr]},$$scope:{ctx:Z}}}),lo=new I({props:{name:"from_pretrained",anchor:"diffusers.DiffusionPipeline.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike, NoneType]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DiffusionPipeline.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>repo id</em> (for example <code>CompVis/ldm-text2im-large-256</code>) of a pretrained pipeline
hosted on the Hub.</li>
<li>A path to a <em>directory</em> (for example <code>./my_pipeline_directory/</code>) containing pipeline weights
saved using
<a href="/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.DiffusionPipeline.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 &#x201C;auto&#x201D; is passed, the
dtype is automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.DiffusionPipeline.from_pretrained.custom_pipeline",description:`<strong>custom_pipeline</strong> (<code>str</code>, <em>optional</em>) &#x2014;</p>
<div class="course-tip course-tip-orange bg-gradient-to-br dark:bg-gradient-to-r before:border-orange-500 dark:before:border-orange-800 from-orange-50 dark:from-gray-900 to-white dark:to-gray-950 border border-orange-50 text-orange-700 dark:text-gray-400">
						
<p>&#x1F9EA; This is an experimental feature and may change in the future.</p>

					</div>
<p>Can be either:</p>
<ul>
<li>A string, the <em>repo id</em> (for example <code>hf-internal-testing/diffusers-dummy-pipeline</code>) of a custom
pipeline hosted on the Hub. The repository must contain a file called pipeline.py that defines
the custom pipeline.</li>
<li>A string, the <em>file name</em> of a community pipeline hosted on GitHub under
<a href="https://github.com/huggingface/diffusers/tree/main/examples/community" rel="nofollow">Community</a>. Valid file
names must match the file name and not the pipeline script (<code>clip_guided_stable_diffusion</code>
instead of <code>clip_guided_stable_diffusion.py</code>). Community pipelines are always loaded from the
current main branch of GitHub.</li>
<li>A path to a directory (<code>./my_pipeline_directory/</code>) containing a custom pipeline. The directory
must contain a file called <code>pipeline.py</code> that defines the custom pipeline.</li>
</ul>
<p>For more information on how to load and create custom pipelines, please have a look at <a href="https://huggingface.co/docs/diffusers/using-diffusers/custom_pipeline_overview" rel="nofollow">Loading and
Adding Custom
Pipelines</a>`,name:"custom_pipeline"},{anchor:"diffusers.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <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(bool,"},{anchor:"diffusers.DiffusionPipeline.from_pretrained.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <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"},{anchor:"diffusers.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.from_pretrained.custom_revision",description:`<strong>custom_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, or a commit id similar to
<code>revision</code> when loading a custom pipeline from the Hub. It can be a &#x1F917; Diffusers version when loading a
custom pipeline from GitHub, otherwise it defaults to <code>&quot;main&quot;</code> when loading from the Hub.`,name:"custom_revision"},{anchor:"diffusers.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.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 device_map contains the value <code>&quot;disk&quot;</code>.`,name:"offload_folder"},{anchor:"diffusers.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.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 safetensors weights are downloaded if they&#x2019;re available <strong>and</strong> if the
safetensors library is installed. If set to <code>True</code>, the model is forcibly loaded from safetensors
weights. If set to <code>False</code>, safetensors weights are not loaded.`,name:"use_safetensors"},{anchor:"diffusers.DiffusionPipeline.from_pretrained.use_onnx",description:`<strong>use_onnx</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set to <code>True</code>, ONNX weights will always be downloaded if present. If set to <code>False</code>, ONNX weights
will never be downloaded. By default <code>use_onnx</code> defaults to the <code>_is_onnx</code> class attribute which is
<code>False</code> for non-ONNX pipelines and <code>True</code> for ONNX pipelines. ONNX weights include both files ending
with <code>.onnx</code> and <code>.pb</code>.`,name:"use_onnx"},{anchor:"diffusers.DiffusionPipeline.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (the pipeline components of the specific pipeline
class). The overwritten components are passed directly to the pipelines <code>__init__</code> method. See example
below for more information.`,name:"kwargs"},{anchor:"diffusers.DiffusionPipeline.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Load weights from a specified variant 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"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L765"}}),ye=new Be({props:{anchor:"diffusers.DiffusionPipeline.from_pretrained.example",$$slots:{default:[wr]},$$scope:{ctx:Z}}}),ve=new No({props:{$$slots:{default:[$r]},$$scope:{ctx:Z}}}),we=new Be({props:{anchor:"diffusers.DiffusionPipeline.from_pretrained.example-2",$$slots:{default:[Mr]},$$scope:{ctx:Z}}}),co=new I({props:{name:"maybe_free_model_hooks",anchor:"diffusers.DiffusionPipeline.maybe_free_model_hooks",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1278"}}),fo=new I({props:{name:"numpy_to_pil",anchor:"diffusers.DiffusionPipeline.numpy_to_pil",parameters:[{name:"images",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L1694"}}),mo=new I({props:{name:"save_pretrained",anchor:"diffusers.DiffusionPipeline.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"safe_serialization",val:": bool = True"},{name:"variant",val:": typing.Optional[str] = None"},{name:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.DiffusionPipeline.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to save a pipeline to. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.DiffusionPipeline.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.DiffusionPipeline.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.DiffusionPipeline.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 model 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.DiffusionPipeline.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/v0.21.0/en/api/pipelines/overview#diffusers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_utils.py#L562"}}),ho=new $n({}),go=new I({props:{name:"class diffusers.FlaxDiffusionPipeline",anchor:"diffusers.FlaxDiffusionPipeline",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_flax_utils.py#L101"}}),bo=new I({props:{name:"from_pretrained",anchor:"diffusers.FlaxDiffusionPipeline.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike, NoneType]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.FlaxDiffusionPipeline.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>repo id</em> (for example <code>runwayml/stable-diffusion-v1-5</code>) of a pretrained pipeline
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.21.0/en/api/pipelines/overview#diffusers.FlaxDiffusionPipeline.save_pretrained">save_pretrained()</a>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.FlaxDiffusionPipeline.from_pretrained.dtype",description:`<strong>dtype</strong> (<code>str</code> or <code>jnp.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>jnp.dtype</code> and load the model under this dtype. If <code>&quot;auto&quot;</code>, the dtype is
automatically derived from the model&#x2019;s weights.`,name:"dtype"},{anchor:"diffusers.FlaxDiffusionPipeline.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.FlaxDiffusionPipeline.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.FlaxDiffusionPipeline.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.FlaxDiffusionPipeline.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <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(bool,"},{anchor:"diffusers.FlaxDiffusionPipeline.from_pretrained.local_files_only",description:`<strong>local_files_only</strong> (<code>bool</code>, <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"},{anchor:"diffusers.FlaxDiffusionPipeline.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.FlaxDiffusionPipeline.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.FlaxDiffusionPipeline.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.FlaxDiffusionPipeline.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to overwrite load and saveable variables (the pipeline components) of the specific pipeline
class. The overwritten components are passed directly to the pipelines <code>__init__</code> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_flax_utils.py#L228"}}),Ue=new Be({props:{anchor:"diffusers.FlaxDiffusionPipeline.from_pretrained.example",$$slots:{default:[xr]},$$scope:{ctx:Z}}}),Pe=new No({props:{$$slots:{default:[Tr]},$$scope:{ctx:Z}}}),Ze=new Be({props:{anchor:"diffusers.FlaxDiffusionPipeline.from_pretrained.example-2",$$slots:{default:[jr]},$$scope:{ctx:Z}}}),_o=new I({props:{name:"numpy_to_pil",anchor:"diffusers.FlaxDiffusionPipeline.numpy_to_pil",parameters:[{name:"images",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_flax_utils.py#L566"}}),yo=new I({props:{name:"save_pretrained",anchor:"diffusers.FlaxDiffusionPipeline.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:"push_to_hub",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.FlaxDiffusionPipeline.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.FlaxDiffusionPipeline.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 model 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.FlaxDiffusionPipeline.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/v0.21.0/en/api/pipelines/overview#diffusers.utils.PushToHubMixin.push_to_hub">push_to_hub()</a> method.`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/pipelines/pipeline_flax_utils.py#L150"}}),wo=new $n({}),$o=new I({props:{name:"class diffusers.utils.PushToHubMixin",anchor:"diffusers.utils.PushToHubMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.21.0/src/diffusers/utils/hub_utils.py#L373"}}),Mo=new I({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"}],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 or not the repository created should be private.`,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>huggingface-cli 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/v0.21.0/src/diffusers/utils/hub_utils.py#L402"}}),ke=new Be({props:{anchor:"diffusers.utils.PushToHubMixin.push_to_hub.example",$$slots:{default:[Ur]},$$scope:{ctx:Z}}}),{c(){i=s("meta"),g=f(),c=s("h1"),p=s("a"),h=s("span"),y(t.$$.fragment),u=f(),E=s("span"),J=l("Pipelines"),P=f(),W=s("p"),B=l("Pipelines provide a simple way to run state-of-the-art diffusion models in inference by bundling all of the necessary components (multiple independently-trained models, schedulers, and processors) into a single end-to-end class. Pipelines are flexible and they can be adapted to use different scheduler or even model components."),G=f(),k=s("p"),ee=l("All pipelines are built from the base "),S=s("a"),Uo=l("DiffusionPipeline"),Po=l(" class which provides basic functionality for loading, downloading, and saving all the components."),Ht=f(),y(se.$$.fragment),Yt=f(),oe=s("h2"),ae=s("a"),Xo=s("span"),y(Ce.$$.fragment),Mn=f(),So=s("span"),xn=l("DiffusionPipeline"),zt=f(),T=s("div"),y(Ne.$$.fragment),Tn=f(),Ro=s("p"),jn=l("Base class for all pipelines."),Un=f(),Zo=s("p"),Jo=s("a"),Pn=l("DiffusionPipeline"),Zn=l(` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),Jn=f(),Xe=s("ul"),Ho=s("li"),En=l("move all PyTorch modules to the device of your choice"),Dn=f(),Yo=s("li"),kn=l("enable/disable the progress bar for the denoising iteration"),In=f(),zo=s("p"),Gn=l("Class attributes:"),Wn=f(),Se=s("ul"),ie=s("li"),Ao=s("strong"),Bn=l("config_name"),Fn=l(" ("),Qo=s("code"),Vn=l("str"),Cn=l(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),Nn=f(),re=s("li"),qo=s("strong"),Xn=l("_optional_components"),Sn=l(" ("),Lo=s("code"),Rn=l("List[str]"),Hn=l(`) \u2014 List of all optional components that don\u2019t have to be passed to the
pipeline to function (should be overridden by subclasses).`),Yn=f(),le=s("div"),y(Re.$$.fragment),zn=f(),Oo=s("p"),An=l("Call self as a function."),Qn=f(),Eo=s("div"),y(He.$$.fragment),qn=f(),Do=s("div"),y(Ye.$$.fragment),Ln=f(),R=s("div"),y(ze.$$.fragment),On=f(),Ae=s("p"),Kn=l("The "),Ko=s("code"),es=l("self.components"),os=l(` property can be useful to run different pipelines with the same weights and
configurations without reallocating additional memory.`),ts=f(),Qe=s("p"),ns=l("Returns ("),et=s("code"),ss=l("dict"),as=l(`):
A dictionary containing all the modules needed to initialize the pipeline.`),is=f(),y(de.$$.fragment),rs=f(),pe=s("div"),y(qe.$$.fragment),ls=f(),Le=s("p"),ds=l("Disable sliced attention computation. If "),ot=s("code"),ps=l("enable_attention_slicing"),cs=l(` was previously called, attention is
computed in one step.`),fs=f(),ce=s("div"),y(Oe.$$.fragment),ms=f(),Ke=s("p"),us=l("Disable memory efficient attention from "),eo=s("a"),hs=l("xFormers"),gs=l("."),bs=f(),L=s("div"),y(oo.$$.fragment),_s=f(),tt=s("p"),ys=l("Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights."),vs=f(),y(fe.$$.fragment),ws=f(),H=s("div"),y(to.$$.fragment),$s=f(),nt=s("p"),Ms=l(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),xs=f(),y(me.$$.fragment),Ts=f(),y(ue.$$.fragment),js=f(),he=s("div"),y(no.$$.fragment),Us=f(),X=s("p"),Ps=l(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),st=s("code"),Zs=l("enable_sequential_cpu_offload"),Js=l(", this method moves one whole model at a time to the GPU when its "),at=s("code"),Es=l("forward"),Ds=l(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),it=s("code"),ks=l("enable_sequential_cpu_offload"),Is=l(", but performance is much better due to the iterative execution of the "),rt=s("code"),Gs=l("unet"),Ws=l("."),Bs=f(),ge=s("div"),y(so.$$.fragment),Fs=f(),N=s("p"),Vs=l(`Offloads all models to CPU using \u{1F917} Accelerate, significantly reducing memory usage. When called, the state
dicts of all `),lt=s("code"),Cs=l("torch.nn.Module"),Ns=l(" components (except those in "),dt=s("code"),Xs=l("self._exclude_from_cpu_offload"),Ss=l(`) are saved to CPU
and then moved to `),pt=s("code"),Rs=l("torch.device('meta')"),Hs=l(" and loaded to GPU only when their specific submodule has its "),ct=s("code"),Ys=l("forward"),zs=l(`
method called. Offloading happens on a submodule basis. Memory savings are higher than with
`),ft=s("code"),As=l("enable_model_cpu_offload"),Qs=l(", but performance is lower."),qs=f(),Y=s("div"),y(ao.$$.fragment),Ls=f(),io=s("p"),Os=l("Enable memory efficient attention from "),ro=s("a"),Ks=l("xFormers"),ea=l(`. 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.`),oa=f(),y(be.$$.fragment),ta=f(),y(_e.$$.fragment),na=f(),V=s("div"),y(lo.$$.fragment),sa=f(),mt=s("p"),aa=l("Instantiate a PyTorch diffusion pipeline from pretrained pipeline weights."),ia=f(),po=s("p"),ra=l("The pipeline is set in evaluation mode ("),ut=s("code"),la=l("model.eval()"),da=l(") by default."),pa=f(),y(ye.$$.fragment),ca=f(),y(ve.$$.fragment),fa=f(),y(we.$$.fragment),ma=f(),$e=s("div"),y(co.$$.fragment),ua=f(),ht=s("p"),ha=l("TODO: Better doc string"),ga=f(),Me=s("div"),y(fo.$$.fragment),ba=f(),gt=s("p"),_a=l("Convert a NumPy image or a batch of images to a PIL image."),ya=f(),xe=s("div"),y(mo.$$.fragment),va=f(),uo=s("p"),wa=l(`Save all saveable variables of the pipeline to a directory. A pipeline variable can be saved and loaded if its
class implements both a save and loading method. The pipeline is easily reloaded using the
`),ko=s("a"),$a=l("from_pretrained()"),Ma=l(" class method."),At=f(),te=s("h2"),Te=s("a"),bt=s("span"),y(ho.$$.fragment),xa=f(),_t=s("span"),Ta=l("FlaxDiffusionPipeline"),Qt=f(),D=s("div"),y(go.$$.fragment),ja=f(),yt=s("p"),Ua=l("Base class for Flax-based pipelines."),Pa=f(),Io=s("p"),Go=s("a"),Za=l("FlaxDiffusionPipeline"),Ja=l(` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),Ea=f(),vt=s("ul"),wt=s("li"),Da=l("enable/disable the progress bar for the denoising iteration"),ka=f(),$t=s("p"),Ia=l("Class attributes:"),Ga=f(),Mt=s("ul"),je=s("li"),xt=s("strong"),Wa=l("config_name"),Ba=l(" ("),Tt=s("code"),Fa=l("str"),Va=l(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),Ca=f(),C=s("div"),y(bo.$$.fragment),Na=f(),jt=s("p"),Xa=l("Instantiate a Flax-based diffusion pipeline from pretrained pipeline weights."),Sa=f(),Ut=s("p"),Ra=l("The pipeline is set in evaluation mode (`model.eval()) by default and dropout modules are deactivated."),Ha=f(),y(Ue.$$.fragment),Ya=f(),y(Pe.$$.fragment),za=f(),y(Ze.$$.fragment),Aa=f(),Je=s("div"),y(_o.$$.fragment),Qa=f(),Pt=s("p"),qa=l("Convert a NumPy image or a batch of images to a PIL image."),La=f(),Ee=s("div"),y(yo.$$.fragment),Oa=f(),vo=s("p"),Ka=l(`Save all saveable variables of the pipeline to a directory. A pipeline variable can be saved and loaded if its
class implements both a save and loading method. The pipeline is easily reloaded using the
`),Wo=s("a"),ei=l("from_pretrained()"),oi=l(" class method."),qt=f(),ne=s("h2"),De=s("a"),Zt=s("span"),y(wo.$$.fragment),ti=f(),Jt=s("span"),ni=l("PushToHubMixin"),Lt=f(),q=s("div"),y($o.$$.fragment),si=f(),Et=s("p"),ai=l("A Mixin to push a model, scheduler, or pipeline to the Hugging Face Hub."),ii=f(),O=s("div"),y(Mo.$$.fragment),ri=f(),Dt=s("p"),li=l("Upload model, scheduler, or pipeline files to the \u{1F917} Hugging Face Hub."),di=f(),y(ke.$$.fragment),this.h()},l(n){const _=fr('[data-svelte="svelte-1phssyn"]',document.head);i=a(_,"META",{name:!0,content:!0}),_.forEach(o),g=m(n),c=a(n,"H1",{class:!0});var xo=r(c);p=a(xo,"A",{id:!0,class:!0,href:!0});var kt=r(p);h=a(kt,"SPAN",{});var It=r(h);v(t.$$.fragment,It),It.forEach(o),kt.forEach(o),u=m(xo),E=a(xo,"SPAN",{});var Gt=r(E);J=d(Gt,"Pipelines"),Gt.forEach(o),xo.forEach(o),P=m(n),W=a(n,"P",{});var Wt=r(W);B=d(Wt,"Pipelines provide a simple way to run state-of-the-art diffusion models in inference by bundling all of the necessary components (multiple independently-trained models, schedulers, and processors) into a single end-to-end class. Pipelines are flexible and they can be adapted to use different scheduler or even model components."),Wt.forEach(o),G=m(n),k=a(n,"P",{});var To=r(k);ee=d(To,"All pipelines are built from the base "),S=a(To,"A",{href:!0});var Bt=r(S);Uo=d(Bt,"DiffusionPipeline"),Bt.forEach(o),Po=d(To," class which provides basic functionality for loading, downloading, and saving all the components."),To.forEach(o),Ht=m(n),v(se.$$.fragment,n),Yt=m(n),oe=a(n,"H2",{class:!0});var jo=r(oe);ae=a(jo,"A",{id:!0,class:!0,href:!0});var Ft=r(ae);Xo=a(Ft,"SPAN",{});var Vt=r(Xo);v(Ce.$$.fragment,Vt),Vt.forEach(o),Ft.forEach(o),Mn=m(jo),So=a(jo,"SPAN",{});var Ct=r(So);xn=d(Ct,"DiffusionPipeline"),Ct.forEach(o),jo.forEach(o),zt=m(n),T=a(n,"DIV",{class:!0});var j=r(T);v(Ne.$$.fragment,j),Tn=m(j),Ro=a(j,"P",{});var Nt=r(Ro);jn=d(Nt,"Base class for all pipelines."),Nt.forEach(o),Un=m(j),Zo=a(j,"P",{});var Bo=r(Zo);Jo=a(Bo,"A",{href:!0});var ci=r(Jo);Pn=d(ci,"DiffusionPipeline"),ci.forEach(o),Zn=d(Bo,` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),Bo.forEach(o),Jn=m(j),Xe=a(j,"UL",{});var Kt=r(Xe);Ho=a(Kt,"LI",{});var fi=r(Ho);En=d(fi,"move all PyTorch modules to the device of your choice"),fi.forEach(o),Dn=m(Kt),Yo=a(Kt,"LI",{});var mi=r(Yo);kn=d(mi,"enable/disable the progress bar for the denoising iteration"),mi.forEach(o),Kt.forEach(o),In=m(j),zo=a(j,"P",{});var ui=r(zo);Gn=d(ui,"Class attributes:"),ui.forEach(o),Wn=m(j),Se=a(j,"UL",{});var en=r(Se);ie=a(en,"LI",{});var Xt=r(ie);Ao=a(Xt,"STRONG",{});var hi=r(Ao);Bn=d(hi,"config_name"),hi.forEach(o),Fn=d(Xt," ("),Qo=a(Xt,"CODE",{});var gi=r(Qo);Vn=d(gi,"str"),gi.forEach(o),Cn=d(Xt,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),Xt.forEach(o),Nn=m(en),re=a(en,"LI",{});var St=r(re);qo=a(St,"STRONG",{});var bi=r(qo);Xn=d(bi,"_optional_components"),bi.forEach(o),Sn=d(St," ("),Lo=a(St,"CODE",{});var _i=r(Lo);Rn=d(_i,"List[str]"),_i.forEach(o),Hn=d(St,`) \u2014 List of all optional components that don\u2019t have to be passed to the
pipeline to function (should be overridden by subclasses).`),St.forEach(o),en.forEach(o),Yn=m(j),le=a(j,"DIV",{class:!0});var on=r(le);v(Re.$$.fragment,on),zn=m(on),Oo=a(on,"P",{});var yi=r(Oo);An=d(yi,"Call self as a function."),yi.forEach(o),on.forEach(o),Qn=m(j),Eo=a(j,"DIV",{class:!0});var vi=r(Eo);v(He.$$.fragment,vi),vi.forEach(o),qn=m(j),Do=a(j,"DIV",{class:!0});var wi=r(Do);v(Ye.$$.fragment,wi),wi.forEach(o),Ln=m(j),R=a(j,"DIV",{class:!0});var Ie=r(R);v(ze.$$.fragment,Ie),On=m(Ie),Ae=a(Ie,"P",{});var tn=r(Ae);Kn=d(tn,"The "),Ko=a(tn,"CODE",{});var $i=r(Ko);es=d($i,"self.components"),$i.forEach(o),os=d(tn,` property can be useful to run different pipelines with the same weights and
configurations without reallocating additional memory.`),tn.forEach(o),ts=m(Ie),Qe=a(Ie,"P",{});var nn=r(Qe);ns=d(nn,"Returns ("),et=a(nn,"CODE",{});var Mi=r(et);ss=d(Mi,"dict"),Mi.forEach(o),as=d(nn,`):
A dictionary containing all the modules needed to initialize the pipeline.`),nn.forEach(o),is=m(Ie),v(de.$$.fragment,Ie),Ie.forEach(o),rs=m(j),pe=a(j,"DIV",{class:!0});var sn=r(pe);v(qe.$$.fragment,sn),ls=m(sn),Le=a(sn,"P",{});var an=r(Le);ds=d(an,"Disable sliced attention computation. If "),ot=a(an,"CODE",{});var xi=r(ot);ps=d(xi,"enable_attention_slicing"),xi.forEach(o),cs=d(an,` was previously called, attention is
computed in one step.`),an.forEach(o),sn.forEach(o),fs=m(j),ce=a(j,"DIV",{class:!0});var rn=r(ce);v(Oe.$$.fragment,rn),ms=m(rn),Ke=a(rn,"P",{});var ln=r(Ke);us=d(ln,"Disable memory efficient attention from "),eo=a(ln,"A",{href:!0,rel:!0});var Ti=r(eo);hs=d(Ti,"xFormers"),Ti.forEach(o),gs=d(ln,"."),ln.forEach(o),rn.forEach(o),bs=m(j),L=a(j,"DIV",{class:!0});var Fo=r(L);v(oo.$$.fragment,Fo),_s=m(Fo),tt=a(Fo,"P",{});var ji=r(tt);ys=d(ji,"Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights."),ji.forEach(o),vs=m(Fo),v(fe.$$.fragment,Fo),Fo.forEach(o),ws=m(j),H=a(j,"DIV",{class:!0});var Ge=r(H);v(to.$$.fragment,Ge),$s=m(Ge),nt=a(Ge,"P",{});var Ui=r(nt);Ms=d(Ui,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Ui.forEach(o),xs=m(Ge),v(me.$$.fragment,Ge),Ts=m(Ge),v(ue.$$.fragment,Ge),Ge.forEach(o),js=m(j),he=a(j,"DIV",{class:!0});var dn=r(he);v(no.$$.fragment,dn),Us=m(dn),X=a(dn,"P",{});var K=r(X);Ps=d(K,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),st=a(K,"CODE",{});var Pi=r(st);Zs=d(Pi,"enable_sequential_cpu_offload"),Pi.forEach(o),Js=d(K,", this method moves one whole model at a time to the GPU when its "),at=a(K,"CODE",{});var Zi=r(at);Es=d(Zi,"forward"),Zi.forEach(o),Ds=d(K,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),it=a(K,"CODE",{});var Ji=r(it);ks=d(Ji,"enable_sequential_cpu_offload"),Ji.forEach(o),Is=d(K,", but performance is much better due to the iterative execution of the "),rt=a(K,"CODE",{});var Ei=r(rt);Gs=d(Ei,"unet"),Ei.forEach(o),Ws=d(K,"."),K.forEach(o),dn.forEach(o),Bs=m(j),ge=a(j,"DIV",{class:!0});var pn=r(ge);v(so.$$.fragment,pn),Fs=m(pn),N=a(pn,"P",{});var z=r(N);Vs=d(z,`Offloads all models to CPU using \u{1F917} Accelerate, significantly reducing memory usage. When called, the state
dicts of all `),lt=a(z,"CODE",{});var Di=r(lt);Cs=d(Di,"torch.nn.Module"),Di.forEach(o),Ns=d(z," components (except those in "),dt=a(z,"CODE",{});var ki=r(dt);Xs=d(ki,"self._exclude_from_cpu_offload"),ki.forEach(o),Ss=d(z,`) are saved to CPU
and then moved to `),pt=a(z,"CODE",{});var Ii=r(pt);Rs=d(Ii,"torch.device('meta')"),Ii.forEach(o),Hs=d(z," and loaded to GPU only when their specific submodule has its "),ct=a(z,"CODE",{});var Gi=r(ct);Ys=d(Gi,"forward"),Gi.forEach(o),zs=d(z,`
method called. Offloading happens on a submodule basis. Memory savings are higher than with
`),ft=a(z,"CODE",{});var Wi=r(ft);As=d(Wi,"enable_model_cpu_offload"),Wi.forEach(o),Qs=d(z,", but performance is lower."),z.forEach(o),pn.forEach(o),qs=m(j),Y=a(j,"DIV",{class:!0});var We=r(Y);v(ao.$$.fragment,We),Ls=m(We),io=a(We,"P",{});var cn=r(io);Os=d(cn,"Enable memory efficient attention from "),ro=a(cn,"A",{href:!0,rel:!0});var Bi=r(ro);Ks=d(Bi,"xFormers"),Bi.forEach(o),ea=d(cn,`. 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.forEach(o),oa=m(We),v(be.$$.fragment,We),ta=m(We),v(_e.$$.fragment,We),We.forEach(o),na=m(j),V=a(j,"DIV",{class:!0});var A=r(V);v(lo.$$.fragment,A),sa=m(A),mt=a(A,"P",{});var Fi=r(mt);aa=d(Fi,"Instantiate a PyTorch diffusion pipeline from pretrained pipeline weights."),Fi.forEach(o),ia=m(A),po=a(A,"P",{});var fn=r(po);ra=d(fn,"The pipeline is set in evaluation mode ("),ut=a(fn,"CODE",{});var Vi=r(ut);la=d(Vi,"model.eval()"),Vi.forEach(o),da=d(fn,") by default."),fn.forEach(o),pa=m(A),v(ye.$$.fragment,A),ca=m(A),v(ve.$$.fragment,A),fa=m(A),v(we.$$.fragment,A),A.forEach(o),ma=m(j),$e=a(j,"DIV",{class:!0});var mn=r($e);v(co.$$.fragment,mn),ua=m(mn),ht=a(mn,"P",{});var Ci=r(ht);ha=d(Ci,"TODO: Better doc string"),Ci.forEach(o),mn.forEach(o),ga=m(j),Me=a(j,"DIV",{class:!0});var un=r(Me);v(fo.$$.fragment,un),ba=m(un),gt=a(un,"P",{});var Ni=r(gt);_a=d(Ni,"Convert a NumPy image or a batch of images to a PIL image."),Ni.forEach(o),un.forEach(o),ya=m(j),xe=a(j,"DIV",{class:!0});var hn=r(xe);v(mo.$$.fragment,hn),va=m(hn),uo=a(hn,"P",{});var gn=r(uo);wa=d(gn,`Save all saveable variables of the pipeline to a directory. A pipeline variable can be saved and loaded if its
class implements both a save and loading method. The pipeline is easily reloaded using the
`),ko=a(gn,"A",{href:!0});var Xi=r(ko);$a=d(Xi,"from_pretrained()"),Xi.forEach(o),Ma=d(gn," class method."),gn.forEach(o),hn.forEach(o),j.forEach(o),At=m(n),te=a(n,"H2",{class:!0});var bn=r(te);Te=a(bn,"A",{id:!0,class:!0,href:!0});var Si=r(Te);bt=a(Si,"SPAN",{});var Ri=r(bt);v(ho.$$.fragment,Ri),Ri.forEach(o),Si.forEach(o),xa=m(bn),_t=a(bn,"SPAN",{});var Hi=r(_t);Ta=d(Hi,"FlaxDiffusionPipeline"),Hi.forEach(o),bn.forEach(o),Qt=m(n),D=a(n,"DIV",{class:!0});var F=r(D);v(go.$$.fragment,F),ja=m(F),yt=a(F,"P",{});var Yi=r(yt);Ua=d(Yi,"Base class for Flax-based pipelines."),Yi.forEach(o),Pa=m(F),Io=a(F,"P",{});var pi=r(Io);Go=a(pi,"A",{href:!0});var zi=r(Go);Za=d(zi,"FlaxDiffusionPipeline"),zi.forEach(o),Ja=d(pi,` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),pi.forEach(o),Ea=m(F),vt=a(F,"UL",{});var Ai=r(vt);wt=a(Ai,"LI",{});var Qi=r(wt);Da=d(Qi,"enable/disable the progress bar for the denoising iteration"),Qi.forEach(o),Ai.forEach(o),ka=m(F),$t=a(F,"P",{});var qi=r($t);Ia=d(qi,"Class attributes:"),qi.forEach(o),Ga=m(F),Mt=a(F,"UL",{});var Li=r(Mt);je=a(Li,"LI",{});var Rt=r(je);xt=a(Rt,"STRONG",{});var Oi=r(xt);Wa=d(Oi,"config_name"),Oi.forEach(o),Ba=d(Rt," ("),Tt=a(Rt,"CODE",{});var Ki=r(Tt);Fa=d(Ki,"str"),Ki.forEach(o),Va=d(Rt,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),Rt.forEach(o),Li.forEach(o),Ca=m(F),C=a(F,"DIV",{class:!0});var Q=r(C);v(bo.$$.fragment,Q),Na=m(Q),jt=a(Q,"P",{});var er=r(jt);Xa=d(er,"Instantiate a Flax-based diffusion pipeline from pretrained pipeline weights."),er.forEach(o),Sa=m(Q),Ut=a(Q,"P",{});var or=r(Ut);Ra=d(or,"The pipeline is set in evaluation mode (`model.eval()) by default and dropout modules are deactivated."),or.forEach(o),Ha=m(Q),v(Ue.$$.fragment,Q),Ya=m(Q),v(Pe.$$.fragment,Q),za=m(Q),v(Ze.$$.fragment,Q),Q.forEach(o),Aa=m(F),Je=a(F,"DIV",{class:!0});var _n=r(Je);v(_o.$$.fragment,_n),Qa=m(_n),Pt=a(_n,"P",{});var tr=r(Pt);qa=d(tr,"Convert a NumPy image or a batch of images to a PIL image."),tr.forEach(o),_n.forEach(o),La=m(F),Ee=a(F,"DIV",{class:!0});var yn=r(Ee);v(yo.$$.fragment,yn),Oa=m(yn),vo=a(yn,"P",{});var vn=r(vo);Ka=d(vn,`Save all saveable variables of the pipeline to a directory. A pipeline variable can be saved and loaded if its
class implements both a save and loading method. The pipeline is easily reloaded using the
`),Wo=a(vn,"A",{href:!0});var nr=r(Wo);ei=d(nr,"from_pretrained()"),nr.forEach(o),oi=d(vn," class method."),vn.forEach(o),yn.forEach(o),F.forEach(o),qt=m(n),ne=a(n,"H2",{class:!0});var wn=r(ne);De=a(wn,"A",{id:!0,class:!0,href:!0});var sr=r(De);Zt=a(sr,"SPAN",{});var ar=r(Zt);v(wo.$$.fragment,ar),ar.forEach(o),sr.forEach(o),ti=m(wn),Jt=a(wn,"SPAN",{});var ir=r(Jt);ni=d(ir,"PushToHubMixin"),ir.forEach(o),wn.forEach(o),Lt=m(n),q=a(n,"DIV",{class:!0});var Vo=r(q);v($o.$$.fragment,Vo),si=m(Vo),Et=a(Vo,"P",{});var rr=r(Et);ai=d(rr,"A Mixin to push a model, scheduler, or pipeline to the Hugging Face Hub."),rr.forEach(o),ii=m(Vo),O=a(Vo,"DIV",{class:!0});var Co=r(O);v(Mo.$$.fragment,Co),ri=m(Co),Dt=a(Co,"P",{});var lr=r(Dt);li=d(lr,"Upload model, scheduler, or pipeline files to the \u{1F917} Hugging Face Hub."),lr.forEach(o),di=m(Co),v(ke.$$.fragment,Co),Co.forEach(o),Vo.forEach(o),this.h()},h(){b(i,"name","hf:doc:metadata"),b(i,"content",JSON.stringify(Zr)),b(p,"id","pipelines"),b(p,"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"),b(p,"href","#pipelines"),b(c,"class","relative group"),b(S,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),b(ae,"id","diffusers.DiffusionPipeline"),b(ae,"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"),b(ae,"href","#diffusers.DiffusionPipeline"),b(oe,"class","relative group"),b(Jo,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline"),b(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Do,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(eo,"href","https://facebookresearch.github.io/xformers/"),b(eo,"rel","nofollow"),b(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ro,"href","https://facebookresearch.github.io/xformers/"),b(ro,"rel","nofollow"),b(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(ko,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained"),b(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Te,"id","diffusers.FlaxDiffusionPipeline"),b(Te,"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"),b(Te,"href","#diffusers.FlaxDiffusionPipeline"),b(te,"class","relative group"),b(Go,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.FlaxDiffusionPipeline"),b(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(Wo,"href","/docs/diffusers/v0.21.0/en/api/pipelines/overview#diffusers.FlaxDiffusionPipeline.from_pretrained"),b(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(De,"id","diffusers.utils.PushToHubMixin"),b(De,"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"),b(De,"href","#diffusers.utils.PushToHubMixin"),b(ne,"class","relative group"),b(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),b(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(n,_){e(document.head,i),U(n,g,_),U(n,c,_),e(c,p),e(p,h),w(t,h,null),e(c,u),e(c,E),e(E,J),U(n,P,_),U(n,W,_),e(W,B),U(n,G,_),U(n,k,_),e(k,ee),e(k,S),e(S,Uo),e(k,Po),U(n,Ht,_),w(se,n,_),U(n,Yt,_),U(n,oe,_),e(oe,ae),e(ae,Xo),w(Ce,Xo,null),e(oe,Mn),e(oe,So),e(So,xn),U(n,zt,_),U(n,T,_),w(Ne,T,null),e(T,Tn),e(T,Ro),e(Ro,jn),e(T,Un),e(T,Zo),e(Zo,Jo),e(Jo,Pn),e(Zo,Zn),e(T,Jn),e(T,Xe),e(Xe,Ho),e(Ho,En),e(Xe,Dn),e(Xe,Yo),e(Yo,kn),e(T,In),e(T,zo),e(zo,Gn),e(T,Wn),e(T,Se),e(Se,ie),e(ie,Ao),e(Ao,Bn),e(ie,Fn),e(ie,Qo),e(Qo,Vn),e(ie,Cn),e(Se,Nn),e(Se,re),e(re,qo),e(qo,Xn),e(re,Sn),e(re,Lo),e(Lo,Rn),e(re,Hn),e(T,Yn),e(T,le),w(Re,le,null),e(le,zn),e(le,Oo),e(Oo,An),e(T,Qn),e(T,Eo),w(He,Eo,null),e(T,qn),e(T,Do),w(Ye,Do,null),e(T,Ln),e(T,R),w(ze,R,null),e(R,On),e(R,Ae),e(Ae,Kn),e(Ae,Ko),e(Ko,es),e(Ae,os),e(R,ts),e(R,Qe),e(Qe,ns),e(Qe,et),e(et,ss),e(Qe,as),e(R,is),w(de,R,null),e(T,rs),e(T,pe),w(qe,pe,null),e(pe,ls),e(pe,Le),e(Le,ds),e(Le,ot),e(ot,ps),e(Le,cs),e(T,fs),e(T,ce),w(Oe,ce,null),e(ce,ms),e(ce,Ke),e(Ke,us),e(Ke,eo),e(eo,hs),e(Ke,gs),e(T,bs),e(T,L),w(oo,L,null),e(L,_s),e(L,tt),e(tt,ys),e(L,vs),w(fe,L,null),e(T,ws),e(T,H),w(to,H,null),e(H,$s),e(H,nt),e(nt,Ms),e(H,xs),w(me,H,null),e(H,Ts),w(ue,H,null),e(T,js),e(T,he),w(no,he,null),e(he,Us),e(he,X),e(X,Ps),e(X,st),e(st,Zs),e(X,Js),e(X,at),e(at,Es),e(X,Ds),e(X,it),e(it,ks),e(X,Is),e(X,rt),e(rt,Gs),e(X,Ws),e(T,Bs),e(T,ge),w(so,ge,null),e(ge,Fs),e(ge,N),e(N,Vs),e(N,lt),e(lt,Cs),e(N,Ns),e(N,dt),e(dt,Xs),e(N,Ss),e(N,pt),e(pt,Rs),e(N,Hs),e(N,ct),e(ct,Ys),e(N,zs),e(N,ft),e(ft,As),e(N,Qs),e(T,qs),e(T,Y),w(ao,Y,null),e(Y,Ls),e(Y,io),e(io,Os),e(io,ro),e(ro,Ks),e(io,ea),e(Y,oa),w(be,Y,null),e(Y,ta),w(_e,Y,null),e(T,na),e(T,V),w(lo,V,null),e(V,sa),e(V,mt),e(mt,aa),e(V,ia),e(V,po),e(po,ra),e(po,ut),e(ut,la),e(po,da),e(V,pa),w(ye,V,null),e(V,ca),w(ve,V,null),e(V,fa),w(we,V,null),e(T,ma),e(T,$e),w(co,$e,null),e($e,ua),e($e,ht),e(ht,ha),e(T,ga),e(T,Me),w(fo,Me,null),e(Me,ba),e(Me,gt),e(gt,_a),e(T,ya),e(T,xe),w(mo,xe,null),e(xe,va),e(xe,uo),e(uo,wa),e(uo,ko),e(ko,$a),e(uo,Ma),U(n,At,_),U(n,te,_),e(te,Te),e(Te,bt),w(ho,bt,null),e(te,xa),e(te,_t),e(_t,Ta),U(n,Qt,_),U(n,D,_),w(go,D,null),e(D,ja),e(D,yt),e(yt,Ua),e(D,Pa),e(D,Io),e(Io,Go),e(Go,Za),e(Io,Ja),e(D,Ea),e(D,vt),e(vt,wt),e(wt,Da),e(D,ka),e(D,$t),e($t,Ia),e(D,Ga),e(D,Mt),e(Mt,je),e(je,xt),e(xt,Wa),e(je,Ba),e(je,Tt),e(Tt,Fa),e(je,Va),e(D,Ca),e(D,C),w(bo,C,null),e(C,Na),e(C,jt),e(jt,Xa),e(C,Sa),e(C,Ut),e(Ut,Ra),e(C,Ha),w(Ue,C,null),e(C,Ya),w(Pe,C,null),e(C,za),w(Ze,C,null),e(D,Aa),e(D,Je),w(_o,Je,null),e(Je,Qa),e(Je,Pt),e(Pt,qa),e(D,La),e(D,Ee),w(yo,Ee,null),e(Ee,Oa),e(Ee,vo),e(vo,Ka),e(vo,Wo),e(Wo,ei),e(vo,oi),U(n,qt,_),U(n,ne,_),e(ne,De),e(De,Zt),w(wo,Zt,null),e(ne,ti),e(ne,Jt),e(Jt,ni),U(n,Lt,_),U(n,q,_),w($o,q,null),e(q,si),e(q,Et),e(Et,ai),e(q,ii),e(q,O),w(Mo,O,null),e(O,ri),e(O,Dt),e(Dt,li),e(O,di),w(ke,O,null),Ot=!0},p(n,[_]){const xo={};_&2&&(xo.$$scope={dirty:_,ctx:n}),se.$set(xo);const kt={};_&2&&(kt.$$scope={dirty:_,ctx:n}),de.$set(kt);const It={};_&2&&(It.$$scope={dirty:_,ctx:n}),fe.$set(It);const Gt={};_&2&&(Gt.$$scope={dirty:_,ctx:n}),me.$set(Gt);const Wt={};_&2&&(Wt.$$scope={dirty:_,ctx:n}),ue.$set(Wt);const To={};_&2&&(To.$$scope={dirty:_,ctx:n}),be.$set(To);const Bt={};_&2&&(Bt.$$scope={dirty:_,ctx:n}),_e.$set(Bt);const jo={};_&2&&(jo.$$scope={dirty:_,ctx:n}),ye.$set(jo);const Ft={};_&2&&(Ft.$$scope={dirty:_,ctx:n}),ve.$set(Ft);const Vt={};_&2&&(Vt.$$scope={dirty:_,ctx:n}),we.$set(Vt);const Ct={};_&2&&(Ct.$$scope={dirty:_,ctx:n}),Ue.$set(Ct);const j={};_&2&&(j.$$scope={dirty:_,ctx:n}),Pe.$set(j);const Nt={};_&2&&(Nt.$$scope={dirty:_,ctx:n}),Ze.$set(Nt);const Bo={};_&2&&(Bo.$$scope={dirty:_,ctx:n}),ke.$set(Bo)},i(n){Ot||($(t.$$.fragment,n),$(se.$$.fragment,n),$(Ce.$$.fragment,n),$(Ne.$$.fragment,n),$(Re.$$.fragment,n),$(He.$$.fragment,n),$(Ye.$$.fragment,n),$(ze.$$.fragment,n),$(de.$$.fragment,n),$(qe.$$.fragment,n),$(Oe.$$.fragment,n),$(oo.$$.fragment,n),$(fe.$$.fragment,n),$(to.$$.fragment,n),$(me.$$.fragment,n),$(ue.$$.fragment,n),$(no.$$.fragment,n),$(so.$$.fragment,n),$(ao.$$.fragment,n),$(be.$$.fragment,n),$(_e.$$.fragment,n),$(lo.$$.fragment,n),$(ye.$$.fragment,n),$(ve.$$.fragment,n),$(we.$$.fragment,n),$(co.$$.fragment,n),$(fo.$$.fragment,n),$(mo.$$.fragment,n),$(ho.$$.fragment,n),$(go.$$.fragment,n),$(bo.$$.fragment,n),$(Ue.$$.fragment,n),$(Pe.$$.fragment,n),$(Ze.$$.fragment,n),$(_o.$$.fragment,n),$(yo.$$.fragment,n),$(wo.$$.fragment,n),$($o.$$.fragment,n),$(Mo.$$.fragment,n),$(ke.$$.fragment,n),Ot=!0)},o(n){M(t.$$.fragment,n),M(se.$$.fragment,n),M(Ce.$$.fragment,n),M(Ne.$$.fragment,n),M(Re.$$.fragment,n),M(He.$$.fragment,n),M(Ye.$$.fragment,n),M(ze.$$.fragment,n),M(de.$$.fragment,n),M(qe.$$.fragment,n),M(Oe.$$.fragment,n),M(oo.$$.fragment,n),M(fe.$$.fragment,n),M(to.$$.fragment,n),M(me.$$.fragment,n),M(ue.$$.fragment,n),M(no.$$.fragment,n),M(so.$$.fragment,n),M(ao.$$.fragment,n),M(be.$$.fragment,n),M(_e.$$.fragment,n),M(lo.$$.fragment,n),M(ye.$$.fragment,n),M(ve.$$.fragment,n),M(we.$$.fragment,n),M(co.$$.fragment,n),M(fo.$$.fragment,n),M(mo.$$.fragment,n),M(ho.$$.fragment,n),M(go.$$.fragment,n),M(bo.$$.fragment,n),M(Ue.$$.fragment,n),M(Pe.$$.fragment,n),M(Ze.$$.fragment,n),M(_o.$$.fragment,n),M(yo.$$.fragment,n),M(wo.$$.fragment,n),M($o.$$.fragment,n),M(Mo.$$.fragment,n),M(ke.$$.fragment,n),Ot=!1},d(n){o(i),n&&o(g),n&&o(c),x(t),n&&o(P),n&&o(W),n&&o(G),n&&o(k),n&&o(Ht),x(se,n),n&&o(Yt),n&&o(oe),x(Ce),n&&o(zt),n&&o(T),x(Ne),x(Re),x(He),x(Ye),x(ze),x(de),x(qe),x(Oe),x(oo),x(fe),x(to),x(me),x(ue),x(no),x(so),x(ao),x(be),x(_e),x(lo),x(ye),x(ve),x(we),x(co),x(fo),x(mo),n&&o(At),n&&o(te),x(ho),n&&o(Qt),n&&o(D),x(go),x(bo),x(Ue),x(Pe),x(Ze),x(_o),x(yo),n&&o(qt),n&&o(ne),x(wo),n&&o(Lt),n&&o(q),x($o),x(Mo),x(ke)}}}const Zr={local:"pipelines",sections:[{local:"diffusers.DiffusionPipeline",title:"DiffusionPipeline"},{local:"diffusers.FlaxDiffusionPipeline",title:"FlaxDiffusionPipeline"},{local:"diffusers.utils.PushToHubMixin",title:"PushToHubMixin"}],title:"Pipelines"};function Jr(Z){return mr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Br extends dr{constructor(i){super();pr(this,i,Jr,Pr,cr,{})}}export{Br as default,Zr as metadata};
