import{S as Us,i as Es,s as Zs,e as a,k as f,w,t as s,M as Gs,c as r,d as o,m,a as l,x as $,h as i,b as g,G as e,g as D,y as x,q as M,o as P,B as T,v as ks,L as ot}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ko}from"../../chunks/Tip-hf-doc-builder.js";import{D as J}from"../../chunks/Docstring-hf-doc-builder.js";import{C as tt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ds}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as et}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Is(Z){let d,y,p,c,b,n,u,G,U,j,E;return{c(){d=a("p"),y=s("You shouldn\u2019t use the "),p=a("a"),c=s("DiffusionPipeline"),b=s(` class for training or finetuning a diffusion model. Individual
components (for example, `),n=a("a"),u=s("UNet2DModel"),G=s(" and "),U=a("a"),j=s("UNet2DConditionModel"),E=s(") of diffusion pipelines are usually trained individually, so we suggest directly working with them instead."),this.h()},l(W){d=r(W,"P",{});var k=l(d);y=i(k,"You shouldn\u2019t use the "),p=r(k,"A",{href:!0});var Fe=l(p);c=i(Fe,"DiffusionPipeline"),Fe.forEach(o),b=i(k,` class for training or finetuning a diffusion model. Individual
components (for example, `),n=r(k,"A",{href:!0});var Se=l(n);u=i(Se,"UNet2DModel"),Se.forEach(o),G=i(k," and "),U=r(k,"A",{href:!0});var S=l(U);j=i(S,"UNet2DConditionModel"),S.forEach(o),E=i(k,") of diffusion pipelines are usually trained individually, so we suggest directly working with them instead."),k.forEach(o),this.h()},h(){g(p,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),g(n,"href","/docs/diffusers/main/en/api/models/unet2d#diffusers.UNet2DModel"),g(U,"href","/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel")},m(W,k){D(W,d,k),e(d,y),e(d,p),e(p,c),e(d,b),e(d,n),e(n,u),e(d,G),e(d,U),e(U,j),e(d,E)},d(W){W&&o(d)}}}function Ws(Z){let d,y,p,c,b;return c=new tt({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(){d=a("p"),y=s("Examples:"),p=f(),w(c.$$.fragment)},l(n){d=r(n,"P",{});var u=l(d);y=i(u,"Examples:"),u.forEach(o),p=m(n),$(c.$$.fragment,n)},m(n,u){D(n,d,u),e(d,y),D(n,p,u),x(c,n,u),b=!0},p:ot,i(n){b||(M(c.$$.fragment,n),b=!0)},o(n){P(c.$$.fragment,n),b=!1},d(n){n&&o(d),n&&o(p),T(c,n)}}}function Js(Z){let d,y,p,c,b,n,u,G;return{c(){d=a("p"),y=s("To use private or "),p=a("a"),c=s("gated models"),b=s(`, log-in with
`),n=a("code"),u=s("huggingface-cli login"),G=s("."),this.h()},l(U){d=r(U,"P",{});var j=l(d);y=i(j,"To use private or "),p=r(j,"A",{href:!0,rel:!0});var E=l(p);c=i(E,"gated models"),E.forEach(o),b=i(j,`, log-in with
`),n=r(j,"CODE",{});var W=l(n);u=i(W,"huggingface-cli login"),W.forEach(o),G=i(j,"."),j.forEach(o),this.h()},h(){g(p,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),g(p,"rel","nofollow")},m(U,j){D(U,d,j),e(d,y),e(d,p),e(p,c),e(d,b),e(d,n),e(n,u),e(d,G)},d(U){U&&o(d)}}}function Ns(Z){let d,y;return{c(){d=a("p"),y=s(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(p){d=r(p,"P",{});var c=l(d);y=i(c,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),c.forEach(o)},m(p,c){D(p,d,c),e(d,y)},d(p){p&&o(d)}}}function Vs(Z){let d,y,p,c,b;return c=new tt({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(){d=a("p"),y=s("Examples:"),p=f(),w(c.$$.fragment)},l(n){d=r(n,"P",{});var u=l(d);y=i(u,"Examples:"),u.forEach(o),p=m(n),$(c.$$.fragment,n)},m(n,u){D(n,d,u),e(d,y),D(n,p,u),x(c,n,u),b=!0},p:ot,i(n){b||(M(c.$$.fragment,n),b=!0)},o(n){P(c.$$.fragment,n),b=!1},d(n){n&&o(d),n&&o(p),T(c,n)}}}function Bs(Z){let d,y,p,c,b;return c=new tt({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(){d=a("p"),y=s("If you get the error message below, you need to finetune the weights for your downstream task:"),p=f(),w(c.$$.fragment)},l(n){d=r(n,"P",{});var u=l(d);y=i(u,"If you get the error message below, you need to finetune the weights for your downstream task:"),u.forEach(o),p=m(n),$(c.$$.fragment,n)},m(n,u){D(n,d,u),e(d,y),D(n,p,u),x(c,n,u),b=!0},p:ot,i(n){b||(M(c.$$.fragment,n),b=!0)},o(n){P(c.$$.fragment,n),b=!1},d(n){n&&o(d),n&&o(p),T(c,n)}}}function Cs(Z){let d,y,p,c,b,n,u,G;return{c(){d=a("p"),y=s("To use private or "),p=a("a"),c=s("gated"),b=s(` models, log-in with
`),n=a("code"),u=s("huggingface-cli login"),G=s("."),this.h()},l(U){d=r(U,"P",{});var j=l(d);y=i(j,"To use private or "),p=r(j,"A",{href:!0,rel:!0});var E=l(p);c=i(E,"gated"),E.forEach(o),b=i(j,` models, log-in with
`),n=r(j,"CODE",{});var W=l(n);u=i(W,"huggingface-cli login"),W.forEach(o),G=i(j,"."),j.forEach(o),this.h()},h(){g(p,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),g(p,"rel","nofollow")},m(U,j){D(U,d,j),e(d,y),e(d,p),e(p,c),e(d,b),e(d,n),e(n,u),e(d,G)},d(U){U&&o(d)}}}function Fs(Z){let d,y,p,c,b;return c=new tt({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(){d=a("p"),y=s("Examples:"),p=f(),w(c.$$.fragment)},l(n){d=r(n,"P",{});var u=l(d);y=i(u,"Examples:"),u.forEach(o),p=m(n),$(c.$$.fragment,n)},m(n,u){D(n,d,u),e(d,y),D(n,p,u),x(c,n,u),b=!0},p:ot,i(n){b||(M(c.$$.fragment,n),b=!0)},o(n){P(c.$$.fragment,n),b=!1},d(n){n&&o(d),n&&o(p),T(c,n)}}}function Ss(Z){let d,y,p,c,b,n,u,G,U,j,E,W,k,Fe,Se,S,nt,st,Uo,z,Eo,N,it,Re,at,rt,Xe,lt,dt,Ke,pt,ct,Zo,L,ft,Ae,mt,ut,Go,X,q,eo,ue,ht,oo,gt,ko,h,he,_t,to,bt,yt,Ye,ze,vt,wt,$t,ge,no,xt,Mt,so,Pt,Tt,io,jt,Dt,_e,H,ao,Ut,Et,ro,Zt,Gt,kt,Q,lo,It,Wt,po,Jt,Nt,Vt,O,be,Bt,co,Ct,Ft,Le,ye,St,qe,ve,Rt,V,we,Xt,$e,At,fo,Yt,zt,Lt,xe,qt,mo,Ht,Qt,Ot,K,Kt,ee,Me,en,Pe,on,uo,tn,nn,sn,oe,Te,an,je,rn,De,ln,dn,pn,R,Ue,cn,ho,fn,mn,te,un,ne,Ee,hn,go,gn,_n,se,Ze,bn,A,yn,_o,vn,wn,bo,$n,xn,Mn,B,Ge,Pn,ke,Tn,Ie,jn,Dn,Un,ie,En,ae,Zn,I,We,Gn,yo,kn,In,Je,Wn,vo,Jn,Nn,Vn,re,Bn,le,Cn,de,Fn,pe,Ne,Sn,wo,Rn,Xn,ce,Ve,An,Be,Yn,He,zn,Ln,Io;return n=new Ds({}),z=new Ko({props:{$$slots:{default:[Is]},$$scope:{ctx:Z}}}),ue=new Ds({}),he=new J({props:{name:"class diffusers.DiffusionPipeline",anchor:"diffusers.DiffusionPipeline",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L476"}}),be=new J({props:{name:"__call__",anchor:"diffusers.DiffusionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),ye=new J({props:{name:"device",anchor:"diffusers.DiffusionPipeline.device",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/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>
`}}),ve=new J({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/main/src/diffusers/pipelines/pipeline_utils.py#L645"}}),we=new J({props:{name:"components",anchor:"diffusers.DiffusionPipeline.components",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1547"}}),K=new et({props:{anchor:"diffusers.DiffusionPipeline.components.example",$$slots:{default:[Ws]},$$scope:{ctx:Z}}}),Me=new J({props:{name:"disable_attention_slicing",anchor:"diffusers.DiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1684"}}),Te=new J({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.DiffusionPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1643"}}),Ue=new J({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/main/src/diffusers/pipelines/pipeline_utils.py#L1212",returnDescription:`
<p>A path to the downloaded pipeline.</p>
`,returnType:`
<p><code>os.PathLike</code></p>
`}}),te=new Ko({props:{$$slots:{default:[Js]},$$scope:{ctx:Z}}}),Ee=new J({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/main/src/diffusers/pipelines/pipeline_utils.py#L1669"}}),Ze=new J({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/main/src/diffusers/pipelines/pipeline_utils.py#L1178"}}),Ge=new J({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/main/src/diffusers/pipelines/pipeline_utils.py#L1608"}}),ie=new Ko({props:{warning:!0,$$slots:{default:[Ns]},$$scope:{ctx:Z}}}),ae=new et({props:{anchor:"diffusers.DiffusionPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Vs]},$$scope:{ctx:Z}}}),We=new J({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/main/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/main/src/diffusers/pipelines/pipeline_utils.py#L735"}}),re=new et({props:{anchor:"diffusers.DiffusionPipeline.from_pretrained.example",$$slots:{default:[Bs]},$$scope:{ctx:Z}}}),le=new Ko({props:{$$slots:{default:[Cs]},$$scope:{ctx:Z}}}),de=new et({props:{anchor:"diffusers.DiffusionPipeline.from_pretrained.example-2",$$slots:{default:[Fs]},$$scope:{ctx:Z}}}),Ne=new J({props:{name:"numpy_to_pil",anchor:"diffusers.DiffusionPipeline.numpy_to_pil",parameters:[{name:"images",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1583"}}),Ve=new J({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/main/src/diffusers/pipelines/pipeline_utils.py#L557"}}),{c(){d=a("meta"),y=f(),p=a("h1"),c=a("a"),b=a("span"),w(n.$$.fragment),u=f(),G=a("span"),U=s("Pipelines"),j=f(),E=a("p"),W=s("The "),k=a("a"),Fe=s("DiffusionPipeline"),Se=s(" is the quickest way to load any pretrained diffusion pipeline from the "),S=a("a"),nt=s("Hub"),st=s(" for inference."),Uo=f(),w(z.$$.fragment),Eo=f(),N=a("p"),it=s("The pipeline type (for example "),Re=a("a"),at=s("StableDiffusionPipeline"),rt=s(") of any diffusion pipeline loaded with "),Xe=a("a"),lt=s("from_pretrained()"),dt=s(` is automatically
detected and pipeline components are loaded and passed to the `),Ke=a("code"),pt=s("__init__"),ct=s(" function of the pipeline."),Zo=f(),L=a("p"),ft=s("Any pipeline object can be saved locally with "),Ae=a("a"),mt=s("save_pretrained()"),ut=s("."),Go=f(),X=a("h2"),q=a("a"),eo=a("span"),w(ue.$$.fragment),ht=f(),oo=a("span"),gt=s("DiffusionPipeline"),ko=f(),h=a("div"),w(he.$$.fragment),_t=f(),to=a("p"),bt=s("Base class for all pipelines."),yt=f(),Ye=a("p"),ze=a("a"),vt=s("DiffusionPipeline"),wt=s(` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),$t=f(),ge=a("ul"),no=a("li"),xt=s("move all PyTorch modules to the device of your choice"),Mt=f(),so=a("li"),Pt=s("enable/disable the progress bar for the denoising iteration"),Tt=f(),io=a("p"),jt=s("Class attributes:"),Dt=f(),_e=a("ul"),H=a("li"),ao=a("strong"),Ut=s("config_name"),Et=s(" ("),ro=a("code"),Zt=s("str"),Gt=s(`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),kt=f(),Q=a("li"),lo=a("strong"),It=s("_optional_components"),Wt=s(" ("),po=a("code"),Jt=s("List[str]"),Nt=s(`) \u2014 List of all optional components that don\u2019t have to be passed to the
pipeline to function (should be overridden by subclasses).`),Vt=f(),O=a("div"),w(be.$$.fragment),Bt=f(),co=a("p"),Ct=s("Call self as a function."),Ft=f(),Le=a("div"),w(ye.$$.fragment),St=f(),qe=a("div"),w(ve.$$.fragment),Rt=f(),V=a("div"),w(we.$$.fragment),Xt=f(),$e=a("p"),At=s("The "),fo=a("code"),Yt=s("self.components"),zt=s(` property can be useful to run different pipelines with the same weights and
configurations without reallocating additional memory.`),Lt=f(),xe=a("p"),qt=s("Returns ("),mo=a("code"),Ht=s("dict"),Qt=s(`):
A dictionary containing all the modules needed to initialize the pipeline.`),Ot=f(),w(K.$$.fragment),Kt=f(),ee=a("div"),w(Me.$$.fragment),en=f(),Pe=a("p"),on=s("Disable sliced attention computation. If "),uo=a("code"),tn=s("enable_attention_slicing"),nn=s(` was previously called, attention is
computed in one step.`),sn=f(),oe=a("div"),w(Te.$$.fragment),an=f(),je=a("p"),rn=s("Disable memory efficient attention from "),De=a("a"),ln=s("xFormers"),dn=s("."),pn=f(),R=a("div"),w(Ue.$$.fragment),cn=f(),ho=a("p"),fn=s("Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights."),mn=f(),w(te.$$.fragment),un=f(),ne=a("div"),w(Ee.$$.fragment),hn=f(),go=a("p"),gn=s(`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.`),_n=f(),se=a("div"),w(Ze.$$.fragment),bn=f(),A=a("p"),yn=s(`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
`),_o=a("code"),vn=s("torch.device('meta') and loaded to GPU only when their specific submodule has its "),wn=s("forward"),bo=a("code"),$n=s("method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),xn=s("enable_model_cpu_offload`, but performance is lower."),Mn=f(),B=a("div"),w(Ge.$$.fragment),Pn=f(),ke=a("p"),Tn=s("Enable memory efficient attention from "),Ie=a("a"),jn=s("xFormers"),Dn=s(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),Un=f(),w(ie.$$.fragment),En=f(),w(ae.$$.fragment),Zn=f(),I=a("div"),w(We.$$.fragment),Gn=f(),yo=a("p"),kn=s("Instantiate a PyTorch diffusion pipeline from pretrained pipeline weights."),In=f(),Je=a("p"),Wn=s("The pipeline is set in evaluation mode ("),vo=a("code"),Jn=s("model.eval()"),Nn=s(") by default."),Vn=f(),w(re.$$.fragment),Bn=f(),w(le.$$.fragment),Cn=f(),w(de.$$.fragment),Fn=f(),pe=a("div"),w(Ne.$$.fragment),Sn=f(),wo=a("p"),Rn=s("Convert a NumPy image or a batch of images to a PIL image."),Xn=f(),ce=a("div"),w(Ve.$$.fragment),An=f(),Be=a("p"),Yn=s(`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
`),He=a("a"),zn=s("from_pretrained()"),Ln=s(" class method."),this.h()},l(t){const v=Gs('[data-svelte="svelte-1phssyn"]',document.head);d=r(v,"META",{name:!0,content:!0}),v.forEach(o),y=m(t),p=r(t,"H1",{class:!0});var Ce=l(p);c=r(Ce,"A",{id:!0,class:!0,href:!0});var $o=l(c);b=r($o,"SPAN",{});var xo=l(b);$(n.$$.fragment,xo),xo.forEach(o),$o.forEach(o),u=m(Ce),G=r(Ce,"SPAN",{});var Mo=l(G);U=i(Mo,"Pipelines"),Mo.forEach(o),Ce.forEach(o),j=m(t),E=r(t,"P",{});var Y=l(E);W=i(Y,"The "),k=r(Y,"A",{href:!0});var Po=l(k);Fe=i(Po,"DiffusionPipeline"),Po.forEach(o),Se=i(Y," is the quickest way to load any pretrained diffusion pipeline from the "),S=r(Y,"A",{href:!0,rel:!0});var To=l(S);nt=i(To,"Hub"),To.forEach(o),st=i(Y," for inference."),Y.forEach(o),Uo=m(t),$(z.$$.fragment,t),Eo=m(t),N=r(t,"P",{});var F=l(N);it=i(F,"The pipeline type (for example "),Re=r(F,"A",{href:!0});var Hn=l(Re);at=i(Hn,"StableDiffusionPipeline"),Hn.forEach(o),rt=i(F,") of any diffusion pipeline loaded with "),Xe=r(F,"A",{href:!0});var Qn=l(Xe);lt=i(Qn,"from_pretrained()"),Qn.forEach(o),dt=i(F,` is automatically
detected and pipeline components are loaded and passed to the `),Ke=r(F,"CODE",{});var On=l(Ke);pt=i(On,"__init__"),On.forEach(o),ct=i(F," function of the pipeline."),F.forEach(o),Zo=m(t),L=r(t,"P",{});var Wo=l(L);ft=i(Wo,"Any pipeline object can be saved locally with "),Ae=r(Wo,"A",{href:!0});var Kn=l(Ae);mt=i(Kn,"save_pretrained()"),Kn.forEach(o),ut=i(Wo,"."),Wo.forEach(o),Go=m(t),X=r(t,"H2",{class:!0});var Jo=l(X);q=r(Jo,"A",{id:!0,class:!0,href:!0});var es=l(q);eo=r(es,"SPAN",{});var os=l(eo);$(ue.$$.fragment,os),os.forEach(o),es.forEach(o),ht=m(Jo),oo=r(Jo,"SPAN",{});var ts=l(oo);gt=i(ts,"DiffusionPipeline"),ts.forEach(o),Jo.forEach(o),ko=m(t),h=r(t,"DIV",{class:!0});var _=l(h);$(he.$$.fragment,_),_t=m(_),to=r(_,"P",{});var ns=l(to);bt=i(ns,"Base class for all pipelines."),ns.forEach(o),yt=m(_),Ye=r(_,"P",{});var qn=l(Ye);ze=r(qn,"A",{href:!0});var ss=l(ze);vt=i(ss,"DiffusionPipeline"),ss.forEach(o),wt=i(qn,` stores all components (models, schedulers, and processors) for diffusion pipelines and
provides methods for loading, downloading and saving models. It also includes methods to:`),qn.forEach(o),$t=m(_),ge=r(_,"UL",{});var No=l(ge);no=r(No,"LI",{});var is=l(no);xt=i(is,"move all PyTorch modules to the device of your choice"),is.forEach(o),Mt=m(No),so=r(No,"LI",{});var as=l(so);Pt=i(as,"enable/disable the progress bar for the denoising iteration"),as.forEach(o),No.forEach(o),Tt=m(_),io=r(_,"P",{});var rs=l(io);jt=i(rs,"Class attributes:"),rs.forEach(o),Dt=m(_),_e=r(_,"UL",{});var Vo=l(_e);H=r(Vo,"LI",{});var jo=l(H);ao=r(jo,"STRONG",{});var ls=l(ao);Ut=i(ls,"config_name"),ls.forEach(o),Et=i(jo," ("),ro=r(jo,"CODE",{});var ds=l(ro);Zt=i(ds,"str"),ds.forEach(o),Gt=i(jo,`) \u2014 The configuration filename that stores the class and module names of all the
diffusion pipeline\u2019s components.`),jo.forEach(o),kt=m(Vo),Q=r(Vo,"LI",{});var Do=l(Q);lo=r(Do,"STRONG",{});var ps=l(lo);It=i(ps,"_optional_components"),ps.forEach(o),Wt=i(Do," ("),po=r(Do,"CODE",{});var cs=l(po);Jt=i(cs,"List[str]"),cs.forEach(o),Nt=i(Do,`) \u2014 List of all optional components that don\u2019t have to be passed to the
pipeline to function (should be overridden by subclasses).`),Do.forEach(o),Vo.forEach(o),Vt=m(_),O=r(_,"DIV",{class:!0});var Bo=l(O);$(be.$$.fragment,Bo),Bt=m(Bo),co=r(Bo,"P",{});var fs=l(co);Ct=i(fs,"Call self as a function."),fs.forEach(o),Bo.forEach(o),Ft=m(_),Le=r(_,"DIV",{class:!0});var ms=l(Le);$(ye.$$.fragment,ms),ms.forEach(o),St=m(_),qe=r(_,"DIV",{class:!0});var us=l(qe);$(ve.$$.fragment,us),us.forEach(o),Rt=m(_),V=r(_,"DIV",{class:!0});var fe=l(V);$(we.$$.fragment,fe),Xt=m(fe),$e=r(fe,"P",{});var Co=l($e);At=i(Co,"The "),fo=r(Co,"CODE",{});var hs=l(fo);Yt=i(hs,"self.components"),hs.forEach(o),zt=i(Co,` property can be useful to run different pipelines with the same weights and
configurations without reallocating additional memory.`),Co.forEach(o),Lt=m(fe),xe=r(fe,"P",{});var Fo=l(xe);qt=i(Fo,"Returns ("),mo=r(Fo,"CODE",{});var gs=l(mo);Ht=i(gs,"dict"),gs.forEach(o),Qt=i(Fo,`):
A dictionary containing all the modules needed to initialize the pipeline.`),Fo.forEach(o),Ot=m(fe),$(K.$$.fragment,fe),fe.forEach(o),Kt=m(_),ee=r(_,"DIV",{class:!0});var So=l(ee);$(Me.$$.fragment,So),en=m(So),Pe=r(So,"P",{});var Ro=l(Pe);on=i(Ro,"Disable sliced attention computation. If "),uo=r(Ro,"CODE",{});var _s=l(uo);tn=i(_s,"enable_attention_slicing"),_s.forEach(o),nn=i(Ro,` was previously called, attention is
computed in one step.`),Ro.forEach(o),So.forEach(o),sn=m(_),oe=r(_,"DIV",{class:!0});var Xo=l(oe);$(Te.$$.fragment,Xo),an=m(Xo),je=r(Xo,"P",{});var Ao=l(je);rn=i(Ao,"Disable memory efficient attention from "),De=r(Ao,"A",{href:!0,rel:!0});var bs=l(De);ln=i(bs,"xFormers"),bs.forEach(o),dn=i(Ao,"."),Ao.forEach(o),Xo.forEach(o),pn=m(_),R=r(_,"DIV",{class:!0});var Qe=l(R);$(Ue.$$.fragment,Qe),cn=m(Qe),ho=r(Qe,"P",{});var ys=l(ho);fn=i(ys,"Download and cache a PyTorch diffusion pipeline from pretrained pipeline weights."),ys.forEach(o),mn=m(Qe),$(te.$$.fragment,Qe),Qe.forEach(o),un=m(_),ne=r(_,"DIV",{class:!0});var Yo=l(ne);$(Ee.$$.fragment,Yo),hn=m(Yo),go=r(Yo,"P",{});var vs=l(go);gn=i(vs,`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.`),vs.forEach(o),Yo.forEach(o),_n=m(_),se=r(_,"DIV",{class:!0});var zo=l(se);$(Ze.$$.fragment,zo),bn=m(zo),A=r(zo,"P",{});var Oe=l(A);yn=i(Oe,`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
`),_o=r(Oe,"CODE",{});var ws=l(_o);vn=i(ws,"torch.device('meta') and loaded to GPU only when their specific submodule has its "),ws.forEach(o),wn=i(Oe,"forward"),bo=r(Oe,"CODE",{});var $s=l(bo);$n=i($s,"method called. Note that offloading happens on a submodule basis. Memory savings are higher than with"),$s.forEach(o),xn=i(Oe,"enable_model_cpu_offload`, but performance is lower."),Oe.forEach(o),zo.forEach(o),Mn=m(_),B=r(_,"DIV",{class:!0});var me=l(B);$(Ge.$$.fragment,me),Pn=m(me),ke=r(me,"P",{});var Lo=l(ke);Tn=i(Lo,"Enable memory efficient attention from "),Ie=r(Lo,"A",{href:!0,rel:!0});var xs=l(Ie);jn=i(xs,"xFormers"),xs.forEach(o),Dn=i(Lo,`. 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.`),Lo.forEach(o),Un=m(me),$(ie.$$.fragment,me),En=m(me),$(ae.$$.fragment,me),me.forEach(o),Zn=m(_),I=r(_,"DIV",{class:!0});var C=l(I);$(We.$$.fragment,C),Gn=m(C),yo=r(C,"P",{});var Ms=l(yo);kn=i(Ms,"Instantiate a PyTorch diffusion pipeline from pretrained pipeline weights."),Ms.forEach(o),In=m(C),Je=r(C,"P",{});var qo=l(Je);Wn=i(qo,"The pipeline is set in evaluation mode ("),vo=r(qo,"CODE",{});var Ps=l(vo);Jn=i(Ps,"model.eval()"),Ps.forEach(o),Nn=i(qo,") by default."),qo.forEach(o),Vn=m(C),$(re.$$.fragment,C),Bn=m(C),$(le.$$.fragment,C),Cn=m(C),$(de.$$.fragment,C),C.forEach(o),Fn=m(_),pe=r(_,"DIV",{class:!0});var Ho=l(pe);$(Ne.$$.fragment,Ho),Sn=m(Ho),wo=r(Ho,"P",{});var Ts=l(wo);Rn=i(Ts,"Convert a NumPy image or a batch of images to a PIL image."),Ts.forEach(o),Ho.forEach(o),Xn=m(_),ce=r(_,"DIV",{class:!0});var Qo=l(ce);$(Ve.$$.fragment,Qo),An=m(Qo),Be=r(Qo,"P",{});var Oo=l(Be);Yn=i(Oo,`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
`),He=r(Oo,"A",{href:!0});var js=l(He);zn=i(js,"from_pretrained()"),js.forEach(o),Ln=i(Oo," class method."),Oo.forEach(o),Qo.forEach(o),_.forEach(o),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(Rs)),g(c,"id","pipelines"),g(c,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(c,"href","#pipelines"),g(p,"class","relative group"),g(k,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),g(S,"href","https://huggingface.co/models?library=diffusers"),g(S,"rel","nofollow"),g(Re,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),g(Xe,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained"),g(Ae,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.save_pretrained"),g(q,"id","diffusers.DiffusionPipeline"),g(q,"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"),g(q,"href","#diffusers.DiffusionPipeline"),g(X,"class","relative group"),g(ze,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),g(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(De,"href","https://facebookresearch.github.io/xformers/"),g(De,"rel","nofollow"),g(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ie,"href","https://facebookresearch.github.io/xformers/"),g(Ie,"rel","nofollow"),g(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(He,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline.from_pretrained"),g(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,v){e(document.head,d),D(t,y,v),D(t,p,v),e(p,c),e(c,b),x(n,b,null),e(p,u),e(p,G),e(G,U),D(t,j,v),D(t,E,v),e(E,W),e(E,k),e(k,Fe),e(E,Se),e(E,S),e(S,nt),e(E,st),D(t,Uo,v),x(z,t,v),D(t,Eo,v),D(t,N,v),e(N,it),e(N,Re),e(Re,at),e(N,rt),e(N,Xe),e(Xe,lt),e(N,dt),e(N,Ke),e(Ke,pt),e(N,ct),D(t,Zo,v),D(t,L,v),e(L,ft),e(L,Ae),e(Ae,mt),e(L,ut),D(t,Go,v),D(t,X,v),e(X,q),e(q,eo),x(ue,eo,null),e(X,ht),e(X,oo),e(oo,gt),D(t,ko,v),D(t,h,v),x(he,h,null),e(h,_t),e(h,to),e(to,bt),e(h,yt),e(h,Ye),e(Ye,ze),e(ze,vt),e(Ye,wt),e(h,$t),e(h,ge),e(ge,no),e(no,xt),e(ge,Mt),e(ge,so),e(so,Pt),e(h,Tt),e(h,io),e(io,jt),e(h,Dt),e(h,_e),e(_e,H),e(H,ao),e(ao,Ut),e(H,Et),e(H,ro),e(ro,Zt),e(H,Gt),e(_e,kt),e(_e,Q),e(Q,lo),e(lo,It),e(Q,Wt),e(Q,po),e(po,Jt),e(Q,Nt),e(h,Vt),e(h,O),x(be,O,null),e(O,Bt),e(O,co),e(co,Ct),e(h,Ft),e(h,Le),x(ye,Le,null),e(h,St),e(h,qe),x(ve,qe,null),e(h,Rt),e(h,V),x(we,V,null),e(V,Xt),e(V,$e),e($e,At),e($e,fo),e(fo,Yt),e($e,zt),e(V,Lt),e(V,xe),e(xe,qt),e(xe,mo),e(mo,Ht),e(xe,Qt),e(V,Ot),x(K,V,null),e(h,Kt),e(h,ee),x(Me,ee,null),e(ee,en),e(ee,Pe),e(Pe,on),e(Pe,uo),e(uo,tn),e(Pe,nn),e(h,sn),e(h,oe),x(Te,oe,null),e(oe,an),e(oe,je),e(je,rn),e(je,De),e(De,ln),e(je,dn),e(h,pn),e(h,R),x(Ue,R,null),e(R,cn),e(R,ho),e(ho,fn),e(R,mn),x(te,R,null),e(h,un),e(h,ne),x(Ee,ne,null),e(ne,hn),e(ne,go),e(go,gn),e(h,_n),e(h,se),x(Ze,se,null),e(se,bn),e(se,A),e(A,yn),e(A,_o),e(_o,vn),e(A,wn),e(A,bo),e(bo,$n),e(A,xn),e(h,Mn),e(h,B),x(Ge,B,null),e(B,Pn),e(B,ke),e(ke,Tn),e(ke,Ie),e(Ie,jn),e(ke,Dn),e(B,Un),x(ie,B,null),e(B,En),x(ae,B,null),e(h,Zn),e(h,I),x(We,I,null),e(I,Gn),e(I,yo),e(yo,kn),e(I,In),e(I,Je),e(Je,Wn),e(Je,vo),e(vo,Jn),e(Je,Nn),e(I,Vn),x(re,I,null),e(I,Bn),x(le,I,null),e(I,Cn),x(de,I,null),e(h,Fn),e(h,pe),x(Ne,pe,null),e(pe,Sn),e(pe,wo),e(wo,Rn),e(h,Xn),e(h,ce),x(Ve,ce,null),e(ce,An),e(ce,Be),e(Be,Yn),e(Be,He),e(He,zn),e(Be,Ln),Io=!0},p(t,[v]){const Ce={};v&2&&(Ce.$$scope={dirty:v,ctx:t}),z.$set(Ce);const $o={};v&2&&($o.$$scope={dirty:v,ctx:t}),K.$set($o);const xo={};v&2&&(xo.$$scope={dirty:v,ctx:t}),te.$set(xo);const Mo={};v&2&&(Mo.$$scope={dirty:v,ctx:t}),ie.$set(Mo);const Y={};v&2&&(Y.$$scope={dirty:v,ctx:t}),ae.$set(Y);const Po={};v&2&&(Po.$$scope={dirty:v,ctx:t}),re.$set(Po);const To={};v&2&&(To.$$scope={dirty:v,ctx:t}),le.$set(To);const F={};v&2&&(F.$$scope={dirty:v,ctx:t}),de.$set(F)},i(t){Io||(M(n.$$.fragment,t),M(z.$$.fragment,t),M(ue.$$.fragment,t),M(he.$$.fragment,t),M(be.$$.fragment,t),M(ye.$$.fragment,t),M(ve.$$.fragment,t),M(we.$$.fragment,t),M(K.$$.fragment,t),M(Me.$$.fragment,t),M(Te.$$.fragment,t),M(Ue.$$.fragment,t),M(te.$$.fragment,t),M(Ee.$$.fragment,t),M(Ze.$$.fragment,t),M(Ge.$$.fragment,t),M(ie.$$.fragment,t),M(ae.$$.fragment,t),M(We.$$.fragment,t),M(re.$$.fragment,t),M(le.$$.fragment,t),M(de.$$.fragment,t),M(Ne.$$.fragment,t),M(Ve.$$.fragment,t),Io=!0)},o(t){P(n.$$.fragment,t),P(z.$$.fragment,t),P(ue.$$.fragment,t),P(he.$$.fragment,t),P(be.$$.fragment,t),P(ye.$$.fragment,t),P(ve.$$.fragment,t),P(we.$$.fragment,t),P(K.$$.fragment,t),P(Me.$$.fragment,t),P(Te.$$.fragment,t),P(Ue.$$.fragment,t),P(te.$$.fragment,t),P(Ee.$$.fragment,t),P(Ze.$$.fragment,t),P(Ge.$$.fragment,t),P(ie.$$.fragment,t),P(ae.$$.fragment,t),P(We.$$.fragment,t),P(re.$$.fragment,t),P(le.$$.fragment,t),P(de.$$.fragment,t),P(Ne.$$.fragment,t),P(Ve.$$.fragment,t),Io=!1},d(t){o(d),t&&o(y),t&&o(p),T(n),t&&o(j),t&&o(E),t&&o(Uo),T(z,t),t&&o(Eo),t&&o(N),t&&o(Zo),t&&o(L),t&&o(Go),t&&o(X),T(ue),t&&o(ko),t&&o(h),T(he),T(be),T(ye),T(ve),T(we),T(K),T(Me),T(Te),T(Ue),T(te),T(Ee),T(Ze),T(Ge),T(ie),T(ae),T(We),T(re),T(le),T(de),T(Ne),T(Ve)}}}const Rs={local:"pipelines",sections:[{local:"diffusers.DiffusionPipeline",title:"DiffusionPipeline"}],title:"Pipelines"};function Xs(Z){return ks(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Qs extends Us{constructor(d){super();Es(this,d,Xs,Ss,Zs,{})}}export{Qs as default,Rs as metadata};
