import{S as Na,i as Va,s as Ca,e as s,k as f,w,t as l,M as Xa,c as a,d as o,m,a as r,x as $,h as d,b as h,G as e,g as P,y as x,q as M,o as j,B as T,v as Sa,L as yo}from"../../../chunks/vendor-hf-doc-builder.js";import{T as ct}from"../../../chunks/Tip-hf-doc-builder.js";import{D as F}from"../../../chunks/Docstring-hf-doc-builder.js";import{C as vo}from"../../../chunks/CodeBlock-hf-doc-builder.js";import{I as Os}from"../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as _o}from"../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ra(E){let i,b,c,p,g,t,u,k,Z,U,I,W;return{c(){i=s("p"),b=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__()"),g=l(" method with a "),t=s("a"),u=s("code"),k=l("torch.no_grad"),Z=l(" decorator because pipelines should not be used for training. If you\u2019re interested in training, please take a look at the "),U=s("a"),I=l("Training"),W=l(" guides instead!"),this.h()},l(G){i=a(G,"P",{});var J=r(i);b=d(J,"Pipelines do not offer any training functionality. You\u2019ll notice PyTorch\u2019s autograd is disabled by decorating the "),c=a(J,"CODE",{});var A=r(c);p=d(A,"__call__()"),A.forEach(o),g=d(J," method with a "),t=a(J,"A",{href:!0,rel:!0});var C=r(t);u=a(C,"CODE",{});var ao=r(u);k=d(ao,"torch.no_grad"),ao.forEach(o),C.forEach(o),Z=d(J," decorator because pipelines should not be used for training. If you\u2019re interested in training, please take a look at the "),U=a(J,"A",{href:!0});var io=r(U);I=d(io,"Training"),io.forEach(o),W=d(J," guides instead!"),J.forEach(o),this.h()},h(){h(t,"href","https://pytorch.org/docs/stable/generated/torch.no_grad.html"),h(t,"rel","nofollow"),h(U,"href","../traininig/overview")},m(G,J){P(G,i,J),e(i,b),e(i,c),e(c,p),e(i,g),e(i,t),e(t,u),e(u,k),e(i,Z),e(i,U),e(U,I),e(i,W)},d(G){G&&o(i)}}}function Ya(E){let i,b,c,p,g;return p=new vo({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"),b=l("Examples:"),c=f(),w(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);b=d(u,"Examples:"),u.forEach(o),c=m(t),$(p.$$.fragment,t)},m(t,u){P(t,i,u),e(i,b),P(t,c,u),x(p,t,u),g=!0},p:yo,i(t){g||(M(p.$$.fragment,t),g=!0)},o(t){j(p.$$.fragment,t),g=!1},d(t){t&&o(i),t&&o(c),T(p,t)}}}function za(E){let i,b,c,p,g,t,u,k;return{c(){i=s("p"),b=l("To use private or "),c=s("a"),p=l("gated models"),g=l(`, log-in with
`),t=s("code"),u=l("huggingface-cli login"),k=l("."),this.h()},l(Z){i=a(Z,"P",{});var U=r(i);b=d(U,"To use private or "),c=a(U,"A",{href:!0,rel:!0});var I=r(c);p=d(I,"gated models"),I.forEach(o),g=d(U,`, log-in with
`),t=a(U,"CODE",{});var W=r(t);u=d(W,"huggingface-cli login"),W.forEach(o),k=d(U,"."),U.forEach(o),this.h()},h(){h(c,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),h(c,"rel","nofollow")},m(Z,U){P(Z,i,U),e(i,b),e(i,c),e(c,p),e(i,g),e(i,t),e(t,u),e(i,k)},d(Z){Z&&o(i)}}}function Aa(E){let i,b;return{c(){i=s("p"),b=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);b=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){P(c,i,p),e(i,b)},d(c){c&&o(i)}}}function Ha(E){let i,b,c,p,g;return p=new vo({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"),b=l("Examples:"),c=f(),w(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);b=d(u,"Examples:"),u.forEach(o),c=m(t),$(p.$$.fragment,t)},m(t,u){P(t,i,u),e(i,b),P(t,c,u),x(p,t,u),g=!0},p:yo,i(t){g||(M(p.$$.fragment,t),g=!0)},o(t){j(p.$$.fragment,t),g=!1},d(t){t&&o(i),t&&o(c),T(p,t)}}}function Qa(E){let i,b,c,p,g;return p=new vo({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"),b=l("If you get the error message below, you need to finetune the weights for your downstream task:"),c=f(),w(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);b=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),$(p.$$.fragment,t)},m(t,u){P(t,i,u),e(i,b),P(t,c,u),x(p,t,u),g=!0},p:yo,i(t){g||(M(p.$$.fragment,t),g=!0)},o(t){j(p.$$.fragment,t),g=!1},d(t){t&&o(i),t&&o(c),T(p,t)}}}function La(E){let i,b,c,p,g,t,u,k;return{c(){i=s("p"),b=l("To use private or "),c=s("a"),p=l("gated"),g=l(` models, log-in with
`),t=s("code"),u=l("huggingface-cli login"),k=l("."),this.h()},l(Z){i=a(Z,"P",{});var U=r(i);b=d(U,"To use private or "),c=a(U,"A",{href:!0,rel:!0});var I=r(c);p=d(I,"gated"),I.forEach(o),g=d(U,` models, log-in with
`),t=a(U,"CODE",{});var W=r(t);u=d(W,"huggingface-cli login"),W.forEach(o),k=d(U,"."),U.forEach(o),this.h()},h(){h(c,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),h(c,"rel","nofollow")},m(Z,U){P(Z,i,U),e(i,b),e(i,c),e(c,p),e(i,g),e(i,t),e(t,u),e(i,k)},d(Z){Z&&o(i)}}}function qa(E){let i,b,c,p,g;return p=new vo({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"),b=l("Examples:"),c=f(),w(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);b=d(u,"Examples:"),u.forEach(o),c=m(t),$(p.$$.fragment,t)},m(t,u){P(t,i,u),e(i,b),P(t,c,u),x(p,t,u),g=!0},p:yo,i(t){g||(M(p.$$.fragment,t),g=!0)},o(t){j(p.$$.fragment,t),g=!1},d(t){t&&o(i),t&&o(c),T(p,t)}}}function Oa(E){let i,b,c,p,g;return p=new vo({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"),b=l("If you get the error message below, you need to finetune the weights for your downstream task:"),c=f(),w(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);b=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),$(p.$$.fragment,t)},m(t,u){P(t,i,u),e(i,b),P(t,c,u),x(p,t,u),g=!0},p:yo,i(t){g||(M(p.$$.fragment,t),g=!0)},o(t){j(p.$$.fragment,t),g=!1},d(t){t&&o(i),t&&o(c),T(p,t)}}}function Ka(E){let i,b,c,p,g,t,u,k,Z,U,I;return{c(){i=s("p"),b=l("To use private or "),c=s("a"),p=l("gated models"),g=l(`, log-in with
`),t=s("code"),u=l("huggingface-cli login"),k=l(`. You can also activate the special
`),Z=s("a"),U=l("\u201Coffline-mode\u201D"),I=l(` to use this method in a
firewalled environment.`),this.h()},l(W){i=a(W,"P",{});var G=r(i);b=d(G,"To use private or "),c=a(G,"A",{href:!0,rel:!0});var J=r(c);p=d(J,"gated models"),J.forEach(o),g=d(G,`, log-in with
`),t=a(G,"CODE",{});var A=r(t);u=d(A,"huggingface-cli login"),A.forEach(o),k=d(G,`. You can also activate the special
`),Z=a(G,"A",{href:!0,rel:!0});var C=r(Z);U=d(C,"\u201Coffline-mode\u201D"),C.forEach(o),I=d(G,` to use this method in a
firewalled environment.`),G.forEach(o),this.h()},h(){h(c,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),h(c,"rel","nofollow"),h(Z,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),h(Z,"rel","nofollow")},m(W,G){P(W,i,G),e(i,b),e(i,c),e(c,p),e(i,g),e(i,t),e(t,u),e(i,k),e(i,Z),e(Z,U),e(i,I)},d(W){W&&o(i)}}}function ei(E){let i,b,c,p,g;return p=new vo({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"),b=l("Examples:"),c=f(),w(p.$$.fragment)},l(t){i=a(t,"P",{});var u=r(i);b=d(u,"Examples:"),u.forEach(o),c=m(t),$(p.$$.fragment,t)},m(t,u){P(t,i,u),e(i,b),P(t,c,u),x(p,t,u),g=!0},p:yo,i(t){g||(M(p.$$.fragment,t),g=!0)},o(t){j(p.$$.fragment,t),g=!1},d(t){t&&o(i),t&&o(c),T(p,t)}}}function oi(E){let i,b,c,p,g,t,u,k,Z,U,I,W,G,J,A,C,ao,io,ft,q,mt,H,O,wo,Me,Ft,$o,Nt,ut,_,je,Vt,xo,Ct,Xt,ro,lo,St,Rt,Yt,Te,Mo,zt,At,jo,Ht,Qt,To,Lt,qt,Ue,K,Uo,Ot,Kt,Po,en,on,tn,ee,Zo,nn,sn,Eo,an,rn,ln,oe,Pe,dn,Do,pn,cn,po,Ze,fn,co,Ee,mn,X,De,un,Je,hn,Jo,gn,bn,_n,ke,yn,ko,vn,wn,$n,te,xn,ne,Ge,Mn,Ie,jn,Go,Tn,Un,Pn,se,We,Zn,Be,En,Fe,Dn,Jn,kn,z,Ne,Gn,Io,In,Wn,ae,Bn,ie,Ve,Fn,Wo,Nn,Vn,re,Ce,Cn,Q,Xn,Bo,Sn,Rn,Fo,Yn,zn,An,S,Xe,Hn,Se,Qn,Re,Ln,qn,On,le,Kn,de,es,N,Ye,os,No,ts,ns,ze,ss,Vo,as,is,rs,pe,ls,ce,ds,fe,ps,me,Ae,cs,Co,fs,ms,ue,He,us,Qe,hs,fo,gs,bs,ht,L,he,Xo,Le,_s,So,ys,gt,D,qe,vs,Ro,ws,$s,mo,uo,xs,Ms,js,Yo,zo,Ts,Us,Ao,Ps,Zs,Ho,ge,Qo,Es,Ds,Lo,Js,ks,Gs,V,Oe,Is,qo,Ws,Bs,Oo,Fs,Ns,be,Vs,_e,Cs,ye,Xs,ve,Ke,Ss,Ko,Rs,Ys,we,eo,zs,oo,As,ho,Hs,Qs,bt;return t=new Os({}),q=new ct({props:{warning:!0,$$slots:{default:[Ra]},$$scope:{ctx:E}}}),Me=new Os({}),je=new F({props:{name:"class diffusers.DiffusionPipeline",anchor:"diffusers.DiffusionPipeline",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_utils.py#L476"}}),Pe=new F({props:{name:"__call__",anchor:"diffusers.DiffusionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),Ze=new F({props:{name:"device",anchor:"diffusers.DiffusionPipeline.device",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_utils.py#L720",returnDescription:`
<p>The torch device on which the pipeline is located.</p>
`,returnType:`
<p><code>torch.device</code></p>
`}}),Ee=new F({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.19.2/src/diffusers/pipelines/pipeline_utils.py#L645"}}),De=new F({props:{name:"components",anchor:"diffusers.DiffusionPipeline.components",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_utils.py#L1547"}}),te=new _o({props:{anchor:"diffusers.DiffusionPipeline.components.example",$$slots:{default:[Ya]},$$scope:{ctx:E}}}),Ge=new F({props:{name:"disable_attention_slicing",anchor:"diffusers.DiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_utils.py#L1684"}}),We=new F({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.DiffusionPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_utils.py#L1643"}}),Ne=new F({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.19.2/src/diffusers/pipelines/pipeline_utils.py#L1212",returnDescription:`
<p>A path to the downloaded pipeline.</p>
`,returnType:`
<p><code>os.PathLike</code></p>
`}}),ae=new ct({props:{$$slots:{default:[za]},$$scope:{ctx:E}}}),Ve=new F({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.19.2/src/diffusers/pipelines/pipeline_utils.py#L1669"}}),Ce=new F({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.19.2/src/diffusers/pipelines/pipeline_utils.py#L1178"}}),Xe=new F({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.19.2/src/diffusers/pipelines/pipeline_utils.py#L1608"}}),le=new ct({props:{warning:!0,$$slots:{default:[Aa]},$$scope:{ctx:E}}}),de=new _o({props:{anchor:"diffusers.DiffusionPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Ha]},$$scope:{ctx:E}}}),Ye=new F({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.19.2/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.19.2/src/diffusers/pipelines/pipeline_utils.py#L735"}}),pe=new _o({props:{anchor:"diffusers.DiffusionPipeline.from_pretrained.example",$$slots:{default:[Qa]},$$scope:{ctx:E}}}),ce=new ct({props:{$$slots:{default:[La]},$$scope:{ctx:E}}}),fe=new _o({props:{anchor:"diffusers.DiffusionPipeline.from_pretrained.example-2",$$slots:{default:[qa]},$$scope:{ctx:E}}}),Ae=new F({props:{name:"numpy_to_pil",anchor:"diffusers.DiffusionPipeline.numpy_to_pil",parameters:[{name:"images",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_utils.py#L1583"}}),He=new F({props:{name:"save_pretrained",anchor:"diffusers.DiffusionPipeline.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"safe_serialization",val:": bool = False"},{name:"variant",val:": typing.Optional[str] = None"}],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>False</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way with <code>pickle</code>.`,name:"safe_serialization"},{anchor:"diffusers.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"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_utils.py#L557"}}),Le=new Os({}),qe=new F({props:{name:"class diffusers.FlaxDiffusionPipeline",anchor:"diffusers.FlaxDiffusionPipeline",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_flax_utils.py#L93"}}),Oe=new F({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.19.2/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.19.2/src/diffusers/pipelines/pipeline_flax_utils.py#L191"}}),be=new _o({props:{anchor:"diffusers.FlaxDiffusionPipeline.from_pretrained.example",$$slots:{default:[Oa]},$$scope:{ctx:E}}}),_e=new ct({props:{$$slots:{default:[Ka]},$$scope:{ctx:E}}}),ye=new _o({props:{anchor:"diffusers.FlaxDiffusionPipeline.from_pretrained.example-2",$$slots:{default:[ei]},$$scope:{ctx:E}}}),Ke=new F({props:{name:"numpy_to_pil",anchor:"diffusers.FlaxDiffusionPipeline.numpy_to_pil",parameters:[{name:"images",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_flax_utils.py#L529"}}),eo=new F({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]"}],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"}],source:"https://github.com/huggingface/diffusers/blob/v0.19.2/src/diffusers/pipelines/pipeline_flax_utils.py#L142"}}),{c(){i=s("meta"),b=f(),c=s("h1"),p=s("a"),g=s("span"),w(t.$$.fragment),u=f(),k=s("span"),Z=l("Pipelines"),U=f(),I=s("p"),W=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(),J=s("p"),A=l("All pipelines are built from the base "),C=s("a"),ao=l("DiffusionPipeline"),io=l(" class which provides basic functionality for loading, downloading, and saving all the components."),ft=f(),w(q.$$.fragment),mt=f(),H=s("h2"),O=s("a"),wo=s("span"),w(Me.$$.fragment),Ft=f(),$o=s("span"),Nt=l("DiffusionPipeline"),ut=f(),_=s("div"),w(je.$$.fragment),Vt=f(),xo=s("p"),Ct=l("Base class for all pipelines."),Xt=f(),ro=s("p"),lo=s("a"),St=l("DiffusionPipeline"),Rt=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:`),Yt=f(),Te=s("ul"),Mo=s("li"),zt=l("move all PyTorch modules to the device of your choice"),At=f(),jo=s("li"),Ht=l("enable/disable the progress bar for the denoising iteration"),Qt=f(),To=s("p"),Lt=l("Class attributes:"),qt=f(),Ue=s("ul"),K=s("li"),Uo=s("strong"),Ot=l("config_name"),Kt=l(" ("),Po=s("code"),en=l("str"),on=l(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),tn=f(),ee=s("li"),Zo=s("strong"),nn=l("_optional_components"),sn=l(" ("),Eo=s("code"),an=l("List[str]"),rn=l(`) \u2014 List of all optional components that don\u2019t have to be passed to the
pipeline to function (should be overridden by subclasses).`),ln=f(),oe=s("div"),w(Pe.$$.fragment),dn=f(),Do=s("p"),pn=l("Call self as a function."),cn=f(),po=s("div"),w(Ze.$$.fragment),fn=f(),co=s("div"),w(Ee.$$.fragment),mn=f(),X=s("div"),w(De.$$.fragment),un=f(),Je=s("p"),hn=l("The "),Jo=s("code"),gn=l("self.components"),bn=l(` property can be useful to run different pipelines with the same weights and
configurations without reallocating additional memory.`),_n=f(),ke=s("p"),yn=l("Returns ("),ko=s("code"),vn=l("dict"),wn=l(`):
A dictionary containing all the modules needed to initialize the pipeline.`),$n=f(),w(te.$$.fragment),xn=f(),ne=s("div"),w(Ge.$$.fragment),Mn=f(),Ie=s("p"),jn=l("Disable sliced attention computation. If "),Go=s("code"),Tn=l("enable_attention_slicing"),Un=l(` was previously called, attention is
computed in one step.`),Pn=f(),se=s("div"),w(We.$$.fragment),Zn=f(),Be=s("p"),En=l("Disable memory efficient attention from "),Fe=s("a"),Dn=l("xFormers"),Jn=l("."),kn=f(),z=s("div"),w(Ne.$$.fragment),Gn=f(),Io=s("p"),In=l("Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights."),Wn=f(),w(ae.$$.fragment),Bn=f(),ie=s("div"),w(Ve.$$.fragment),Fn=f(),Wo=s("p"),Nn=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. This is useful to save some memory in exchange for a small
speed decrease.`),Vn=f(),re=s("div"),w(Ce.$$.fragment),Cn=f(),Q=s("p"),Xn=l(`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Bo=s("code"),Sn=l("torch.device('meta') and loaded to GPU only when their specific submodule has its "),Rn=l("forward"),Fo=s("code"),Yn=l("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),zn=l("enable_model_cpu_offload`, but performance is lower."),An=f(),S=s("div"),w(Xe.$$.fragment),Hn=f(),Se=s("p"),Qn=l("Enable memory efficient attention from "),Re=s("a"),Ln=l("xFormers"),qn=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.`),On=f(),w(le.$$.fragment),Kn=f(),w(de.$$.fragment),es=f(),N=s("div"),w(Ye.$$.fragment),os=f(),No=s("p"),ts=l("Instantiate a PyTorch diffusion pipeline from pretrained pipeline weights."),ns=f(),ze=s("p"),ss=l("The pipeline is set in evaluation mode ("),Vo=s("code"),as=l("model.eval()"),is=l(") by default."),rs=f(),w(pe.$$.fragment),ls=f(),w(ce.$$.fragment),ds=f(),w(fe.$$.fragment),ps=f(),me=s("div"),w(Ae.$$.fragment),cs=f(),Co=s("p"),fs=l("Convert a NumPy image or a batch of images to a PIL image."),ms=f(),ue=s("div"),w(He.$$.fragment),us=f(),Qe=s("p"),hs=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
`),fo=s("a"),gs=l("from_pretrained()"),bs=l(" class method."),ht=f(),L=s("h2"),he=s("a"),Xo=s("span"),w(Le.$$.fragment),_s=f(),So=s("span"),ys=l("FlaxDiffusionPipeline"),gt=f(),D=s("div"),w(qe.$$.fragment),vs=f(),Ro=s("p"),ws=l("Base class for Flax-based pipelines."),$s=f(),mo=s("p"),uo=s("a"),xs=l("FlaxDiffusionPipeline"),Ms=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:`),js=f(),Yo=s("ul"),zo=s("li"),Ts=l("enable/disable the progress bar for the denoising iteration"),Us=f(),Ao=s("p"),Ps=l("Class attributes:"),Zs=f(),Ho=s("ul"),ge=s("li"),Qo=s("strong"),Es=l("config_name"),Ds=l(" ("),Lo=s("code"),Js=l("str"),ks=l(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),Gs=f(),V=s("div"),w(Oe.$$.fragment),Is=f(),qo=s("p"),Ws=l("Instantiate a Flax-based diffusion pipeline from pretrained pipeline weights."),Bs=f(),Oo=s("p"),Fs=l("The pipeline is set in evaluation mode (`model.eval()) by default and dropout modules are deactivated."),Ns=f(),w(be.$$.fragment),Vs=f(),w(_e.$$.fragment),Cs=f(),w(ye.$$.fragment),Xs=f(),ve=s("div"),w(Ke.$$.fragment),Ss=f(),Ko=s("p"),Rs=l("Convert a NumPy image or a batch of images to a PIL image."),Ys=f(),we=s("div"),w(eo.$$.fragment),zs=f(),oo=s("p"),As=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
`),ho=s("a"),Hs=l("from_pretrained()"),Qs=l(" class method."),this.h()},l(n){const y=Xa('[data-svelte="svelte-1phssyn"]',document.head);i=a(y,"META",{name:!0,content:!0}),y.forEach(o),b=m(n),c=a(n,"H1",{class:!0});var to=r(c);p=a(to,"A",{id:!0,class:!0,href:!0});var et=r(p);g=a(et,"SPAN",{});var ot=r(g);$(t.$$.fragment,ot),ot.forEach(o),et.forEach(o),u=m(to),k=a(to,"SPAN",{});var tt=r(k);Z=d(tt,"Pipelines"),tt.forEach(o),to.forEach(o),U=m(n),I=a(n,"P",{});var nt=r(I);W=d(nt,"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."),nt.forEach(o),G=m(n),J=a(n,"P",{});var no=r(J);A=d(no,"All pipelines are built from the base "),C=a(no,"A",{href:!0});var st=r(C);ao=d(st,"DiffusionPipeline"),st.forEach(o),io=d(no," class which provides basic functionality for loading, downloading, and saving all the components."),no.forEach(o),ft=m(n),$(q.$$.fragment,n),mt=m(n),H=a(n,"H2",{class:!0});var so=r(H);O=a(so,"A",{id:!0,class:!0,href:!0});var at=r(O);wo=a(at,"SPAN",{});var it=r(wo);$(Me.$$.fragment,it),it.forEach(o),at.forEach(o),Ft=m(so),$o=a(so,"SPAN",{});var rt=r($o);Nt=d(rt,"DiffusionPipeline"),rt.forEach(o),so.forEach(o),ut=m(n),_=a(n,"DIV",{class:!0});var v=r(_);$(je.$$.fragment,v),Vt=m(v),xo=a(v,"P",{});var Ks=r(xo);Ct=d(Ks,"Base class for all pipelines."),Ks.forEach(o),Xt=m(v),ro=a(v,"P",{});var Ls=r(ro);lo=a(Ls,"A",{href:!0});var ea=r(lo);St=d(ea,"DiffusionPipeline"),ea.forEach(o),Rt=d(Ls,` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),Ls.forEach(o),Yt=m(v),Te=a(v,"UL",{});var _t=r(Te);Mo=a(_t,"LI",{});var oa=r(Mo);zt=d(oa,"move all PyTorch modules to the device of your choice"),oa.forEach(o),At=m(_t),jo=a(_t,"LI",{});var ta=r(jo);Ht=d(ta,"enable/disable the progress bar for the denoising iteration"),ta.forEach(o),_t.forEach(o),Qt=m(v),To=a(v,"P",{});var na=r(To);Lt=d(na,"Class attributes:"),na.forEach(o),qt=m(v),Ue=a(v,"UL",{});var yt=r(Ue);K=a(yt,"LI",{});var lt=r(K);Uo=a(lt,"STRONG",{});var sa=r(Uo);Ot=d(sa,"config_name"),sa.forEach(o),Kt=d(lt," ("),Po=a(lt,"CODE",{});var aa=r(Po);en=d(aa,"str"),aa.forEach(o),on=d(lt,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),lt.forEach(o),tn=m(yt),ee=a(yt,"LI",{});var dt=r(ee);Zo=a(dt,"STRONG",{});var ia=r(Zo);nn=d(ia,"_optional_components"),ia.forEach(o),sn=d(dt," ("),Eo=a(dt,"CODE",{});var ra=r(Eo);an=d(ra,"List[str]"),ra.forEach(o),rn=d(dt,`) \u2014 List of all optional components that don\u2019t have to be passed to the
pipeline to function (should be overridden by subclasses).`),dt.forEach(o),yt.forEach(o),ln=m(v),oe=a(v,"DIV",{class:!0});var vt=r(oe);$(Pe.$$.fragment,vt),dn=m(vt),Do=a(vt,"P",{});var la=r(Do);pn=d(la,"Call self as a function."),la.forEach(o),vt.forEach(o),cn=m(v),po=a(v,"DIV",{class:!0});var da=r(po);$(Ze.$$.fragment,da),da.forEach(o),fn=m(v),co=a(v,"DIV",{class:!0});var pa=r(co);$(Ee.$$.fragment,pa),pa.forEach(o),mn=m(v),X=a(v,"DIV",{class:!0});var $e=r(X);$(De.$$.fragment,$e),un=m($e),Je=a($e,"P",{});var wt=r(Je);hn=d(wt,"The "),Jo=a(wt,"CODE",{});var ca=r(Jo);gn=d(ca,"self.components"),ca.forEach(o),bn=d(wt,` property can be useful to run different pipelines with the same weights and
configurations without reallocating additional memory.`),wt.forEach(o),_n=m($e),ke=a($e,"P",{});var $t=r(ke);yn=d($t,"Returns ("),ko=a($t,"CODE",{});var fa=r(ko);vn=d(fa,"dict"),fa.forEach(o),wn=d($t,`):
A dictionary containing all the modules needed to initialize the pipeline.`),$t.forEach(o),$n=m($e),$(te.$$.fragment,$e),$e.forEach(o),xn=m(v),ne=a(v,"DIV",{class:!0});var xt=r(ne);$(Ge.$$.fragment,xt),Mn=m(xt),Ie=a(xt,"P",{});var Mt=r(Ie);jn=d(Mt,"Disable sliced attention computation. If "),Go=a(Mt,"CODE",{});var ma=r(Go);Tn=d(ma,"enable_attention_slicing"),ma.forEach(o),Un=d(Mt,` was previously called, attention is
computed in one step.`),Mt.forEach(o),xt.forEach(o),Pn=m(v),se=a(v,"DIV",{class:!0});var jt=r(se);$(We.$$.fragment,jt),Zn=m(jt),Be=a(jt,"P",{});var Tt=r(Be);En=d(Tt,"Disable memory efficient attention from "),Fe=a(Tt,"A",{href:!0,rel:!0});var ua=r(Fe);Dn=d(ua,"xFormers"),ua.forEach(o),Jn=d(Tt,"."),Tt.forEach(o),jt.forEach(o),kn=m(v),z=a(v,"DIV",{class:!0});var go=r(z);$(Ne.$$.fragment,go),Gn=m(go),Io=a(go,"P",{});var ha=r(Io);In=d(ha,"Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights."),ha.forEach(o),Wn=m(go),$(ae.$$.fragment,go),go.forEach(o),Bn=m(v),ie=a(v,"DIV",{class:!0});var Ut=r(ie);$(Ve.$$.fragment,Ut),Fn=m(Ut),Wo=a(Ut,"P",{});var ga=r(Wo);Nn=d(ga,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. This is useful to save some memory in exchange for a small
speed decrease.`),ga.forEach(o),Ut.forEach(o),Vn=m(v),re=a(v,"DIV",{class:!0});var Pt=r(re);$(Ce.$$.fragment,Pt),Cn=m(Pt),Q=a(Pt,"P",{});var bo=r(Q);Xn=d(bo,`Offloads all models to CPU using accelerate, significantly reducing memory usage. When called, unet,
text_encoder, vae and safety checker have their state dicts saved to CPU and then are moved to a
`),Bo=a(bo,"CODE",{});var ba=r(Bo);Sn=d(ba,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),ba.forEach(o),Rn=d(bo,"forward"),Fo=a(bo,"CODE",{});var _a=r(Fo);Yn=d(_a,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),_a.forEach(o),zn=d(bo,"enable_model_cpu_offload`, but performance is lower."),bo.forEach(o),Pt.forEach(o),An=m(v),S=a(v,"DIV",{class:!0});var xe=r(S);$(Xe.$$.fragment,xe),Hn=m(xe),Se=a(xe,"P",{});var Zt=r(Se);Qn=d(Zt,"Enable memory efficient attention from "),Re=a(Zt,"A",{href:!0,rel:!0});var ya=r(Re);Ln=d(ya,"xFormers"),ya.forEach(o),qn=d(Zt,`. 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.`),Zt.forEach(o),On=m(xe),$(le.$$.fragment,xe),Kn=m(xe),$(de.$$.fragment,xe),xe.forEach(o),es=m(v),N=a(v,"DIV",{class:!0});var R=r(N);$(Ye.$$.fragment,R),os=m(R),No=a(R,"P",{});var va=r(No);ts=d(va,"Instantiate a PyTorch diffusion pipeline from pretrained pipeline weights."),va.forEach(o),ns=m(R),ze=a(R,"P",{});var Et=r(ze);ss=d(Et,"The pipeline is set in evaluation mode ("),Vo=a(Et,"CODE",{});var wa=r(Vo);as=d(wa,"model.eval()"),wa.forEach(o),is=d(Et,") by default."),Et.forEach(o),rs=m(R),$(pe.$$.fragment,R),ls=m(R),$(ce.$$.fragment,R),ds=m(R),$(fe.$$.fragment,R),R.forEach(o),ps=m(v),me=a(v,"DIV",{class:!0});var Dt=r(me);$(Ae.$$.fragment,Dt),cs=m(Dt),Co=a(Dt,"P",{});var $a=r(Co);fs=d($a,"Convert a NumPy image or a batch of images to a PIL image."),$a.forEach(o),Dt.forEach(o),ms=m(v),ue=a(v,"DIV",{class:!0});var Jt=r(ue);$(He.$$.fragment,Jt),us=m(Jt),Qe=a(Jt,"P",{});var kt=r(Qe);hs=d(kt,`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
`),fo=a(kt,"A",{href:!0});var xa=r(fo);gs=d(xa,"from_pretrained()"),xa.forEach(o),bs=d(kt," class method."),kt.forEach(o),Jt.forEach(o),v.forEach(o),ht=m(n),L=a(n,"H2",{class:!0});var Gt=r(L);he=a(Gt,"A",{id:!0,class:!0,href:!0});var Ma=r(he);Xo=a(Ma,"SPAN",{});var ja=r(Xo);$(Le.$$.fragment,ja),ja.forEach(o),Ma.forEach(o),_s=m(Gt),So=a(Gt,"SPAN",{});var Ta=r(So);ys=d(Ta,"FlaxDiffusionPipeline"),Ta.forEach(o),Gt.forEach(o),gt=m(n),D=a(n,"DIV",{class:!0});var B=r(D);$(qe.$$.fragment,B),vs=m(B),Ro=a(B,"P",{});var Ua=r(Ro);ws=d(Ua,"Base class for Flax-based pipelines."),Ua.forEach(o),$s=m(B),mo=a(B,"P",{});var qs=r(mo);uo=a(qs,"A",{href:!0});var Pa=r(uo);xs=d(Pa,"FlaxDiffusionPipeline"),Pa.forEach(o),Ms=d(qs,` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),qs.forEach(o),js=m(B),Yo=a(B,"UL",{});var Za=r(Yo);zo=a(Za,"LI",{});var Ea=r(zo);Ts=d(Ea,"enable/disable the progress bar for the denoising iteration"),Ea.forEach(o),Za.forEach(o),Us=m(B),Ao=a(B,"P",{});var Da=r(Ao);Ps=d(Da,"Class attributes:"),Da.forEach(o),Zs=m(B),Ho=a(B,"UL",{});var Ja=r(Ho);ge=a(Ja,"LI",{});var pt=r(ge);Qo=a(pt,"STRONG",{});var ka=r(Qo);Es=d(ka,"config_name"),ka.forEach(o),Ds=d(pt," ("),Lo=a(pt,"CODE",{});var Ga=r(Lo);Js=d(Ga,"str"),Ga.forEach(o),ks=d(pt,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),pt.forEach(o),Ja.forEach(o),Gs=m(B),V=a(B,"DIV",{class:!0});var Y=r(V);$(Oe.$$.fragment,Y),Is=m(Y),qo=a(Y,"P",{});var Ia=r(qo);Ws=d(Ia,"Instantiate a Flax-based diffusion pipeline from pretrained pipeline weights."),Ia.forEach(o),Bs=m(Y),Oo=a(Y,"P",{});var Wa=r(Oo);Fs=d(Wa,"The pipeline is set in evaluation mode (`model.eval()) by default and dropout modules are deactivated."),Wa.forEach(o),Ns=m(Y),$(be.$$.fragment,Y),Vs=m(Y),$(_e.$$.fragment,Y),Cs=m(Y),$(ye.$$.fragment,Y),Y.forEach(o),Xs=m(B),ve=a(B,"DIV",{class:!0});var It=r(ve);$(Ke.$$.fragment,It),Ss=m(It),Ko=a(It,"P",{});var Ba=r(Ko);Rs=d(Ba,"Convert a NumPy image or a batch of images to a PIL image."),Ba.forEach(o),It.forEach(o),Ys=m(B),we=a(B,"DIV",{class:!0});var Wt=r(we);$(eo.$$.fragment,Wt),zs=m(Wt),oo=a(Wt,"P",{});var Bt=r(oo);As=d(Bt,`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
`),ho=a(Bt,"A",{href:!0});var Fa=r(ho);Hs=d(Fa,"from_pretrained()"),Fa.forEach(o),Qs=d(Bt," class method."),Bt.forEach(o),Wt.forEach(o),B.forEach(o),this.h()},h(){h(i,"name","hf:doc:metadata"),h(i,"content",JSON.stringify(ti)),h(p,"id","pipelines"),h(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"),h(p,"href","#pipelines"),h(c,"class","relative group"),h(C,"href","/docs/diffusers/v0.19.2/en/api/pipelines/overview#diffusers.DiffusionPipeline"),h(O,"id","diffusers.DiffusionPipeline"),h(O,"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"),h(O,"href","#diffusers.DiffusionPipeline"),h(H,"class","relative group"),h(lo,"href","/docs/diffusers/v0.19.2/en/api/pipelines/overview#diffusers.DiffusionPipeline"),h(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Fe,"href","https://facebookresearch.github.io/xformers/"),h(Fe,"rel","nofollow"),h(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Re,"href","https://facebookresearch.github.io/xformers/"),h(Re,"rel","nofollow"),h(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(fo,"href","/docs/diffusers/v0.19.2/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained"),h(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(_,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(he,"id","diffusers.FlaxDiffusionPipeline"),h(he,"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"),h(he,"href","#diffusers.FlaxDiffusionPipeline"),h(L,"class","relative group"),h(uo,"href","/docs/diffusers/v0.19.2/en/api/pipelines/overview#diffusers.FlaxDiffusionPipeline"),h(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ho,"href","/docs/diffusers/v0.19.2/en/api/pipelines/overview#diffusers.FlaxDiffusionPipeline.from_pretrained"),h(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,y){e(document.head,i),P(n,b,y),P(n,c,y),e(c,p),e(p,g),x(t,g,null),e(c,u),e(c,k),e(k,Z),P(n,U,y),P(n,I,y),e(I,W),P(n,G,y),P(n,J,y),e(J,A),e(J,C),e(C,ao),e(J,io),P(n,ft,y),x(q,n,y),P(n,mt,y),P(n,H,y),e(H,O),e(O,wo),x(Me,wo,null),e(H,Ft),e(H,$o),e($o,Nt),P(n,ut,y),P(n,_,y),x(je,_,null),e(_,Vt),e(_,xo),e(xo,Ct),e(_,Xt),e(_,ro),e(ro,lo),e(lo,St),e(ro,Rt),e(_,Yt),e(_,Te),e(Te,Mo),e(Mo,zt),e(Te,At),e(Te,jo),e(jo,Ht),e(_,Qt),e(_,To),e(To,Lt),e(_,qt),e(_,Ue),e(Ue,K),e(K,Uo),e(Uo,Ot),e(K,Kt),e(K,Po),e(Po,en),e(K,on),e(Ue,tn),e(Ue,ee),e(ee,Zo),e(Zo,nn),e(ee,sn),e(ee,Eo),e(Eo,an),e(ee,rn),e(_,ln),e(_,oe),x(Pe,oe,null),e(oe,dn),e(oe,Do),e(Do,pn),e(_,cn),e(_,po),x(Ze,po,null),e(_,fn),e(_,co),x(Ee,co,null),e(_,mn),e(_,X),x(De,X,null),e(X,un),e(X,Je),e(Je,hn),e(Je,Jo),e(Jo,gn),e(Je,bn),e(X,_n),e(X,ke),e(ke,yn),e(ke,ko),e(ko,vn),e(ke,wn),e(X,$n),x(te,X,null),e(_,xn),e(_,ne),x(Ge,ne,null),e(ne,Mn),e(ne,Ie),e(Ie,jn),e(Ie,Go),e(Go,Tn),e(Ie,Un),e(_,Pn),e(_,se),x(We,se,null),e(se,Zn),e(se,Be),e(Be,En),e(Be,Fe),e(Fe,Dn),e(Be,Jn),e(_,kn),e(_,z),x(Ne,z,null),e(z,Gn),e(z,Io),e(Io,In),e(z,Wn),x(ae,z,null),e(_,Bn),e(_,ie),x(Ve,ie,null),e(ie,Fn),e(ie,Wo),e(Wo,Nn),e(_,Vn),e(_,re),x(Ce,re,null),e(re,Cn),e(re,Q),e(Q,Xn),e(Q,Bo),e(Bo,Sn),e(Q,Rn),e(Q,Fo),e(Fo,Yn),e(Q,zn),e(_,An),e(_,S),x(Xe,S,null),e(S,Hn),e(S,Se),e(Se,Qn),e(Se,Re),e(Re,Ln),e(Se,qn),e(S,On),x(le,S,null),e(S,Kn),x(de,S,null),e(_,es),e(_,N),x(Ye,N,null),e(N,os),e(N,No),e(No,ts),e(N,ns),e(N,ze),e(ze,ss),e(ze,Vo),e(Vo,as),e(ze,is),e(N,rs),x(pe,N,null),e(N,ls),x(ce,N,null),e(N,ds),x(fe,N,null),e(_,ps),e(_,me),x(Ae,me,null),e(me,cs),e(me,Co),e(Co,fs),e(_,ms),e(_,ue),x(He,ue,null),e(ue,us),e(ue,Qe),e(Qe,hs),e(Qe,fo),e(fo,gs),e(Qe,bs),P(n,ht,y),P(n,L,y),e(L,he),e(he,Xo),x(Le,Xo,null),e(L,_s),e(L,So),e(So,ys),P(n,gt,y),P(n,D,y),x(qe,D,null),e(D,vs),e(D,Ro),e(Ro,ws),e(D,$s),e(D,mo),e(mo,uo),e(uo,xs),e(mo,Ms),e(D,js),e(D,Yo),e(Yo,zo),e(zo,Ts),e(D,Us),e(D,Ao),e(Ao,Ps),e(D,Zs),e(D,Ho),e(Ho,ge),e(ge,Qo),e(Qo,Es),e(ge,Ds),e(ge,Lo),e(Lo,Js),e(ge,ks),e(D,Gs),e(D,V),x(Oe,V,null),e(V,Is),e(V,qo),e(qo,Ws),e(V,Bs),e(V,Oo),e(Oo,Fs),e(V,Ns),x(be,V,null),e(V,Vs),x(_e,V,null),e(V,Cs),x(ye,V,null),e(D,Xs),e(D,ve),x(Ke,ve,null),e(ve,Ss),e(ve,Ko),e(Ko,Rs),e(D,Ys),e(D,we),x(eo,we,null),e(we,zs),e(we,oo),e(oo,As),e(oo,ho),e(ho,Hs),e(oo,Qs),bt=!0},p(n,[y]){const to={};y&2&&(to.$$scope={dirty:y,ctx:n}),q.$set(to);const et={};y&2&&(et.$$scope={dirty:y,ctx:n}),te.$set(et);const ot={};y&2&&(ot.$$scope={dirty:y,ctx:n}),ae.$set(ot);const tt={};y&2&&(tt.$$scope={dirty:y,ctx:n}),le.$set(tt);const nt={};y&2&&(nt.$$scope={dirty:y,ctx:n}),de.$set(nt);const no={};y&2&&(no.$$scope={dirty:y,ctx:n}),pe.$set(no);const st={};y&2&&(st.$$scope={dirty:y,ctx:n}),ce.$set(st);const so={};y&2&&(so.$$scope={dirty:y,ctx:n}),fe.$set(so);const at={};y&2&&(at.$$scope={dirty:y,ctx:n}),be.$set(at);const it={};y&2&&(it.$$scope={dirty:y,ctx:n}),_e.$set(it);const rt={};y&2&&(rt.$$scope={dirty:y,ctx:n}),ye.$set(rt)},i(n){bt||(M(t.$$.fragment,n),M(q.$$.fragment,n),M(Me.$$.fragment,n),M(je.$$.fragment,n),M(Pe.$$.fragment,n),M(Ze.$$.fragment,n),M(Ee.$$.fragment,n),M(De.$$.fragment,n),M(te.$$.fragment,n),M(Ge.$$.fragment,n),M(We.$$.fragment,n),M(Ne.$$.fragment,n),M(ae.$$.fragment,n),M(Ve.$$.fragment,n),M(Ce.$$.fragment,n),M(Xe.$$.fragment,n),M(le.$$.fragment,n),M(de.$$.fragment,n),M(Ye.$$.fragment,n),M(pe.$$.fragment,n),M(ce.$$.fragment,n),M(fe.$$.fragment,n),M(Ae.$$.fragment,n),M(He.$$.fragment,n),M(Le.$$.fragment,n),M(qe.$$.fragment,n),M(Oe.$$.fragment,n),M(be.$$.fragment,n),M(_e.$$.fragment,n),M(ye.$$.fragment,n),M(Ke.$$.fragment,n),M(eo.$$.fragment,n),bt=!0)},o(n){j(t.$$.fragment,n),j(q.$$.fragment,n),j(Me.$$.fragment,n),j(je.$$.fragment,n),j(Pe.$$.fragment,n),j(Ze.$$.fragment,n),j(Ee.$$.fragment,n),j(De.$$.fragment,n),j(te.$$.fragment,n),j(Ge.$$.fragment,n),j(We.$$.fragment,n),j(Ne.$$.fragment,n),j(ae.$$.fragment,n),j(Ve.$$.fragment,n),j(Ce.$$.fragment,n),j(Xe.$$.fragment,n),j(le.$$.fragment,n),j(de.$$.fragment,n),j(Ye.$$.fragment,n),j(pe.$$.fragment,n),j(ce.$$.fragment,n),j(fe.$$.fragment,n),j(Ae.$$.fragment,n),j(He.$$.fragment,n),j(Le.$$.fragment,n),j(qe.$$.fragment,n),j(Oe.$$.fragment,n),j(be.$$.fragment,n),j(_e.$$.fragment,n),j(ye.$$.fragment,n),j(Ke.$$.fragment,n),j(eo.$$.fragment,n),bt=!1},d(n){o(i),n&&o(b),n&&o(c),T(t),n&&o(U),n&&o(I),n&&o(G),n&&o(J),n&&o(ft),T(q,n),n&&o(mt),n&&o(H),T(Me),n&&o(ut),n&&o(_),T(je),T(Pe),T(Ze),T(Ee),T(De),T(te),T(Ge),T(We),T(Ne),T(ae),T(Ve),T(Ce),T(Xe),T(le),T(de),T(Ye),T(pe),T(ce),T(fe),T(Ae),T(He),n&&o(ht),n&&o(L),T(Le),n&&o(gt),n&&o(D),T(qe),T(Oe),T(be),T(_e),T(ye),T(Ke),T(eo)}}}const ti={local:"pipelines",sections:[{local:"diffusers.DiffusionPipeline",title:"DiffusionPipeline"},{local:"diffusers.FlaxDiffusionPipeline",title:"FlaxDiffusionPipeline"}],title:"Pipelines"};function ni(E){return Sa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pi extends Na{constructor(i){super();Va(this,i,ni,oi,Ca,{})}}export{pi as default,ti as metadata};
