import{S as Qd,i as Zd,s as ef,e as i,k as c,w as P,t,M as tf,c as a,d as n,m,a as s,x as D,h as o,b as _,G as e,g as E,y as x,q as k,o as I,B as C,v as of,L as fl}from"../../chunks/vendor-hf-doc-builder.js";import{T as Te}from"../../chunks/Tip-hf-doc-builder.js";import{D as V}from"../../chunks/Docstring-hf-doc-builder.js";import{C as pl}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Bn}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as dl}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function nf(A){let l;return{c(){l=t("One should not use the Diffusion Pipeline class for training or fine-tuning a diffusion model. Individual \n	components of diffusion pipelines are usually trained individually, so we suggest to directly work \n	with `UNetModel` and `UNetConditionModel`.")},l(v){l=o(v,"One should not use the Diffusion Pipeline class for training or fine-tuning a diffusion model. Individual \n	components of diffusion pipelines are usually trained individually, so we suggest to directly work \n	with `UNetModel` and `UNetConditionModel`.")},m(v,u){E(v,l,u)},d(v){v&&n(l)}}}function af(A){let l,v,u,h,$;return h=new pl({props:{code:`from diffusers import (
    StableDiffusionPipeline,
    StableDiffusionImg2ImgPipeline,
    StableDiffusionInpaintPipeline,
)

text2img = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
img2img = StableDiffusionImg2ImgPipeline(**text2img.components)
inpaint = StableDiffusionInpaintPipeline(**text2img.components)`,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(){l=i("p"),v=t("Examples:"),u=c(),P(h.$$.fragment)},l(d){l=a(d,"P",{});var g=s(l);v=o(g,"Examples:"),g.forEach(n),u=m(d),D(h.$$.fragment,d)},m(d,g){E(d,l,g),e(l,v),E(d,u,g),x(h,d,g),$=!0},p:fl,i(d){$||(k(h.$$.fragment,d),$=!0)},o(d){I(h.$$.fragment,d),$=!1},d(d){d&&n(l),d&&n(u),C(h,d)}}}function sf(A){let l,v;return{c(){l=i("p"),v=t("This is an experimental feature and is likely to change in the future.")},l(u){l=a(u,"P",{});var h=s(l);v=o(h,"This is an experimental feature and is likely to change in the future."),h.forEach(n)},m(u,h){E(u,l,h),e(l,v)},d(u){u&&n(l)}}}function rf(A){let l,v,u,h,$;return{c(){l=i("p"),v=t("It is required that the model repo has a file, called "),u=i("code"),h=t("pipeline.py"),$=t(` that defines the custom
pipeline.`)},l(d){l=a(d,"P",{});var g=s(l);v=o(g,"It is required that the model repo has a file, called "),u=a(g,"CODE",{});var O=s(u);h=o(O,"pipeline.py"),O.forEach(n),$=o(g,` that defines the custom
pipeline.`),g.forEach(n)},m(d,g){E(d,l,g),e(l,v),e(l,u),e(u,h),e(l,$)},d(d){d&&n(l)}}}function lf(A){let l,v,u,h,$;return{c(){l=i("p"),v=t("Community pipelines are always loaded from the current "),u=i("code"),h=t("main"),$=t(" branch of GitHub.")},l(d){l=a(d,"P",{});var g=s(l);v=o(g,"Community pipelines are always loaded from the current "),u=a(g,"CODE",{});var O=s(u);h=o(O,"main"),O.forEach(n),$=o(g," branch of GitHub."),g.forEach(n)},m(d,g){E(d,l,g),e(l,v),e(l,u),e(u,h),e(l,$)},d(d){d&&n(l)}}}function df(A){let l,v,u,h,$;return{c(){l=i("p"),v=t("It is required that the directory has a file, called "),u=i("code"),h=t("pipeline.py"),$=t(` that defines the custom
pipeline.`)},l(d){l=a(d,"P",{});var g=s(l);v=o(g,"It is required that the directory has a file, called "),u=a(g,"CODE",{});var O=s(u);h=o(O,"pipeline.py"),O.forEach(n),$=o(g,` that defines the custom
pipeline.`),g.forEach(n)},m(d,g){E(d,l,g),e(l,v),e(l,u),e(u,h),e(l,$)},d(d){d&&n(l)}}}function ff(A){let l,v,u,h,$,d,g;return{c(){l=i("p"),v=t("It is required to be logged in ("),u=i("code"),h=t("huggingface-cli login"),$=t(") when you want to use private or "),d=i("a"),g=t(`gated
models`),this.h()},l(O){l=a(O,"P",{});var q=s(l);v=o(q,"It is required to be logged in ("),u=a(q,"CODE",{});var U=s(u);h=o(U,"huggingface-cli login"),U.forEach(n),$=o(q,") when you want to use private or "),d=a(q,"A",{href:!0,rel:!0});var M=s(d);g=o(M,`gated
models`),M.forEach(n),q.forEach(n),this.h()},h(){_(d,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),_(d,"rel","nofollow")},m(O,q){E(O,l,q),e(l,v),e(l,u),e(u,h),e(l,$),e(l,d),e(d,g)},d(O){O&&n(l)}}}function pf(A){let l,v,u,h,$;return h=new pl({props:{code:`import torch
from diffusers import DiffusionPipeline
from xformers.ops import MemoryEfficientAttentionFlashAttentionOp

pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-2-1", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
# Workaround for not accepting attention shape using VAE for Flash Attention
pipe.vae.enable_xformers_memory_efficient_attention(attention_op=None)`,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(){l=i("p"),v=t("Examples:"),u=c(),P(h.$$.fragment)},l(d){l=a(d,"P",{});var g=s(l);v=o(g,"Examples:"),g.forEach(n),u=m(d),D(h.$$.fragment,d)},m(d,g){E(d,l,g),e(l,v),E(d,u,g),x(h,d,g),$=!0},p:fl,i(d){$||(k(h.$$.fragment,d),$=!0)},o(d){I(h.$$.fragment,d),$=!1},d(d){d&&n(l),d&&n(u),C(h,d)}}}function cf(A){let l,v,u,h,$,d,g,O,q,U,M,Q,Y;return{c(){l=i("p"),v=t("It is required to be logged in ("),u=i("code"),h=t("huggingface-cli login"),$=t(") when you want to use private or "),d=i("a"),g=t(`gated
models`),O=t(", "),q=i("em"),U=t("e.g."),M=c(),Q=i("code"),Y=t('"runwayml/stable-diffusion-v1-5"'),this.h()},l(Z){l=a(Z,"P",{});var N=s(l);v=o(N,"It is required to be logged in ("),u=a(N,"CODE",{});var B=s(u);h=o(B,"huggingface-cli login"),B.forEach(n),$=o(N,") when you want to use private or "),d=a(N,"A",{href:!0,rel:!0});var mt=s(d);g=o(mt,`gated
models`),mt.forEach(n),O=o(N,", "),q=a(N,"EM",{});var ut=s(q);U=o(ut,"e.g."),ut.forEach(n),M=m(N),Q=a(N,"CODE",{});var je=s(Q);Y=o(je,'"runwayml/stable-diffusion-v1-5"'),je.forEach(n),N.forEach(n),this.h()},h(){_(d,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),_(d,"rel","nofollow")},m(Z,N){E(Z,l,N),e(l,v),e(l,u),e(u,h),e(l,$),e(l,d),e(d,g),e(l,O),e(l,q),e(q,U),e(l,M),e(l,Q),e(Q,Y)},d(Z){Z&&n(l)}}}function mf(A){let l,v,u,h,$;return{c(){l=i("p"),v=t("Activate the special "),u=i("a"),h=t("\u201Coffline-mode\u201D"),$=t(` to use
this method in a firewalled environment.`),this.h()},l(d){l=a(d,"P",{});var g=s(l);v=o(g,"Activate the special "),u=a(g,"A",{href:!0,rel:!0});var O=s(u);h=o(O,"\u201Coffline-mode\u201D"),O.forEach(n),$=o(g,` to use
this method in a firewalled environment.`),g.forEach(n),this.h()},h(){_(u,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),_(u,"rel","nofollow")},m(d,g){E(d,l,g),e(l,v),e(l,u),e(u,h),e(l,$)},d(d){d&&n(l)}}}function uf(A){let l,v,u,h,$;return h=new pl({props:{code:`from diffusers import DiffusionPipeline

# Download pipeline from huggingface.co and cache.
pipeline = DiffusionPipeline.from_pretrained("CompVis/ldm-text2im-large-256")

# Download pipeline that requires an authorization token
# For more information on access tokens, please refer to this section
# of the documentation](https://huggingface.co/docs/hub/security-tokens)
pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")

# Use a different scheduler
from diffusers import LMSDiscreteScheduler

scheduler = LMSDiscreteScheduler.from_config(pipeline.scheduler.config)
pipeline.scheduler = scheduler`,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(){l=i("p"),v=t("Examples:"),u=c(),P(h.$$.fragment)},l(d){l=a(d,"P",{});var g=s(l);v=o(g,"Examples:"),g.forEach(n),u=m(d),D(h.$$.fragment,d)},m(d,g){E(d,l,g),e(l,v),E(d,u,g),x(h,d,g),$=!0},p:fl,i(d){$||(k(h.$$.fragment,d),$=!0)},o(d){I(h.$$.fragment,d),$=!1},d(d){d&&n(l),d&&n(u),C(h,d)}}}function hf(A){let l,v,u,h,$,d,g,O,q,U,M,Q,Y,Z,N,B,mt,ut,je,de,_n,L,Rn,ht,Jn,Kn,It,Qn,Zn,gt,ei,ti,Ct,oi,ni,Ot,ii,ai,At,si,ri,vn,fe,li,_t,di,fi,bn,ee,pe,Tt,Le,pi,jt,ci,$n,y,Se,mi,Lt,ui,hi,vt,bt,gi,_i,vi,qe,St,bi,$i,qt,yi,wi,Mt,Ei,Pi,Me,ce,Wt,Di,xi,Ft,ki,Ii,Ci,me,Nt,Oi,Ai,zt,Ti,ji,Li,ue,We,Si,Vt,qi,Mi,$t,Fe,Wi,yt,Ne,Fi,R,ze,Ni,Ve,zi,Ht,Vi,Hi,Xi,he,Ui,ge,He,Gi,Xe,Yi,Xt,Bi,Ri,Ji,_e,Ue,Ki,Ut,Qi,Zi,T,Ge,ea,Gt,ta,oa,te,na,Yt,ia,aa,Bt,sa,ra,la,ve,da,Rt,fa,pa,oe,Ye,G,ca,Jt,ma,ua,Be,ha,ga,Kt,_a,va,ba,be,$a,Re,z,ya,Qt,wa,Ea,Je,Pa,Da,Zt,xa,ka,eo,Ia,Ca,to,Oa,Aa,Ta,$e,ja,Ke,ne,La,oo,Sa,qa,no,Ma,Wa,Fa,ye,Na,wt,za,Qe,Va,Ha,f,Xa,io,Ua,Ga,ao,Ya,Ba,so,Ra,Ja,ro,Ka,Qa,lo,Za,es,fo,ts,os,po,ns,is,co,as,ss,mo,rs,ls,uo,ds,fs,ho,ps,cs,go,ms,us,_o,hs,gs,vo,_s,vs,bo,bs,$s,$o,ys,ws,yo,Es,Ps,wo,Ds,xs,Eo,ks,Is,Po,Cs,Os,Do,As,Ts,xo,js,Ls,ko,Ss,qs,Io,Ms,Ws,Co,Fs,Ns,Oo,zs,Vs,Ao,Hs,Xs,To,Us,Gs,jo,Ys,Bs,Lo,Rs,Js,So,Ks,Qs,qo,Zs,er,Mo,tr,or,Wo,nr,ir,Fo,ar,sr,No,rr,lr,zo,dr,fr,Vo,pr,cr,mr,we,ur,J,Ze,hr,Ho,gr,_r,Xo,vr,br,H,et,$r,Uo,yr,wr,Go,Er,Pr,Yo,Dr,xr,Ee,kr,j,tt,Ir,Bo,Cr,Or,ot,Ar,Ro,Tr,jr,Lr,nt,Sr,Jo,qr,Mr,Wr,it,Fr,Ko,Nr,zr,Vr,Pe,Hr,De,Xr,xe,Ur,ke,at,Gr,Qo,Yr,Br,Ie,st,Rr,rt,Jr,Zo,Kr,Qr,yn,ie,Ce,en,lt,Zr,tn,el,wn,ae,dt,tl,on,ol,En,se,Oe,nn,ft,nl,an,il,Pn,re,pt,al,sn,sl,Dn;return d=new Bn({}),de=new Te({props:{$$slots:{default:[nf]},$$scope:{ctx:A}}}),Le=new Bn({}),Se=new V({props:{name:"class diffusers.DiffusionPipeline",anchor:"diffusers.DiffusionPipeline",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L453"}}),We=new V({props:{name:"__call__",anchor:"diffusers.DiffusionPipeline.__call__",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}}),Fe=new V({props:{name:"device",anchor:"diffusers.DiffusionPipeline.device",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L687",returnDescription:`
<p>The torch device on which the pipeline is located.</p>
`,returnType:`
<p><code>torch.device</code></p>
`}}),Ne=new V({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.16.0/src/diffusers/pipelines/pipeline_utils.py#L612"}}),ze=new V({props:{name:"components",anchor:"diffusers.DiffusionPipeline.components",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L1356",returnDescription:`
<p>A dictionary containing all the modules needed to initialize the pipeline.</p>
`}}),he=new dl({props:{anchor:"diffusers.DiffusionPipeline.components.example",$$slots:{default:[af]},$$scope:{ctx:A}}}),He=new V({props:{name:"disable_attention_slicing",anchor:"diffusers.DiffusionPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L1492"}}),Ue=new V({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.DiffusionPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L1450"}}),Ge=new V({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;
Should be a string, the <em>repo id</em> of a pretrained pipeline hosted inside a model repo on
<a href="https://huggingface.co/" rel="nofollow">https://huggingface.co/</a> Valid repo ids have to be located under a user or organization name, like
<code>CompVis/ldm-text2im-large-256</code>.`,name:"pretrained_model_name"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L1084"}}),ve=new Te({props:{warning:!0,$$slots:{default:[sf]},$$scope:{ctx:A}}}),be=new Te({props:{$$slots:{default:[rf]},$$scope:{ctx:A}}}),$e=new Te({props:{$$slots:{default:[lf]},$$scope:{ctx:A}}}),ye=new Te({props:{$$slots:{default:[df]},$$scope:{ctx:A}}}),we=new Te({props:{$$slots:{default:[ff]},$$scope:{ctx:A}}}),Ze=new V({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.16.0/src/diffusers/pipelines/pipeline_utils.py#L1476"}}),et=new V({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.16.0/src/diffusers/pipelines/pipeline_utils.py#L1418"}}),Ee=new dl({props:{anchor:"diffusers.DiffusionPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[pf]},$$scope:{ctx:A}}}),tt=new V({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> of a pretrained pipeline hosted inside a model repo on
<a href="https://huggingface.co/" rel="nofollow">https://huggingface.co/</a> Valid repo ids have to be located under a user or organization name, like
<code>CompVis/ldm-text2im-large-256</code>.</li>
<li>A path to a <em>directory</em> containing pipeline weights saved using
<a href="/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.save_pretrained">save_pretrained()</a>, e.g., <code>./my_pipeline_directory/</code>.</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 under this dtype. If <code>&quot;auto&quot;</code> is passed the dtype
will be 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>This is an experimental feature and is likely to change in the future.</p>

					</div>
<p>Can be either:</p>
<ul>
<li>
<p>A string, the <em>repo id</em> of a custom pipeline hosted inside a model repo on
<a href="https://huggingface.co/" rel="nofollow">https://huggingface.co/</a>. Valid repo ids have to be located under a user or organization name,
like <code>hf-internal-testing/diffusers-dummy-pipeline</code>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>It is required that the model repo has a file, called <code>pipeline.py</code> that defines the custom
pipeline.</p>

					</div>
</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">https://github.com/huggingface/diffusers/tree/main/examples/community</a>. Valid file names have to
match exactly the file name without <code>.py</code> located under the above link, <em>e.g.</em>
<code>clip_guided_stable_diffusion</code>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>Community pipelines are always loaded from the current <code>main</code> branch of GitHub.</p>

					</div>
</li>
<li>
<p>A path to a <em>directory</em> containing a custom pipeline, e.g., <code>./my_pipeline_directory/</code>.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>It is required that the directory has a file, called <code>pipeline.py</code> that defines the custom
pipeline.</p>

					</div>
</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 in which a downloaded pretrained model configuration should be cached if the
standard cache should not be 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 delete incompletely received files. Will attempt to resume the download if such a
file exists.`,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, e.g., <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(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{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>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>~/.huggingface</code>).`,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, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be 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> when loading from the Hub and to local version of <code>diffusers</code> when loading from GitHub) &#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 diffusers version when loading a
custom pipeline from GitHub.`,name:"custom_revision"},{anchor:"diffusers.DiffusionPipeline.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information. specify the folder name here.`,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 refined to each
parameter/buffer name, once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>To have Accelerate compute the most optimized <code>device_map</code> automatically, set <code>device_map=&quot;auto&quot;</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.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 by not initializing the weights and only loading the pre-trained weights. This
also tries to not use more than 1x model size in CPU memory (including peak memory) while loading the
model. This is only supported when torch version &gt;= 1.9.0. If you are using an older version of torch,
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> ) &#x2014;
If set to <code>True</code>, the pipeline will be loaded from <code>safetensors</code> weights. If set to <code>None</code> (the
default). The pipeline will load using <code>safetensors</code> if the safetensors weights are available <em>and</em> if
<code>safetensors</code> is installed. If the to <code>False</code> the pipeline will <em>not</em> use <code>safetensors</code>.`,name:"use_safetensors"},{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 - <em>i.e.</em> the pipeline components - of the
specific pipeline class. The overwritten components are then directly passed 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;
If specified load weights from <code>variant</code> filename, <em>e.g.</em> pytorch_model.<variant>.bin. <code>variant</code> is
ignored when using <code>from_flax</code>.</variant>`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L702"}}),Pe=new Te({props:{$$slots:{default:[cf]},$$scope:{ctx:A}}}),De=new Te({props:{$$slots:{default:[mf]},$$scope:{ctx:A}}}),xe=new dl({props:{anchor:"diffusers.DiffusionPipeline.from_pretrained.example",$$slots:{default:[uf]},$$scope:{ctx:A}}}),at=new V({props:{name:"numpy_to_pil",anchor:"diffusers.DiffusionPipeline.numpy_to_pil",parameters:[{name:"images",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L1393"}}),st=new V({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 which to save. 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 (that uses <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 pytorch_model.<variant>.bin.</variant>`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L525"}}),lt=new Bn({}),dt=new V({props:{name:"class diffusers.ImagePipelineOutput",anchor:"diffusers.ImagePipelineOutput",parameters:[{name:"images",val:": typing.Union[typing.List[PIL.Image.Image], numpy.ndarray]"}],parametersDescription:[{anchor:"diffusers.ImagePipelineOutput.images",description:`<strong>images</strong> (<code>List[PIL.Image.Image]</code> or <code>np.ndarray</code>) &#x2014;
List of denoised PIL images of length <code>batch_size</code> or numpy array of shape <code>(batch_size, height, width, num_channels)</code>. PIL images or numpy array present the denoised images of the diffusion pipeline.`,name:"images"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L111"}}),ft=new Bn({}),pt=new V({props:{name:"class diffusers.AudioPipelineOutput",anchor:"diffusers.AudioPipelineOutput",parameters:[{name:"audios",val:": ndarray"}],parametersDescription:[{anchor:"diffusers.AudioPipelineOutput.audios",description:`<strong>audios</strong> (<code>np.ndarray</code>) &#x2014;
List of denoised samples of shape <code>(batch_size, num_channels, sample_rate)</code>. Numpy array present the
denoised audio samples of the diffusion pipeline.`,name:"audios"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/pipelines/pipeline_utils.py#L125"}}),{c(){l=i("meta"),v=c(),u=i("h1"),h=i("a"),$=i("span"),P(d.$$.fragment),g=c(),O=i("span"),q=t("Pipelines"),U=c(),M=i("p"),Q=t("The "),Y=i("a"),Z=t("DiffusionPipeline"),N=t(" is the easiest way to load any pretrained diffusion pipeline from the "),B=i("a"),mt=t("Hub"),ut=t(" and to use it in inference."),je=c(),P(de.$$.fragment),_n=c(),L=i("p"),Rn=t("Any diffusion pipeline that is loaded with "),ht=i("a"),Jn=t("from_pretrained()"),Kn=t(` will automatically
detect the pipeline type, `),It=i("em"),Qn=t("e.g."),Zn=c(),gt=i("a"),ei=t("StableDiffusionPipeline"),ti=t(` and consequently load each component of the
pipeline and pass them into the `),Ct=i("code"),oi=t("__init__"),ni=t(" function of the pipeline, "),Ot=i("em"),ii=t("e.g."),ai=c(),At=i("code"),si=t("__init__()"),ri=t("."),vn=c(),fe=i("p"),li=t("Any pipeline object can be saved locally with "),_t=i("a"),di=t("save_pretrained()"),fi=t("."),bn=c(),ee=i("h2"),pe=i("a"),Tt=i("span"),P(Le.$$.fragment),pi=c(),jt=i("span"),ci=t("DiffusionPipeline"),$n=c(),y=i("div"),P(Se.$$.fragment),mi=c(),Lt=i("p"),ui=t("Base class for all models."),hi=c(),vt=i("p"),bt=i("a"),gi=t("DiffusionPipeline"),_i=t(` takes care of storing all components (models, schedulers, processors) for diffusion pipelines
and handles methods for loading, downloading and saving models as well as a few methods common to all pipelines to:`),vi=c(),qe=i("ul"),St=i("li"),bi=t("move all PyTorch modules to the device of your choice"),$i=c(),qt=i("li"),yi=t("enabling/disabling the progress bar for the denoising iteration"),wi=c(),Mt=i("p"),Ei=t("Class attributes:"),Pi=c(),Me=i("ul"),ce=i("li"),Wt=i("strong"),Di=t("config_name"),xi=t(" ("),Ft=i("code"),ki=t("str"),Ii=t(`) \u2014 name of the config file that will store the class and module names of all
components of the diffusion pipeline.`),Ci=c(),me=i("li"),Nt=i("strong"),Oi=t("_optional_components"),Ai=t(" (List"),zt=i("code"),Ti=t("str"),ji=t(`) \u2014 list of all components that are optional so they don\u2019t have to be
passed for the pipeline to function (should be overridden by subclasses).`),Li=c(),ue=i("div"),P(We.$$.fragment),Si=c(),Vt=i("p"),qi=t("Call self as a function."),Mi=c(),$t=i("div"),P(Fe.$$.fragment),Wi=c(),yt=i("div"),P(Ne.$$.fragment),Fi=c(),R=i("div"),P(ze.$$.fragment),Ni=c(),Ve=i("p"),zi=t("The "),Ht=i("code"),Vi=t("self.components"),Hi=t(` property can be useful to run different pipelines with the same weights and
configurations to not have to re-allocate memory.`),Xi=c(),P(he.$$.fragment),Ui=c(),ge=i("div"),P(He.$$.fragment),Gi=c(),Xe=i("p"),Yi=t("Disable sliced attention computation. If "),Xt=i("code"),Bi=t("enable_attention_slicing"),Ri=t(` was previously invoked, this method will go
back to computing attention in one step.`),Ji=c(),_e=i("div"),P(Ue.$$.fragment),Ki=c(),Ut=i("p"),Qi=t("Disable memory efficient attention as implemented in xformers."),Zi=c(),T=i("div"),P(Ge.$$.fragment),ea=c(),Gt=i("p"),ta=t("Download and cache a PyTorch diffusion pipeline from pre-trained pipeline weights."),oa=c(),te=i("p"),na=t("custom_pipeline ("),Yt=i("code"),ia=t("str"),aa=t(", "),Bt=i("em"),sa=t("optional"),ra=t("):"),la=c(),P(ve.$$.fragment),da=c(),Rt=i("p"),fa=t("Can be either:"),pa=c(),oe=i("ul"),Ye=i("li"),G=i("p"),ca=t("A string, the "),Jt=i("em"),ma=t("repo id"),ua=t(` of a custom pipeline hosted inside a model repo on
`),Be=i("a"),ha=t("https://huggingface.co/"),ga=t(`. Valid repo ids have to be located under a user or organization name,
like `),Kt=i("code"),_a=t("hf-internal-testing/diffusers-dummy-pipeline"),va=t("."),ba=c(),P(be.$$.fragment),$a=c(),Re=i("li"),z=i("p"),ya=t("A string, the "),Qt=i("em"),wa=t("file name"),Ea=t(` of a community pipeline hosted on GitHub under
`),Je=i("a"),Pa=t("https://github.com/huggingface/diffusers/tree/main/examples/community"),Da=t(`. Valid file names have to
match exactly the file name without `),Zt=i("code"),xa=t(".py"),ka=t(" located under the above link, "),eo=i("em"),Ia=t("e.g."),Ca=c(),to=i("code"),Oa=t("clip_guided_stable_diffusion"),Aa=t("."),Ta=c(),P($e.$$.fragment),ja=c(),Ke=i("li"),ne=i("p"),La=t("A path to a "),oo=i("em"),Sa=t("directory"),qa=t(" containing a custom pipeline, e.g., "),no=i("code"),Ma=t("./my_pipeline_directory/"),Wa=t("."),Fa=c(),P(ye.$$.fragment),Na=c(),wt=i("p"),za=t("For more information on how to load and create custom pipelines, please have a look at "),Qe=i("a"),Va=t(`Loading and
Adding Custom
Pipelines`),Ha=c(),f=i("p"),Xa=t("force_download ("),io=i("code"),Ua=t("bool"),Ga=t(", "),ao=i("em"),Ya=t("optional"),Ba=t(", defaults to "),so=i("code"),Ra=t("False"),Ja=t(`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.
resume_download (`),ro=i("code"),Ka=t("bool"),Qa=t(", "),lo=i("em"),Za=t("optional"),es=t(", defaults to "),fo=i("code"),ts=t("False"),os=t(`):
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.
proxies (`),po=i("code"),ns=t("Dict[str, str]"),is=t(", "),co=i("em"),as=t("optional"),ss=t(`):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `),mo=i("code"),rs=t("{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}"),ls=t(`. The proxies are used on each request.
output_loading_info(`),uo=i("code"),ds=t("bool"),fs=t(", "),ho=i("em"),ps=t("optional"),cs=t(", defaults to "),go=i("code"),ms=t("False"),us=t(`):
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.
local_files_only(`),_o=i("code"),hs=t("bool"),gs=t(", "),vo=i("em"),_s=t("optional"),vs=t(", defaults to "),bo=i("code"),bs=t("False"),$s=t(`):
Whether or not to only look at local files (i.e., do not try to download the model).
use_auth_token (`),$o=i("code"),ys=t("str"),ws=t(" or "),yo=i("em"),Es=t("bool"),Ps=t(", "),wo=i("em"),Ds=t("optional"),xs=t(`):
The token to use as HTTP bearer authorization for remote files. If `),Eo=i("code"),ks=t("True"),Is=t(`, will use the token generated
when running `),Po=i("code"),Cs=t("huggingface-cli login"),Os=t(" (stored in "),Do=i("code"),As=t("~/.huggingface"),Ts=t(`).
revision (`),xo=i("code"),js=t("str"),Ls=t(", "),ko=i("em"),Ss=t("optional"),qs=t(", defaults to "),Io=i("code"),Ms=t('"main"'),Ws=t(`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `),Co=i("code"),Fs=t("revision"),Ns=t(` can be any
identifier allowed by git.
custom_revision (`),Oo=i("code"),zs=t("str"),Vs=t(", "),Ao=i("em"),Hs=t("optional"),Xs=t(", defaults to "),To=i("code"),Us=t('"main"'),Gs=t(` when loading from the Hub and to local version of
`),jo=i("code"),Ys=t("diffusers"),Bs=t(` when loading from GitHub):
The specific model version to use. It can be a branch name, a tag name, or a commit id similar to
`),Lo=i("code"),Rs=t("revision"),Js=t(` when loading a custom pipeline from the Hub. It can be a diffusers version when loading a
custom pipeline from GitHub.
mirror (`),So=i("code"),Ks=t("str"),Qs=t(", "),qo=i("em"),Zs=t("optional"),er=t(`):
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information. specify the folder name here.
variant (`),Mo=i("code"),tr=t("str"),or=t(", "),Wo=i("em"),nr=t("optional"),ir=t(`):
If specified load weights from `),Fo=i("code"),ar=t("variant"),sr=t(" filename, "),No=i("em"),rr=t("e.g."),lr=t(" pytorch_model.<variant>.bin. "),zo=i("code"),dr=t("variant"),fr=t(` is
ignored when using `),Vo=i("code"),pr=t("from_flax"),cr=t("."),mr=c(),P(we.$$.fragment),ur=c(),J=i("div"),P(Ze.$$.fragment),hr=c(),Ho=i("p"),gr=t("Enable sliced attention computation."),_r=c(),Xo=i("p"),vr=t(`When this option is enabled, the attention module will split 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.`),br=c(),H=i("div"),P(et.$$.fragment),$r=c(),Uo=i("p"),yr=t("Enable memory efficient attention as implemented in xformers."),wr=c(),Go=i("p"),Er=t(`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),Pr=c(),Yo=i("p"),Dr=t(`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),xr=c(),P(Ee.$$.fragment),kr=c(),j=i("div"),P(tt.$$.fragment),Ir=c(),Bo=i("p"),Cr=t("Instantiate a PyTorch diffusion pipeline from pre-trained pipeline weights."),Or=c(),ot=i("p"),Ar=t("The pipeline is set in evaluation mode by default using "),Ro=i("code"),Tr=t("model.eval()"),jr=t(" (Dropout modules are deactivated)."),Lr=c(),nt=i("p"),Sr=t("The warning "),Jo=i("em"),qr=t("Weights from XXX not initialized from pretrained model"),Mr=t(` means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`),Wr=c(),it=i("p"),Fr=t("The warning "),Ko=i("em"),Nr=t("Weights from XXX not used in YYY"),zr=t(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Vr=c(),P(Pe.$$.fragment),Hr=c(),P(De.$$.fragment),Xr=c(),P(xe.$$.fragment),Ur=c(),ke=i("div"),P(at.$$.fragment),Gr=c(),Qo=i("p"),Yr=t("Convert a numpy image or a batch of images to a PIL image."),Br=c(),Ie=i("div"),P(st.$$.fragment),Rr=c(),rt=i("p"),Jr=t(`Save all variables of the pipeline that can be saved and loaded as well as the pipelines configuration file to
a directory. A pipeline variable can be saved and loaded if its class implements both a save and loading
method. The pipeline can easily be re-loaded using the `),Zo=i("code"),Kr=t("[from_pretrained()](/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained)"),Qr=t(" class method."),yn=c(),ie=i("h2"),Ce=i("a"),en=i("span"),P(lt.$$.fragment),Zr=c(),tn=i("span"),el=t("ImagePipelineOutput"),wn=t(`

By default diffusion pipelines return an object of class
`),ae=i("div"),P(dt.$$.fragment),tl=c(),on=i("p"),ol=t("Output class for image pipelines."),En=c(),se=i("h2"),Oe=i("a"),nn=i("span"),P(ft.$$.fragment),nl=c(),an=i("span"),il=t("AudioPipelineOutput"),Pn=t(`

By default diffusion pipelines return an object of class
`),re=i("div"),P(pt.$$.fragment),al=c(),sn=i("p"),sl=t("Output class for audio pipelines."),this.h()},l(r){const b=tf('[data-svelte="svelte-1phssyn"]',document.head);l=a(b,"META",{name:!0,content:!0}),b.forEach(n),v=m(r),u=a(r,"H1",{class:!0});var ct=s(u);h=a(ct,"A",{id:!0,class:!0,href:!0});var rn=s(h);$=a(rn,"SPAN",{});var ln=s($);D(d.$$.fragment,ln),ln.forEach(n),rn.forEach(n),g=m(ct),O=a(ct,"SPAN",{});var dn=s(O);q=o(dn,"Pipelines"),dn.forEach(n),ct.forEach(n),U=m(r),M=a(r,"P",{});var le=s(M);Q=o(le,"The "),Y=a(le,"A",{href:!0});var fn=s(Y);Z=o(fn,"DiffusionPipeline"),fn.forEach(n),N=o(le," is the easiest way to load any pretrained diffusion pipeline from the "),B=a(le,"A",{href:!0,rel:!0});var pn=s(B);mt=o(pn,"Hub"),pn.forEach(n),ut=o(le," and to use it in inference."),le.forEach(n),je=m(r),D(de.$$.fragment,r),_n=m(r),L=a(r,"P",{});var W=s(L);Rn=o(W,"Any diffusion pipeline that is loaded with "),ht=a(W,"A",{href:!0});var cn=s(ht);Jn=o(cn,"from_pretrained()"),cn.forEach(n),Kn=o(W,` will automatically
detect the pipeline type, `),It=a(W,"EM",{});var mn=s(It);Qn=o(mn,"e.g."),mn.forEach(n),Zn=m(W),gt=a(W,"A",{href:!0});var un=s(gt);ei=o(un,"StableDiffusionPipeline"),un.forEach(n),ti=o(W,` and consequently load each component of the
pipeline and pass them into the `),Ct=a(W,"CODE",{});var cl=s(Ct);oi=o(cl,"__init__"),cl.forEach(n),ni=o(W," function of the pipeline, "),Ot=a(W,"EM",{});var ml=s(Ot);ii=o(ml,"e.g."),ml.forEach(n),ai=m(W),At=a(W,"CODE",{});var ul=s(At);si=o(ul,"__init__()"),ul.forEach(n),ri=o(W,"."),W.forEach(n),vn=m(r),fe=a(r,"P",{});var xn=s(fe);li=o(xn,"Any pipeline object can be saved locally with "),_t=a(xn,"A",{href:!0});var hl=s(_t);di=o(hl,"save_pretrained()"),hl.forEach(n),fi=o(xn,"."),xn.forEach(n),bn=m(r),ee=a(r,"H2",{class:!0});var kn=s(ee);pe=a(kn,"A",{id:!0,class:!0,href:!0});var gl=s(pe);Tt=a(gl,"SPAN",{});var _l=s(Tt);D(Le.$$.fragment,_l),_l.forEach(n),gl.forEach(n),pi=m(kn),jt=a(kn,"SPAN",{});var vl=s(jt);ci=o(vl,"DiffusionPipeline"),vl.forEach(n),kn.forEach(n),$n=m(r),y=a(r,"DIV",{class:!0});var w=s(y);D(Se.$$.fragment,w),mi=m(w),Lt=a(w,"P",{});var bl=s(Lt);ui=o(bl,"Base class for all models."),bl.forEach(n),hi=m(w),vt=a(w,"P",{});var rl=s(vt);bt=a(rl,"A",{href:!0});var $l=s(bt);gi=o($l,"DiffusionPipeline"),$l.forEach(n),_i=o(rl,` takes care of storing all components (models, schedulers, processors) for diffusion pipelines
and handles methods for loading, downloading and saving models as well as a few methods common to all pipelines to:`),rl.forEach(n),vi=m(w),qe=a(w,"UL",{});var In=s(qe);St=a(In,"LI",{});var yl=s(St);bi=o(yl,"move all PyTorch modules to the device of your choice"),yl.forEach(n),$i=m(In),qt=a(In,"LI",{});var wl=s(qt);yi=o(wl,"enabling/disabling the progress bar for the denoising iteration"),wl.forEach(n),In.forEach(n),wi=m(w),Mt=a(w,"P",{});var El=s(Mt);Ei=o(El,"Class attributes:"),El.forEach(n),Pi=m(w),Me=a(w,"UL",{});var Cn=s(Me);ce=a(Cn,"LI",{});var hn=s(ce);Wt=a(hn,"STRONG",{});var Pl=s(Wt);Di=o(Pl,"config_name"),Pl.forEach(n),xi=o(hn," ("),Ft=a(hn,"CODE",{});var Dl=s(Ft);ki=o(Dl,"str"),Dl.forEach(n),Ii=o(hn,`) \u2014 name of the config file that will store the class and module names of all
components of the diffusion pipeline.`),hn.forEach(n),Ci=m(Cn),me=a(Cn,"LI",{});var gn=s(me);Nt=a(gn,"STRONG",{});var xl=s(Nt);Oi=o(xl,"_optional_components"),xl.forEach(n),Ai=o(gn," (List"),zt=a(gn,"CODE",{});var kl=s(zt);Ti=o(kl,"str"),kl.forEach(n),ji=o(gn,`) \u2014 list of all components that are optional so they don\u2019t have to be
passed for the pipeline to function (should be overridden by subclasses).`),gn.forEach(n),Cn.forEach(n),Li=m(w),ue=a(w,"DIV",{class:!0});var On=s(ue);D(We.$$.fragment,On),Si=m(On),Vt=a(On,"P",{});var Il=s(Vt);qi=o(Il,"Call self as a function."),Il.forEach(n),On.forEach(n),Mi=m(w),$t=a(w,"DIV",{class:!0});var Cl=s($t);D(Fe.$$.fragment,Cl),Cl.forEach(n),Wi=m(w),yt=a(w,"DIV",{class:!0});var Ol=s(yt);D(Ne.$$.fragment,Ol),Ol.forEach(n),Fi=m(w),R=a(w,"DIV",{class:!0});var Et=s(R);D(ze.$$.fragment,Et),Ni=m(Et),Ve=a(Et,"P",{});var An=s(Ve);zi=o(An,"The "),Ht=a(An,"CODE",{});var Al=s(Ht);Vi=o(Al,"self.components"),Al.forEach(n),Hi=o(An,` property can be useful to run different pipelines with the same weights and
configurations to not have to re-allocate memory.`),An.forEach(n),Xi=m(Et),D(he.$$.fragment,Et),Et.forEach(n),Ui=m(w),ge=a(w,"DIV",{class:!0});var Tn=s(ge);D(He.$$.fragment,Tn),Gi=m(Tn),Xe=a(Tn,"P",{});var jn=s(Xe);Yi=o(jn,"Disable sliced attention computation. If "),Xt=a(jn,"CODE",{});var Tl=s(Xt);Bi=o(Tl,"enable_attention_slicing"),Tl.forEach(n),Ri=o(jn,` was previously invoked, this method will go
back to computing attention in one step.`),jn.forEach(n),Tn.forEach(n),Ji=m(w),_e=a(w,"DIV",{class:!0});var Ln=s(_e);D(Ue.$$.fragment,Ln),Ki=m(Ln),Ut=a(Ln,"P",{});var jl=s(Ut);Qi=o(jl,"Disable memory efficient attention as implemented in xformers."),jl.forEach(n),Ln.forEach(n),Zi=m(w),T=a(w,"DIV",{class:!0});var S=s(T);D(Ge.$$.fragment,S),ea=m(S),Gt=a(S,"P",{});var Ll=s(Gt);ta=o(Ll,"Download and cache a PyTorch diffusion pipeline from pre-trained pipeline weights."),Ll.forEach(n),oa=m(S),te=a(S,"P",{});var Pt=s(te);na=o(Pt,"custom_pipeline ("),Yt=a(Pt,"CODE",{});var Sl=s(Yt);ia=o(Sl,"str"),Sl.forEach(n),aa=o(Pt,", "),Bt=a(Pt,"EM",{});var ql=s(Bt);sa=o(ql,"optional"),ql.forEach(n),ra=o(Pt,"):"),Pt.forEach(n),la=m(S),D(ve.$$.fragment,S),da=m(S),Rt=a(S,"P",{});var Ml=s(Rt);fa=o(Ml,"Can be either:"),Ml.forEach(n),pa=m(S),oe=a(S,"UL",{});var Dt=s(oe);Ye=a(Dt,"LI",{});var Sn=s(Ye);G=a(Sn,"P",{});var Ae=s(G);ca=o(Ae,"A string, the "),Jt=a(Ae,"EM",{});var Wl=s(Jt);ma=o(Wl,"repo id"),Wl.forEach(n),ua=o(Ae,` of a custom pipeline hosted inside a model repo on
`),Be=a(Ae,"A",{href:!0,rel:!0});var Fl=s(Be);ha=o(Fl,"https://huggingface.co/"),Fl.forEach(n),ga=o(Ae,`. Valid repo ids have to be located under a user or organization name,
like `),Kt=a(Ae,"CODE",{});var Nl=s(Kt);_a=o(Nl,"hf-internal-testing/diffusers-dummy-pipeline"),Nl.forEach(n),va=o(Ae,"."),Ae.forEach(n),ba=m(Sn),D(be.$$.fragment,Sn),Sn.forEach(n),$a=m(Dt),Re=a(Dt,"LI",{});var qn=s(Re);z=a(qn,"P",{});var X=s(z);ya=o(X,"A string, the "),Qt=a(X,"EM",{});var zl=s(Qt);wa=o(zl,"file name"),zl.forEach(n),Ea=o(X,` of a community pipeline hosted on GitHub under
`),Je=a(X,"A",{href:!0,rel:!0});var Vl=s(Je);Pa=o(Vl,"https://github.com/huggingface/diffusers/tree/main/examples/community"),Vl.forEach(n),Da=o(X,`. Valid file names have to
match exactly the file name without `),Zt=a(X,"CODE",{});var Hl=s(Zt);xa=o(Hl,".py"),Hl.forEach(n),ka=o(X," located under the above link, "),eo=a(X,"EM",{});var Xl=s(eo);Ia=o(Xl,"e.g."),Xl.forEach(n),Ca=m(X),to=a(X,"CODE",{});var Ul=s(to);Oa=o(Ul,"clip_guided_stable_diffusion"),Ul.forEach(n),Aa=o(X,"."),X.forEach(n),Ta=m(qn),D($e.$$.fragment,qn),qn.forEach(n),ja=m(Dt),Ke=a(Dt,"LI",{});var Mn=s(Ke);ne=a(Mn,"P",{});var xt=s(ne);La=o(xt,"A path to a "),oo=a(xt,"EM",{});var Gl=s(oo);Sa=o(Gl,"directory"),Gl.forEach(n),qa=o(xt," containing a custom pipeline, e.g., "),no=a(xt,"CODE",{});var Yl=s(no);Ma=o(Yl,"./my_pipeline_directory/"),Yl.forEach(n),Wa=o(xt,"."),xt.forEach(n),Fa=m(Mn),D(ye.$$.fragment,Mn),Mn.forEach(n),Dt.forEach(n),Na=m(S),wt=a(S,"P",{});var ll=s(wt);za=o(ll,"For more information on how to load and create custom pipelines, please have a look at "),Qe=a(ll,"A",{href:!0,rel:!0});var Bl=s(Qe);Va=o(Bl,`Loading and
Adding Custom
Pipelines`),Bl.forEach(n),ll.forEach(n),Ha=m(S),f=a(S,"P",{});var p=s(f);Xa=o(p,"force_download ("),io=a(p,"CODE",{});var Rl=s(io);Ua=o(Rl,"bool"),Rl.forEach(n),Ga=o(p,", "),ao=a(p,"EM",{});var Jl=s(ao);Ya=o(Jl,"optional"),Jl.forEach(n),Ba=o(p,", defaults to "),so=a(p,"CODE",{});var Kl=s(so);Ra=o(Kl,"False"),Kl.forEach(n),Ja=o(p,`):
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.
resume_download (`),ro=a(p,"CODE",{});var Ql=s(ro);Ka=o(Ql,"bool"),Ql.forEach(n),Qa=o(p,", "),lo=a(p,"EM",{});var Zl=s(lo);Za=o(Zl,"optional"),Zl.forEach(n),es=o(p,", defaults to "),fo=a(p,"CODE",{});var ed=s(fo);ts=o(ed,"False"),ed.forEach(n),os=o(p,`):
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.
proxies (`),po=a(p,"CODE",{});var td=s(po);ns=o(td,"Dict[str, str]"),td.forEach(n),is=o(p,", "),co=a(p,"EM",{});var od=s(co);as=o(od,"optional"),od.forEach(n),ss=o(p,`):
A dictionary of proxy servers to use by protocol or endpoint, e.g., `),mo=a(p,"CODE",{});var nd=s(mo);rs=o(nd,"{'http': 'foo.bar:3128', 'http://hostname': 'foo.bar:4012'}"),nd.forEach(n),ls=o(p,`. The proxies are used on each request.
output_loading_info(`),uo=a(p,"CODE",{});var id=s(uo);ds=o(id,"bool"),id.forEach(n),fs=o(p,", "),ho=a(p,"EM",{});var ad=s(ho);ps=o(ad,"optional"),ad.forEach(n),cs=o(p,", defaults to "),go=a(p,"CODE",{});var sd=s(go);ms=o(sd,"False"),sd.forEach(n),us=o(p,`):
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.
local_files_only(`),_o=a(p,"CODE",{});var rd=s(_o);hs=o(rd,"bool"),rd.forEach(n),gs=o(p,", "),vo=a(p,"EM",{});var ld=s(vo);_s=o(ld,"optional"),ld.forEach(n),vs=o(p,", defaults to "),bo=a(p,"CODE",{});var dd=s(bo);bs=o(dd,"False"),dd.forEach(n),$s=o(p,`):
Whether or not to only look at local files (i.e., do not try to download the model).
use_auth_token (`),$o=a(p,"CODE",{});var fd=s($o);ys=o(fd,"str"),fd.forEach(n),ws=o(p," or "),yo=a(p,"EM",{});var pd=s(yo);Es=o(pd,"bool"),pd.forEach(n),Ps=o(p,", "),wo=a(p,"EM",{});var cd=s(wo);Ds=o(cd,"optional"),cd.forEach(n),xs=o(p,`):
The token to use as HTTP bearer authorization for remote files. If `),Eo=a(p,"CODE",{});var md=s(Eo);ks=o(md,"True"),md.forEach(n),Is=o(p,`, will use the token generated
when running `),Po=a(p,"CODE",{});var ud=s(Po);Cs=o(ud,"huggingface-cli login"),ud.forEach(n),Os=o(p," (stored in "),Do=a(p,"CODE",{});var hd=s(Do);As=o(hd,"~/.huggingface"),hd.forEach(n),Ts=o(p,`).
revision (`),xo=a(p,"CODE",{});var gd=s(xo);js=o(gd,"str"),gd.forEach(n),Ls=o(p,", "),ko=a(p,"EM",{});var _d=s(ko);Ss=o(_d,"optional"),_d.forEach(n),qs=o(p,", defaults to "),Io=a(p,"CODE",{});var vd=s(Io);Ms=o(vd,'"main"'),vd.forEach(n),Ws=o(p,`):
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so `),Co=a(p,"CODE",{});var bd=s(Co);Fs=o(bd,"revision"),bd.forEach(n),Ns=o(p,` can be any
identifier allowed by git.
custom_revision (`),Oo=a(p,"CODE",{});var $d=s(Oo);zs=o($d,"str"),$d.forEach(n),Vs=o(p,", "),Ao=a(p,"EM",{});var yd=s(Ao);Hs=o(yd,"optional"),yd.forEach(n),Xs=o(p,", defaults to "),To=a(p,"CODE",{});var wd=s(To);Us=o(wd,'"main"'),wd.forEach(n),Gs=o(p,` when loading from the Hub and to local version of
`),jo=a(p,"CODE",{});var Ed=s(jo);Ys=o(Ed,"diffusers"),Ed.forEach(n),Bs=o(p,` when loading from GitHub):
The specific model version to use. It can be a branch name, a tag name, or a commit id similar to
`),Lo=a(p,"CODE",{});var Pd=s(Lo);Rs=o(Pd,"revision"),Pd.forEach(n),Js=o(p,` when loading a custom pipeline from the Hub. It can be a diffusers version when loading a
custom pipeline from GitHub.
mirror (`),So=a(p,"CODE",{});var Dd=s(So);Ks=o(Dd,"str"),Dd.forEach(n),Qs=o(p,", "),qo=a(p,"EM",{});var xd=s(qo);Zs=o(xd,"optional"),xd.forEach(n),er=o(p,`):
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information. specify the folder name here.
variant (`),Mo=a(p,"CODE",{});var kd=s(Mo);tr=o(kd,"str"),kd.forEach(n),or=o(p,", "),Wo=a(p,"EM",{});var Id=s(Wo);nr=o(Id,"optional"),Id.forEach(n),ir=o(p,`):
If specified load weights from `),Fo=a(p,"CODE",{});var Cd=s(Fo);ar=o(Cd,"variant"),Cd.forEach(n),sr=o(p," filename, "),No=a(p,"EM",{});var Od=s(No);rr=o(Od,"e.g."),Od.forEach(n),lr=o(p," pytorch_model.<variant>.bin. "),zo=a(p,"CODE",{});var Ad=s(zo);dr=o(Ad,"variant"),Ad.forEach(n),fr=o(p,` is
ignored when using `),Vo=a(p,"CODE",{});var Td=s(Vo);pr=o(Td,"from_flax"),Td.forEach(n),cr=o(p,"."),p.forEach(n),mr=m(S),D(we.$$.fragment,S),S.forEach(n),ur=m(w),J=a(w,"DIV",{class:!0});var kt=s(J);D(Ze.$$.fragment,kt),hr=m(kt),Ho=a(kt,"P",{});var jd=s(Ho);gr=o(jd,"Enable sliced attention computation."),jd.forEach(n),_r=m(kt),Xo=a(kt,"P",{});var Ld=s(Xo);vr=o(Ld,`When this option is enabled, the attention module will split 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.`),Ld.forEach(n),kt.forEach(n),br=m(w),H=a(w,"DIV",{class:!0});var K=s(H);D(et.$$.fragment,K),$r=m(K),Uo=a(K,"P",{});var Sd=s(Uo);yr=o(Sd,"Enable memory efficient attention as implemented in xformers."),Sd.forEach(n),wr=m(K),Go=a(K,"P",{});var qd=s(Go);Er=o(qd,`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),qd.forEach(n),Pr=m(K),Yo=a(K,"P",{});var Md=s(Yo);Dr=o(Md,`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),Md.forEach(n),xr=m(K),D(Ee.$$.fragment,K),K.forEach(n),kr=m(w),j=a(w,"DIV",{class:!0});var F=s(j);D(tt.$$.fragment,F),Ir=m(F),Bo=a(F,"P",{});var Wd=s(Bo);Cr=o(Wd,"Instantiate a PyTorch diffusion pipeline from pre-trained pipeline weights."),Wd.forEach(n),Or=m(F),ot=a(F,"P",{});var Wn=s(ot);Ar=o(Wn,"The pipeline is set in evaluation mode by default using "),Ro=a(Wn,"CODE",{});var Fd=s(Ro);Tr=o(Fd,"model.eval()"),Fd.forEach(n),jr=o(Wn," (Dropout modules are deactivated)."),Wn.forEach(n),Lr=m(F),nt=a(F,"P",{});var Fn=s(nt);Sr=o(Fn,"The warning "),Jo=a(Fn,"EM",{});var Nd=s(Jo);qr=o(Nd,"Weights from XXX not initialized from pretrained model"),Nd.forEach(n),Mr=o(Fn,` means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`),Fn.forEach(n),Wr=m(F),it=a(F,"P",{});var Nn=s(it);Fr=o(Nn,"The warning "),Ko=a(Nn,"EM",{});var zd=s(Ko);Nr=o(zd,"Weights from XXX not used in YYY"),zd.forEach(n),zr=o(Nn,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Nn.forEach(n),Vr=m(F),D(Pe.$$.fragment,F),Hr=m(F),D(De.$$.fragment,F),Xr=m(F),D(xe.$$.fragment,F),F.forEach(n),Ur=m(w),ke=a(w,"DIV",{class:!0});var zn=s(ke);D(at.$$.fragment,zn),Gr=m(zn),Qo=a(zn,"P",{});var Vd=s(Qo);Yr=o(Vd,"Convert a numpy image or a batch of images to a PIL image."),Vd.forEach(n),zn.forEach(n),Br=m(w),Ie=a(w,"DIV",{class:!0});var Vn=s(Ie);D(st.$$.fragment,Vn),Rr=m(Vn),rt=a(Vn,"P",{});var Hn=s(rt);Jr=o(Hn,`Save all variables of the pipeline that can be saved and loaded as well as the pipelines configuration file to
a directory. A pipeline variable can be saved and loaded if its class implements both a save and loading
method. The pipeline can easily be re-loaded using the `),Zo=a(Hn,"CODE",{});var Hd=s(Zo);Kr=o(Hd,"[from_pretrained()](/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained)"),Hd.forEach(n),Qr=o(Hn," class method."),Hn.forEach(n),Vn.forEach(n),w.forEach(n),yn=m(r),ie=a(r,"H2",{class:!0});var Xn=s(ie);Ce=a(Xn,"A",{id:!0,class:!0,href:!0});var Xd=s(Ce);en=a(Xd,"SPAN",{});var Ud=s(en);D(lt.$$.fragment,Ud),Ud.forEach(n),Xd.forEach(n),Zr=m(Xn),tn=a(Xn,"SPAN",{});var Gd=s(tn);el=o(Gd,"ImagePipelineOutput"),Gd.forEach(n),Xn.forEach(n),wn=o(r,`

By default diffusion pipelines return an object of class
`),ae=a(r,"DIV",{class:!0});var Un=s(ae);D(dt.$$.fragment,Un),tl=m(Un),on=a(Un,"P",{});var Yd=s(on);ol=o(Yd,"Output class for image pipelines."),Yd.forEach(n),Un.forEach(n),En=m(r),se=a(r,"H2",{class:!0});var Gn=s(se);Oe=a(Gn,"A",{id:!0,class:!0,href:!0});var Bd=s(Oe);nn=a(Bd,"SPAN",{});var Rd=s(nn);D(ft.$$.fragment,Rd),Rd.forEach(n),Bd.forEach(n),nl=m(Gn),an=a(Gn,"SPAN",{});var Jd=s(an);il=o(Jd,"AudioPipelineOutput"),Jd.forEach(n),Gn.forEach(n),Pn=o(r,`

By default diffusion pipelines return an object of class
`),re=a(r,"DIV",{class:!0});var Yn=s(re);D(pt.$$.fragment,Yn),al=m(Yn),sn=a(Yn,"P",{});var Kd=s(sn);sl=o(Kd,"Output class for audio pipelines."),Kd.forEach(n),Yn.forEach(n),this.h()},h(){_(l,"name","hf:doc:metadata"),_(l,"content",JSON.stringify(gf)),_(h,"id","pipelines"),_(h,"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,"href","#pipelines"),_(u,"class","relative group"),_(Y,"href","/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),_(B,"href","https://huggingface.co/models?library=diffusers"),_(B,"rel","nofollow"),_(ht,"href","/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),_(gt,"href","/docs/diffusers/v0.16.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),_(_t,"href","/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.save_pretrained"),_(pe,"id","diffusers.DiffusionPipeline"),_(pe,"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"),_(pe,"href","#diffusers.DiffusionPipeline"),_(ee,"class","relative group"),_(bt,"href","/docs/diffusers/v0.16.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),_(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Be,"href","https://huggingface.co/"),_(Be,"rel","nofollow"),_(Je,"href","https://github.com/huggingface/diffusers/tree/main/examples/community"),_(Je,"rel","nofollow"),_(Qe,"href","https://huggingface.co/docs/diffusers/using-diffusers/custom_pipeline_overview"),_(Qe,"rel","nofollow"),_(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(J,"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"),_(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ce,"id","diffusers.ImagePipelineOutput"),_(Ce,"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"),_(Ce,"href","#diffusers.ImagePipelineOutput"),_(ie,"class","relative group"),_(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Oe,"id","diffusers.AudioPipelineOutput"),_(Oe,"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"),_(Oe,"href","#diffusers.AudioPipelineOutput"),_(se,"class","relative group"),_(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(r,b){e(document.head,l),E(r,v,b),E(r,u,b),e(u,h),e(h,$),x(d,$,null),e(u,g),e(u,O),e(O,q),E(r,U,b),E(r,M,b),e(M,Q),e(M,Y),e(Y,Z),e(M,N),e(M,B),e(B,mt),e(M,ut),E(r,je,b),x(de,r,b),E(r,_n,b),E(r,L,b),e(L,Rn),e(L,ht),e(ht,Jn),e(L,Kn),e(L,It),e(It,Qn),e(L,Zn),e(L,gt),e(gt,ei),e(L,ti),e(L,Ct),e(Ct,oi),e(L,ni),e(L,Ot),e(Ot,ii),e(L,ai),e(L,At),e(At,si),e(L,ri),E(r,vn,b),E(r,fe,b),e(fe,li),e(fe,_t),e(_t,di),e(fe,fi),E(r,bn,b),E(r,ee,b),e(ee,pe),e(pe,Tt),x(Le,Tt,null),e(ee,pi),e(ee,jt),e(jt,ci),E(r,$n,b),E(r,y,b),x(Se,y,null),e(y,mi),e(y,Lt),e(Lt,ui),e(y,hi),e(y,vt),e(vt,bt),e(bt,gi),e(vt,_i),e(y,vi),e(y,qe),e(qe,St),e(St,bi),e(qe,$i),e(qe,qt),e(qt,yi),e(y,wi),e(y,Mt),e(Mt,Ei),e(y,Pi),e(y,Me),e(Me,ce),e(ce,Wt),e(Wt,Di),e(ce,xi),e(ce,Ft),e(Ft,ki),e(ce,Ii),e(Me,Ci),e(Me,me),e(me,Nt),e(Nt,Oi),e(me,Ai),e(me,zt),e(zt,Ti),e(me,ji),e(y,Li),e(y,ue),x(We,ue,null),e(ue,Si),e(ue,Vt),e(Vt,qi),e(y,Mi),e(y,$t),x(Fe,$t,null),e(y,Wi),e(y,yt),x(Ne,yt,null),e(y,Fi),e(y,R),x(ze,R,null),e(R,Ni),e(R,Ve),e(Ve,zi),e(Ve,Ht),e(Ht,Vi),e(Ve,Hi),e(R,Xi),x(he,R,null),e(y,Ui),e(y,ge),x(He,ge,null),e(ge,Gi),e(ge,Xe),e(Xe,Yi),e(Xe,Xt),e(Xt,Bi),e(Xe,Ri),e(y,Ji),e(y,_e),x(Ue,_e,null),e(_e,Ki),e(_e,Ut),e(Ut,Qi),e(y,Zi),e(y,T),x(Ge,T,null),e(T,ea),e(T,Gt),e(Gt,ta),e(T,oa),e(T,te),e(te,na),e(te,Yt),e(Yt,ia),e(te,aa),e(te,Bt),e(Bt,sa),e(te,ra),e(T,la),x(ve,T,null),e(T,da),e(T,Rt),e(Rt,fa),e(T,pa),e(T,oe),e(oe,Ye),e(Ye,G),e(G,ca),e(G,Jt),e(Jt,ma),e(G,ua),e(G,Be),e(Be,ha),e(G,ga),e(G,Kt),e(Kt,_a),e(G,va),e(Ye,ba),x(be,Ye,null),e(oe,$a),e(oe,Re),e(Re,z),e(z,ya),e(z,Qt),e(Qt,wa),e(z,Ea),e(z,Je),e(Je,Pa),e(z,Da),e(z,Zt),e(Zt,xa),e(z,ka),e(z,eo),e(eo,Ia),e(z,Ca),e(z,to),e(to,Oa),e(z,Aa),e(Re,Ta),x($e,Re,null),e(oe,ja),e(oe,Ke),e(Ke,ne),e(ne,La),e(ne,oo),e(oo,Sa),e(ne,qa),e(ne,no),e(no,Ma),e(ne,Wa),e(Ke,Fa),x(ye,Ke,null),e(T,Na),e(T,wt),e(wt,za),e(wt,Qe),e(Qe,Va),e(T,Ha),e(T,f),e(f,Xa),e(f,io),e(io,Ua),e(f,Ga),e(f,ao),e(ao,Ya),e(f,Ba),e(f,so),e(so,Ra),e(f,Ja),e(f,ro),e(ro,Ka),e(f,Qa),e(f,lo),e(lo,Za),e(f,es),e(f,fo),e(fo,ts),e(f,os),e(f,po),e(po,ns),e(f,is),e(f,co),e(co,as),e(f,ss),e(f,mo),e(mo,rs),e(f,ls),e(f,uo),e(uo,ds),e(f,fs),e(f,ho),e(ho,ps),e(f,cs),e(f,go),e(go,ms),e(f,us),e(f,_o),e(_o,hs),e(f,gs),e(f,vo),e(vo,_s),e(f,vs),e(f,bo),e(bo,bs),e(f,$s),e(f,$o),e($o,ys),e(f,ws),e(f,yo),e(yo,Es),e(f,Ps),e(f,wo),e(wo,Ds),e(f,xs),e(f,Eo),e(Eo,ks),e(f,Is),e(f,Po),e(Po,Cs),e(f,Os),e(f,Do),e(Do,As),e(f,Ts),e(f,xo),e(xo,js),e(f,Ls),e(f,ko),e(ko,Ss),e(f,qs),e(f,Io),e(Io,Ms),e(f,Ws),e(f,Co),e(Co,Fs),e(f,Ns),e(f,Oo),e(Oo,zs),e(f,Vs),e(f,Ao),e(Ao,Hs),e(f,Xs),e(f,To),e(To,Us),e(f,Gs),e(f,jo),e(jo,Ys),e(f,Bs),e(f,Lo),e(Lo,Rs),e(f,Js),e(f,So),e(So,Ks),e(f,Qs),e(f,qo),e(qo,Zs),e(f,er),e(f,Mo),e(Mo,tr),e(f,or),e(f,Wo),e(Wo,nr),e(f,ir),e(f,Fo),e(Fo,ar),e(f,sr),e(f,No),e(No,rr),e(f,lr),e(f,zo),e(zo,dr),e(f,fr),e(f,Vo),e(Vo,pr),e(f,cr),e(T,mr),x(we,T,null),e(y,ur),e(y,J),x(Ze,J,null),e(J,hr),e(J,Ho),e(Ho,gr),e(J,_r),e(J,Xo),e(Xo,vr),e(y,br),e(y,H),x(et,H,null),e(H,$r),e(H,Uo),e(Uo,yr),e(H,wr),e(H,Go),e(Go,Er),e(H,Pr),e(H,Yo),e(Yo,Dr),e(H,xr),x(Ee,H,null),e(y,kr),e(y,j),x(tt,j,null),e(j,Ir),e(j,Bo),e(Bo,Cr),e(j,Or),e(j,ot),e(ot,Ar),e(ot,Ro),e(Ro,Tr),e(ot,jr),e(j,Lr),e(j,nt),e(nt,Sr),e(nt,Jo),e(Jo,qr),e(nt,Mr),e(j,Wr),e(j,it),e(it,Fr),e(it,Ko),e(Ko,Nr),e(it,zr),e(j,Vr),x(Pe,j,null),e(j,Hr),x(De,j,null),e(j,Xr),x(xe,j,null),e(y,Ur),e(y,ke),x(at,ke,null),e(ke,Gr),e(ke,Qo),e(Qo,Yr),e(y,Br),e(y,Ie),x(st,Ie,null),e(Ie,Rr),e(Ie,rt),e(rt,Jr),e(rt,Zo),e(Zo,Kr),e(rt,Qr),E(r,yn,b),E(r,ie,b),e(ie,Ce),e(Ce,en),x(lt,en,null),e(ie,Zr),e(ie,tn),e(tn,el),E(r,wn,b),E(r,ae,b),x(dt,ae,null),e(ae,tl),e(ae,on),e(on,ol),E(r,En,b),E(r,se,b),e(se,Oe),e(Oe,nn),x(ft,nn,null),e(se,nl),e(se,an),e(an,il),E(r,Pn,b),E(r,re,b),x(pt,re,null),e(re,al),e(re,sn),e(sn,sl),Dn=!0},p(r,[b]){const ct={};b&2&&(ct.$$scope={dirty:b,ctx:r}),de.$set(ct);const rn={};b&2&&(rn.$$scope={dirty:b,ctx:r}),he.$set(rn);const ln={};b&2&&(ln.$$scope={dirty:b,ctx:r}),ve.$set(ln);const dn={};b&2&&(dn.$$scope={dirty:b,ctx:r}),be.$set(dn);const le={};b&2&&(le.$$scope={dirty:b,ctx:r}),$e.$set(le);const fn={};b&2&&(fn.$$scope={dirty:b,ctx:r}),ye.$set(fn);const pn={};b&2&&(pn.$$scope={dirty:b,ctx:r}),we.$set(pn);const W={};b&2&&(W.$$scope={dirty:b,ctx:r}),Ee.$set(W);const cn={};b&2&&(cn.$$scope={dirty:b,ctx:r}),Pe.$set(cn);const mn={};b&2&&(mn.$$scope={dirty:b,ctx:r}),De.$set(mn);const un={};b&2&&(un.$$scope={dirty:b,ctx:r}),xe.$set(un)},i(r){Dn||(k(d.$$.fragment,r),k(de.$$.fragment,r),k(Le.$$.fragment,r),k(Se.$$.fragment,r),k(We.$$.fragment,r),k(Fe.$$.fragment,r),k(Ne.$$.fragment,r),k(ze.$$.fragment,r),k(he.$$.fragment,r),k(He.$$.fragment,r),k(Ue.$$.fragment,r),k(Ge.$$.fragment,r),k(ve.$$.fragment,r),k(be.$$.fragment,r),k($e.$$.fragment,r),k(ye.$$.fragment,r),k(we.$$.fragment,r),k(Ze.$$.fragment,r),k(et.$$.fragment,r),k(Ee.$$.fragment,r),k(tt.$$.fragment,r),k(Pe.$$.fragment,r),k(De.$$.fragment,r),k(xe.$$.fragment,r),k(at.$$.fragment,r),k(st.$$.fragment,r),k(lt.$$.fragment,r),k(dt.$$.fragment,r),k(ft.$$.fragment,r),k(pt.$$.fragment,r),Dn=!0)},o(r){I(d.$$.fragment,r),I(de.$$.fragment,r),I(Le.$$.fragment,r),I(Se.$$.fragment,r),I(We.$$.fragment,r),I(Fe.$$.fragment,r),I(Ne.$$.fragment,r),I(ze.$$.fragment,r),I(he.$$.fragment,r),I(He.$$.fragment,r),I(Ue.$$.fragment,r),I(Ge.$$.fragment,r),I(ve.$$.fragment,r),I(be.$$.fragment,r),I($e.$$.fragment,r),I(ye.$$.fragment,r),I(we.$$.fragment,r),I(Ze.$$.fragment,r),I(et.$$.fragment,r),I(Ee.$$.fragment,r),I(tt.$$.fragment,r),I(Pe.$$.fragment,r),I(De.$$.fragment,r),I(xe.$$.fragment,r),I(at.$$.fragment,r),I(st.$$.fragment,r),I(lt.$$.fragment,r),I(dt.$$.fragment,r),I(ft.$$.fragment,r),I(pt.$$.fragment,r),Dn=!1},d(r){n(l),r&&n(v),r&&n(u),C(d),r&&n(U),r&&n(M),r&&n(je),C(de,r),r&&n(_n),r&&n(L),r&&n(vn),r&&n(fe),r&&n(bn),r&&n(ee),C(Le),r&&n($n),r&&n(y),C(Se),C(We),C(Fe),C(Ne),C(ze),C(he),C(He),C(Ue),C(Ge),C(ve),C(be),C($e),C(ye),C(we),C(Ze),C(et),C(Ee),C(tt),C(Pe),C(De),C(xe),C(at),C(st),r&&n(yn),r&&n(ie),C(lt),r&&n(wn),r&&n(ae),C(dt),r&&n(En),r&&n(se),C(ft),r&&n(Pn),r&&n(re),C(pt)}}}const gf={local:"pipelines",sections:[{local:"diffusers.DiffusionPipeline",title:"DiffusionPipeline"},{local:"diffusers.ImagePipelineOutput",title:"ImagePipelineOutput"},{local:"diffusers.AudioPipelineOutput",title:"AudioPipelineOutput"}],title:"Pipelines"};function _f(A){return of(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pf extends Qd{constructor(l){super();Zd(this,l,_f,hf,ef,{})}}export{Pf as default,gf as metadata};
