Buckets:

hf-doc-build/doc / diffusers /v0.10.2 /en /_app /pages /using-diffusers /loading.mdx-hf-doc-builder.js
rtrm's picture
download
raw
89.2 kB
import{S as e2,i as t2,s as s2,e as i,k as p,w as c,t as o,M as o2,c as r,d as s,m as u,a,x as h,h as l,b as d,N as l2,G as e,g as f,y as m,L as i2,q as _,o as v,B as g,v as r2}from"../../chunks/vendor-hf-doc-builder.js";import{I as nt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as y}from"../../chunks/CodeBlock-hf-doc-builder.js";function a2(fm){let be,Zi,Ee,Le,zo,ft,Ka,Ho,Wa,er,Ie,Ya,Vo,Ja,Qa,tr,ms,Xa,sr,J,dt,Uo,Za,en,_s,tn,sn,pt,Bo,on,ln,vs,rn,an,ut,Ro,nn,fn,gs,dn,or,ye,Te,Fo,ct,pn,Go,un,lr,N,cn,ws,hn,mn,ht,_n,vn,mt,gn,wn,ir,_t,rr,D,bn,bs,En,yn,Ko,Dn,Pn,Es,$n,kn,Wo,Mn,Sn,Ce,qn,Yo,jn,xn,An,Jo,Ln,In,ar,Oe,Tn,ys,Cn,On,nr,vt,fr,b,Nn,Qo,zn,Hn,Xo,Vn,Un,Zo,Bn,Rn,el,Fn,Gn,Ds,Kn,Wn,Ps,Yn,Jn,gt,Qn,Xn,$s,Zn,ef,dr,De,Ne,tl,wt,tf,sl,sf,pr,Q,of,ol,lf,rf,bt,ll,af,nf,ur,Et,cr,X,ff,il,df,pf,yt,uf,cf,hr,Dt,mr,Z,hf,rl,mf,_f,Pt,vf,gf,_r,K,wf,bf,ks,dm,Ef,yf,vr,Ms,Df,gr,$t,wr,q,Pf,kt,$f,kf,al,Mf,Sf,nl,qf,jf,fl,xf,Af,br,Mt,Er,Ss,Lf,yr,Pe,ze,dl,St,If,pl,Tf,Dr,qs,Cf,Pr,ee,Of,js,Nf,zf,qt,Hf,Vf,$r,te,Uf,jt,ul,Bf,Rf,xt,Ff,Gf,kr,At,Mr,se,Kf,cl,Wf,Yf,hl,Jf,Qf,Sr,Lt,qr,oe,Xf,ml,Zf,ed,xs,td,sd,jr,$e,He,_l,It,od,vl,ld,xr,j,id,gl,rd,ad,Tt,nd,fd,As,dd,pd,Ls,ud,cd,Ar,W,wl,hd,md,Is,_d,vd,Ts,gd,wd,Lr,Ct,Ir,Cs,bd,Tr,le,Os,Ed,Ns,yd,Dd,Ve,Pd,bl,$d,kd,Ot,Md,Sd,P,qd,El,jd,xd,zs,Ad,Ld,Hs,Id,Td,yl,Cd,Od,Dl,Nd,zd,Pl,Hd,Vd,$l,Ud,Cr,z,Bd,kl,Rd,Fd,Nt,Gd,Kd,Ml,Wd,Yd,Or,ie,Jd,Sl,Qd,Xd,ql,Zd,ep,Nr,zt,zr,x,tp,jl,sp,op,Ht,xl,lp,ip,Vs,rp,ap,Us,np,fp,Hr,Vt,Vr,Ue,dp,Bs,pp,up,Ur,ke,Be,Al,Ut,cp,Ll,hp,Br,Re,mp,Rs,_p,vp,Rr,Fe,C,gp,Il,wp,bp,Tl,Ep,yp,Fs,Dp,Pp,Cl,$p,kp,Mp,O,Sp,Ol,qp,jp,Gs,xp,Ap,Nl,Lp,Ip,zl,Tp,Cp,Fr,A,Op,Hl,Np,zp,Ks,Hp,Vp,Bt,Vl,Up,Bp,Ul,Rp,Fp,Gr,Rt,Kr,Ft,Bl,Gp,Kp,Wr,Gt,Yr,re,Wp,Ws,Yp,Jp,Rl,Qp,Xp,Jr,L,Me,Fl,Zp,eu,Gl,tu,su,Kt,ou,lu,Wt,Kl,iu,ru,Ys,au,nu,Se,Wl,fu,du,Yl,pu,uu,Ge,cu,Jl,hu,mu,Yt,Ql,_u,vu,Js,gu,wu,Jt,Xl,bu,Eu,Qs,yu,Qr,H,Du,Zl,Pu,$u,Qt,ei,ku,Mu,ti,Su,qu,Xr,Xt,Zr,w,ju,si,xu,Au,oi,Lu,Iu,li,Tu,Cu,ii,Ou,Nu,ri,zu,Hu,ai,Vu,Uu,ni,Bu,Ru,fi,Fu,Gu,di,Ku,Wu,ea,Ke,pi,Yu,Ju,ui,Qu,ta,ae,Xu,ci,Zu,ec,hi,tc,sc,sa,Zt,oa,ne,We,mi,oc,lc,_i,ic,rc,ac,Ye,vi,nc,fc,gi,dc,pc,uc,wi,cc,la,es,ia,fe,de,hc,bi,mc,_c,ts,vc,gc,ss,wc,bc,M,Ec,Ei,yc,Dc,yi,Pc,$c,Di,kc,Mc,Pi,Sc,qc,$i,jc,xc,Ac,V,Lc,ki,Ic,Tc,Mi,Cc,Oc,os,Si,Nc,zc,Xs,Hc,ra,qe,Je,qi,ls,Vc,ji,Uc,aa,U,Bc,is,Rc,Fc,Zs,Gc,Kc,eo,Wc,Yc,na,Qe,Y,Jc,xi,Qc,Xc,to,Zc,eh,Ai,th,sh,oh,je,lh,Li,ih,rh,so,ah,nh,fa,B,fh,oo,dh,ph,Ii,uh,ch,Ti,hh,mh,da,lo,_h,pa,rs,ua,R,vh,Ci,gh,wh,io,bh,Eh,as,yh,Dh,ca,pe,Ph,ro,$h,kh,ao,Mh,Sh,ha,ns,ma,ue,qh,fs,Oi,jh,xh,Ni,Ah,Lh,_a,ds,va,xe,Xe,zi,ps,Ih,Hi,Th,ga,F,Ch,no,Oh,Nh,Vi,zh,Hh,Ui,Vh,Uh,wa,fo,Bh,ba,$,Bi,po,Rh,Fh,Ri,uo,Gh,Kh,Fi,co,Wh,Yh,Gi,ho,Jh,Qh,Ki,mo,Xh,Zh,Wi,_o,em,tm,Yi,vo,sm,Ea,Ze,om,go,lm,im,ya,us,Da;return ft=new nt({}),ct=new nt({}),_t=new y({props:{code:`from diffusers import DiffusionPipeline
repo_id = "CompVis/ldm-text2im-large-256"
ldm = DiffusionPipeline.from_pretrained(repo_id)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
repo_id = <span class="hljs-string">&quot;CompVis/ldm-text2im-large-256&quot;</span>
ldm = DiffusionPipeline.from_pretrained(repo_id)`}}),vt=new y({props:{code:`from diffusers import LDMTextToImagePipeline
repo_id = "CompVis/ldm-text2im-large-256"
ldm = LDMTextToImagePipeline.from_pretrained(repo_id)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LDMTextToImagePipeline
repo_id = <span class="hljs-string">&quot;CompVis/ldm-text2im-large-256&quot;</span>
ldm = LDMTextToImagePipeline.from_pretrained(repo_id)`}}),wt=new nt({}),Et=new y({props:{code:`from diffusers import DiffusionPipeline
repo_id = "runwayml/stable-diffusion-v1-5"
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
repo_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id)`}}),Dt=new y({props:{code:"OSError: runwayml/stable-diffusion-v1-5 is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'\nIf this is a private repository, make sure to pass a token having permission to this repo with `use_auth_token` or log in with `huggingface-cli login`",highlighted:'OSError: runwayml/stable-diffusion-v1<span class="hljs-number">-5</span> is <span class="hljs-keyword">not</span> <span class="hljs-keyword">a</span> <span class="hljs-built_in">local</span> <span class="hljs-built_in">folder</span> <span class="hljs-keyword">and</span> is <span class="hljs-keyword">not</span> <span class="hljs-keyword">a</span> valid model identifier listed <span class="hljs-keyword">on</span> <span class="hljs-string">&#x27;https://huggingface.co/models&#x27;</span>\nIf this is <span class="hljs-keyword">a</span> <span class="hljs-keyword">private</span> repository, make sure <span class="hljs-built_in">to</span> pass <span class="hljs-keyword">a</span> <span class="hljs-keyword">token</span> having permission <span class="hljs-built_in">to</span> this repo <span class="hljs-keyword">with</span> `use_auth_token` <span class="hljs-keyword">or</span> <span class="hljs-built_in">log</span> <span class="hljs-keyword">in</span> <span class="hljs-keyword">with</span> `huggingface-cli login`'}}),$t=new y({props:{code:"huggingface-cli login",highlighted:'huggingface-<span class="hljs-keyword">cli</span> login'}}),Mt=new y({props:{code:`from diffusers import DiffusionPipeline
repo_id = "runwayml/stable-diffusion-v1-5"
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id, use_auth_token="<your-access-token>")`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
repo_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id, use_auth_token=<span class="hljs-string">&quot;&lt;your-access-token&gt;&quot;</span>)`}}),St=new nt({}),At=new y({props:{code:`git lfs install
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5`,highlighted:`git lfs install
git clone https:<span class="hljs-regexp">//</span>huggingface.co<span class="hljs-regexp">/runwayml/</span>stable-diffusion-v1-<span class="hljs-number">5</span>`}}),Lt=new y({props:{code:`from diffusers import DiffusionPipeline
repo_id = "./stable-diffusion-v1-5"
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
repo_id = <span class="hljs-string">&quot;./stable-diffusion-v1-5&quot;</span>
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id)`}}),It=new nt({}),Ct=new y({props:{code:`from diffusers import DiffusionPipeline, EulerDiscreteScheduler, DPMSolverMultistepScheduler
repo_id = "runwayml/stable-diffusion-v1-5"
scheduler = EulerDiscreteScheduler.from_pretrained(repo_id, subfolder="scheduler")
# or
# scheduler = DPMSolverMultistepScheduler.from_pretrained(repo_id, subfolder="scheduler")
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id, scheduler=scheduler)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, EulerDiscreteScheduler, DPMSolverMultistepScheduler
repo_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
scheduler = EulerDiscreteScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
<span class="hljs-comment"># or</span>
<span class="hljs-comment"># scheduler = DPMSolverMultistepScheduler.from_pretrained(repo_id, subfolder=&quot;scheduler&quot;)</span>
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id, scheduler=scheduler)`}}),zt=new y({props:{code:`from diffusers import DiffusionPipeline, EulerDiscreteScheduler, DPMSolverMultistepScheduler
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id, safety_checker=None)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline, EulerDiscreteScheduler, DPMSolverMultistepScheduler
stable_diffusion = DiffusionPipeline.from_pretrained(repo_id, safety_checker=<span class="hljs-literal">None</span>)`}}),Vt=new y({props:{code:`from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
model_id = "runwayml/stable-diffusion-v1-5"
stable_diffusion_txt2img = StableDiffusionPipeline.from_pretrained(model_id)
components = stable_diffusion_txt2img.components
# weights are not reloaded into RAM
stable_diffusion_img2img = StableDiffusionImg2ImgPipeline(**components)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline, StableDiffusionImg2ImgPipeline
model_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
stable_diffusion_txt2img = StableDiffusionPipeline.from_pretrained(model_id)
components = stable_diffusion_txt2img.components
<span class="hljs-comment"># weights are not reloaded into RAM</span>
stable_diffusion_img2img = StableDiffusionImg2ImgPipeline(**components)`}}),Ut=new nt({}),Rt=new y({props:{code:`from diffusers import DiffusionPipeline
repo_id = "CompVis/ldm-text2im-large-256"
ldm = DiffusionPipeline.from_pretrained(repo_id)
print(ldm)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
repo_id = <span class="hljs-string">&quot;CompVis/ldm-text2im-large-256&quot;</span>
ldm = DiffusionPipeline.from_pretrained(repo_id)
<span class="hljs-built_in">print</span>(ldm)`}}),Gt=new y({props:{code:`LDMTextToImagePipeline {
"bert": [
"latent_diffusion",
"LDMBertModel"
],
"scheduler": [
"diffusers",
"DDIMScheduler"
],
"tokenizer": [
"transformers",
"BertTokenizer"
],
"unet": [
"diffusers",
"UNet2DConditionModel"
],
"vqvae": [
"diffusers",
"AutoencoderKL"
]
}`,highlighted:`<span class="hljs-symbol">LDMTextToImagePipeline</span> {
<span class="hljs-string">&quot;bert&quot;</span>: [
<span class="hljs-string">&quot;latent_diffusion&quot;</span>,
<span class="hljs-string">&quot;LDMBertModel&quot;</span>
],
<span class="hljs-string">&quot;scheduler&quot;</span>: [
<span class="hljs-string">&quot;diffusers&quot;</span>,
<span class="hljs-string">&quot;DDIMScheduler&quot;</span>
],
<span class="hljs-string">&quot;tokenizer&quot;</span>: [
<span class="hljs-string">&quot;transformers&quot;</span>,
<span class="hljs-string">&quot;BertTokenizer&quot;</span>
],
<span class="hljs-string">&quot;unet&quot;</span>: [
<span class="hljs-string">&quot;diffusers&quot;</span>,
<span class="hljs-string">&quot;UNet2DConditionModel&quot;</span>
],
<span class="hljs-string">&quot;vqvae&quot;</span>: [
<span class="hljs-string">&quot;diffusers&quot;</span>,
<span class="hljs-string">&quot;AutoencoderKL&quot;</span>
]
}`}}),Xt=new y({props:{code:`.
\u251C\u2500\u2500 bert
\u2502\xA0\xA0 \u251C\u2500\u2500 config.json
\u2502\xA0\xA0 \u2514\u2500\u2500 pytorch_model.bin
\u251C\u2500\u2500 model_index.json
\u251C\u2500\u2500 scheduler
\u2502\xA0\xA0 \u2514\u2500\u2500 scheduler_config.json
\u251C\u2500\u2500 tokenizer
\u2502\xA0\xA0 \u251C\u2500\u2500 special_tokens_map.json
\u2502\xA0\xA0 \u251C\u2500\u2500 tokenizer_config.json
\u2502\xA0\xA0 \u2514\u2500\u2500 vocab.txt
\u251C\u2500\u2500 unet
\u2502\xA0\xA0 \u251C\u2500\u2500 config.json
\u2502\xA0\xA0 \u2514\u2500\u2500 diffusion_pytorch_model.bin
\u2514\u2500\u2500 vqvae
\u251C\u2500\u2500 config.json
\u2514\u2500\u2500 diffusion_pytorch_model.bin`,highlighted:`.
\u251C\u2500\u2500 <span class="hljs-keyword">bert
</span>\u2502\xA0\xA0 \u251C\u2500\u2500 <span class="hljs-built_in">config</span>.<span class="hljs-keyword">json
</span>\u2502\xA0\xA0 \u2514\u2500\u2500 pytorch_model.<span class="hljs-keyword">bin
</span>\u251C\u2500\u2500 model_index.<span class="hljs-keyword">json
</span>\u251C\u2500\u2500 <span class="hljs-keyword">scheduler
</span>\u2502\xA0\xA0 \u2514\u2500\u2500 <span class="hljs-keyword">scheduler_config.json
</span>\u251C\u2500\u2500 tokenizer
\u2502\xA0\xA0 \u251C\u2500\u2500 special_tokens_map.<span class="hljs-keyword">json
</span>\u2502\xA0\xA0 \u251C\u2500\u2500 tokenizer_config.<span class="hljs-keyword">json
</span>\u2502\xA0\xA0 \u2514\u2500\u2500 vocab.txt
\u251C\u2500\u2500 unet
\u2502\xA0\xA0 \u251C\u2500\u2500 <span class="hljs-built_in">config</span>.<span class="hljs-keyword">json
</span>\u2502\xA0\xA0 \u2514\u2500\u2500 <span class="hljs-keyword">diffusion_pytorch_model.bin
</span>\u2514\u2500\u2500 vqvae
\u251C\u2500\u2500 <span class="hljs-built_in">config</span>.<span class="hljs-keyword">json
</span> \u2514\u2500\u2500 <span class="hljs-keyword">diffusion_pytorch_model.bin</span>`}}),Zt=new y({props:{code:`{
"_class_name": "LDMTextToImagePipeline",
"_diffusers_version": "0.0.4",
"bert": [
"latent_diffusion",
"LDMBertModel"
],
"scheduler": [
"diffusers",
"DDIMScheduler"
],
"tokenizer": [
"transformers",
"BertTokenizer"
],
"unet": [
"diffusers",
"UNet2DConditionModel"
],
"vqvae": [
"diffusers",
"AutoencoderKL"
]
}`,highlighted:`{
<span class="hljs-string">&quot;_class_name&quot;</span>: <span class="hljs-string">&quot;LDMTextToImagePipeline&quot;</span>,
<span class="hljs-string">&quot;_diffusers_version&quot;</span>: <span class="hljs-string">&quot;0.0.4&quot;</span>,
<span class="hljs-string">&quot;bert&quot;</span>: [
<span class="hljs-string">&quot;latent_diffusion&quot;</span>,
<span class="hljs-string">&quot;LDMBertModel&quot;</span>
],
<span class="hljs-string">&quot;scheduler&quot;</span>: [
<span class="hljs-string">&quot;diffusers&quot;</span>,
<span class="hljs-string">&quot;DDIMScheduler&quot;</span>
],
<span class="hljs-string">&quot;tokenizer&quot;</span>: [
<span class="hljs-string">&quot;transformers&quot;</span>,
<span class="hljs-string">&quot;BertTokenizer&quot;</span>
],
<span class="hljs-string">&quot;unet&quot;</span>: [
<span class="hljs-string">&quot;diffusers&quot;</span>,
<span class="hljs-string">&quot;UNet2DConditionModel&quot;</span>
],
<span class="hljs-string">&quot;vqvae&quot;</span>: [
<span class="hljs-string">&quot;diffusers&quot;</span>,
<span class="hljs-string">&quot;AutoencoderKL&quot;</span>
]
}`}}),es=new y({props:{code:`"name" : [
"library",
"class"
]`,highlighted:`<span class="hljs-string">&quot;name&quot;</span> : [
<span class="hljs-string">&quot;library&quot;</span>,
<span class="hljs-string">&quot;class&quot;</span>
]`}}),ls=new nt({}),rs=new y({props:{code:`from diffusers import UNet2DConditionModel
repo_id = "CompVis/ldm-text2im-large-256"
model = UNet2DConditionModel.from_pretrained(repo_id, subfolder="unet")`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel
repo_id = <span class="hljs-string">&quot;CompVis/ldm-text2im-large-256&quot;</span>
model = UNet2DConditionModel.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;unet&quot;</span>)`}}),ns=new y({props:{code:`from diffusers import DiffusionPipeline
repo_id = "CompVis/ldm-text2im-large-256"
ldm = DiffusionPipeline.from_pretrained(repo_id, unet=model)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
repo_id = <span class="hljs-string">&quot;CompVis/ldm-text2im-large-256&quot;</span>
ldm = DiffusionPipeline.from_pretrained(repo_id, unet=model)`}}),ds=new y({props:{code:`from diffusers import UNet2DModel
repo_id = "google/ddpm-cifar10-32"
model = UNet2DModel.from_pretrained(repo_id)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DModel
repo_id = <span class="hljs-string">&quot;google/ddpm-cifar10-32&quot;</span>
model = UNet2DModel.from_pretrained(repo_id)`}}),ps=new nt({}),us=new y({props:{code:`from diffusers import StableDiffusionPipeline
from diffusers import (
DDPMScheduler,
DDIMScheduler,
PNDMScheduler,
LMSDiscreteScheduler,
EulerDiscreteScheduler,
EulerAncestralDiscreteScheduler,
DPMSolverMultistepScheduler,
)
repo_id = "runwayml/stable-diffusion-v1-5"
ddpm = DDPMScheduler.from_pretrained(repo_id, subfolder="scheduler")
ddim = DDIMScheduler.from_pretrained(repo_id, subfolder="scheduler")
pndm = PNDMScheduler.from_pretrained(repo_id, subfolder="scheduler")
lms = LMSDiscreteScheduler.from_pretrained(repo_id, subfolder="scheduler")
euler_anc = EulerAncestralDiscreteScheduler.from_pretrained(repo_id, subfolder="scheduler")
euler = EulerDiscreteScheduler.from_pretrained(repo_id, subfolder="scheduler")
dpm = DPMSolverMultistepScheduler.from_pretrained(repo_id, subfolder="scheduler")
# replace \`dpm\` with any of \`ddpm\`, \`ddim\`, \`pndm\`, \`lms\`, \`euler\`, \`euler_anc\`
pipeline = StableDiffusionPipeline.from_pretrained(repo_id, scheduler=dpm)`,highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> (
DDPMScheduler,
DDIMScheduler,
PNDMScheduler,
LMSDiscreteScheduler,
EulerDiscreteScheduler,
EulerAncestralDiscreteScheduler,
DPMSolverMultistepScheduler,
)
repo_id = <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>
ddpm = DDPMScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
ddim = DDIMScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
pndm = PNDMScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
lms = LMSDiscreteScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
euler_anc = EulerAncestralDiscreteScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
euler = EulerDiscreteScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
dpm = DPMSolverMultistepScheduler.from_pretrained(repo_id, subfolder=<span class="hljs-string">&quot;scheduler&quot;</span>)
<span class="hljs-comment"># replace \`dpm\` with any of \`ddpm\`, \`ddim\`, \`pndm\`, \`lms\`, \`euler\`, \`euler_anc\`</span>
pipeline = StableDiffusionPipeline.from_pretrained(repo_id, scheduler=dpm)`}}),{c(){be=i("meta"),Zi=p(),Ee=i("h1"),Le=i("a"),zo=i("span"),c(ft.$$.fragment),Ka=p(),Ho=i("span"),Wa=o("Loading"),er=p(),Ie=i("p"),Ya=o("A core premise of the diffusers library is to make diffusion models "),Vo=i("strong"),Ja=o("as accessible as possible"),Qa=o(`.
Accessibility is therefore achieved by providing an API to load complete diffusion pipelines as well as individual components with a single line of code.`),tr=p(),ms=i("p"),Xa=o("In the following we explain in-detail how to easily load:"),sr=p(),J=i("ul"),dt=i("li"),Uo=i("em"),Za=o("Complete Diffusion Pipelines"),en=o(" via the "),_s=i("a"),tn=o("DiffusionPipeline.from_pretrained()"),sn=p(),pt=i("li"),Bo=i("em"),on=o("Diffusion Models"),ln=o(" via "),vs=i("a"),rn=o("ModelMixin.from_pretrained()"),an=p(),ut=i("li"),Ro=i("em"),nn=o("Schedulers"),fn=o(" via "),gs=i("a"),dn=o("SchedulerMixin.from_pretrained()"),or=p(),ye=i("h2"),Te=i("a"),Fo=i("span"),c(ct.$$.fragment),pn=p(),Go=i("span"),un=o("Loading pipelines"),lr=p(),N=i("p"),cn=o("The "),ws=i("a"),hn=o("DiffusionPipeline"),mn=o(" class is the easiest way to access any diffusion model that is "),ht=i("a"),_n=o("available on the Hub"),vn=o(". Let\u2019s look at an example on how to download "),mt=i("a"),gn=o("CompVis\u2019 Latent Diffusion model"),wn=o("."),ir=p(),c(_t.$$.fragment),rr=p(),D=i("p"),bn=o("Here "),bs=i("a"),En=o("DiffusionPipeline"),yn=o(" automatically detects the correct pipeline ("),Ko=i("em"),Dn=o("i.e."),Pn=p(),Es=i("a"),$n=o("LDMTextToImagePipeline"),kn=o("), downloads and caches all required configuration and weight files (if not already done so), and finally returns a pipeline instance, called "),Wo=i("code"),Mn=o("ldm"),Sn=o(`.
The pipeline instance can then be called using `),Ce=i("a"),qn=o("LDMTextToImagePipeline."),Yo=i("strong"),jn=o("call"),xn=o("()"),An=o(" (i.e., "),Jo=i("code"),Ln=o('ldm("image of a astronaut riding a horse")'),In=o(") for text-to-image generation."),ar=p(),Oe=i("p"),Tn=o("Instead of using the generic "),ys=i("a"),Cn=o("DiffusionPipeline"),On=o(" class for loading, you can also load the appropriate pipeline class directly. The code snippet above yields the same instance as when doing:"),nr=p(),c(vt.$$.fragment),fr=p(),b=i("p"),Nn=o("Diffusion pipelines like "),Qo=i("code"),zn=o("LDMTextToImagePipeline"),Hn=o(" often consist of multiple components. These components can be both parameterized models, such as "),Xo=i("code"),Vn=o('"unet"'),Un=o(", "),Zo=i("code"),Bn=o('"vqvae"'),Rn=o(" and \u201Cbert\u201D, tokenizers or schedulers. These components can interact in complex ways with each other when using the pipeline in inference, "),el=i("em"),Fn=o("e.g."),Gn=o(" for "),Ds=i("a"),Kn=o("LDMTextToImagePipeline"),Wn=o(" or "),Ps=i("a"),Yn=o("StableDiffusionPipeline"),Jn=o(" the inference call is explained "),gt=i("a"),Qn=o("here"),Xn=o(`.
The purpose of the `),$s=i("a"),Zn=o("pipeline classes"),ef=o(" is to wrap the complexity of these diffusion systems and give the user an easy-to-use API while staying flexible for customization, as will be shown later."),dr=p(),De=i("h3"),Ne=i("a"),tl=i("span"),c(wt.$$.fragment),tf=p(),sl=i("span"),sf=o("Loading pipelines that require access request"),pr=p(),Q=i("p"),of=o("Due to the capabilities of diffusion models to generate extremely realistic images, there is a certain danger that such models might be misused for unwanted applications, "),ol=i("em"),lf=o("e.g."),rf=o(` generating pornography or violent images.
In order to minimize the possibility of such unsolicited use cases, some of the most powerful diffusion models require users to acknowledge a license before being able to use the model. If the user does not agree to the license, the pipeline cannot be downloaded.
If you try to load `),bt=i("a"),ll=i("code"),af=o("runwayml/stable-diffusion-v1-5"),nf=o(" the same way as done previously:"),ur=p(),c(Et.$$.fragment),cr=p(),X=i("p"),ff=o("it will only work if you have both "),il=i("em"),df=o("click-accepted"),pf=o(" the license on "),yt=i("a"),uf=o("the model card"),cf=o(` and are logged into the Hugging Face Hub. Otherwise you will get an error message
such as the following:`),hr=p(),c(Dt.$$.fragment),mr=p(),Z=i("p"),hf=o("Therefore, we need to make sure to "),rl=i("em"),mf=o("click-accept"),_f=o(` the license. You can do this by simply visiting
the `),Pt=i("a"),vf=o("model card"),gf=o(" and clicking on \u201CAgree and access repository\u201D:"),_r=p(),K=i("p"),wf=i("br"),bf=p(),ks=i("img"),Ef=p(),yf=i("br"),vr=p(),Ms=i("p"),Df=o("Second, you need to login with your access token:"),gr=p(),c($t.$$.fragment),wr=p(),q=i("p"),Pf=o("before trying to load the model. Or alternatively, you can pass "),kt=i("a"),$f=o("your access token"),kf=o(" directly via the flag "),al=i("code"),Mf=o("use_auth_token"),Sf=o(". In this case you do "),nl=i("strong"),qf=o("not"),jf=o(` need
to run `),fl=i("code"),xf=o("huggingface-cli login"),Af=o(" before:"),br=p(),c(Mt.$$.fragment),Er=p(),Ss=i("p"),Lf=o("The final option to use pipelines that require access without having to rely on the Hugging Face Hub is to load the pipeline locally as explained in the next section."),yr=p(),Pe=i("h3"),ze=i("a"),dl=i("span"),c(St.$$.fragment),If=p(),pl=i("span"),Tf=o("Loading pipelines locally"),Dr=p(),qs=i("p"),Cf=o(`If you prefer to have complete control over the pipeline and its corresponding files or, as said before, if you want to use pipelines that require an access request without having to be connected to the Hugging Face Hub,
we recommend loading pipelines locally.`),Pr=p(),ee=i("p"),Of=o("To load a diffusion pipeline locally, you first need to manually download the whole folder structure on your local disk and then pass a local path to the "),js=i("a"),Nf=o("DiffusionPipeline.from_pretrained()"),zf=o(`. Let\u2019s again look at an example for
`),qt=i("a"),Hf=o("CompVis\u2019 Latent Diffusion model"),Vf=o("."),$r=p(),te=i("p"),Uf=o("First, you should make use of "),jt=i("a"),ul=i("code"),Bf=o("git-lfs"),Rf=o(" to download the whole folder structure that has been uploaded to the "),xt=i("a"),Ff=o("model repository"),Gf=o(":"),kr=p(),c(At.$$.fragment),Mr=p(),se=i("p"),Kf=o("The command above will create a local folder called "),cl=i("code"),Wf=o("./stable-diffusion-v1-5"),Yf=o(` on your disk.
Now, all you have to do is to simply pass the local folder path to `),hl=i("code"),Jf=o("from_pretrained"),Qf=o(":"),Sr=p(),c(Lt.$$.fragment),qr=p(),oe=i("p"),Xf=o("If "),ml=i("code"),Zf=o("repo_id"),ed=o(" is a local path, as it is the case here, "),xs=i("a"),td=o("DiffusionPipeline.from_pretrained()"),sd=o(` will automatically detect it and therefore not try to download any files from the Hub.
While we usually recommend to load weights directly from the Hub to be certain to stay up to date with the newest changes, loading pipelines locally should be preferred if one
wants to stay anonymous, self-contained applications, etc\u2026`),jr=p(),$e=i("h3"),He=i("a"),_l=i("span"),c(It.$$.fragment),od=p(),vl=i("span"),ld=o("Loading customized pipelines"),xr=p(),j=i("p"),id=o("Advanced users that want to load customized versions of diffusion pipelines can do so by swapping any of the default components, "),gl=i("em"),rd=o("e.g."),ad=o(` the scheduler, with other scheduler classes.
A classical use case of this functionality is to swap the scheduler. `),Tt=i("a"),nd=o("Stable Diffusion v1-5"),fd=o(" uses the "),As=i("a"),dd=o("PNDMScheduler"),pd=o(` by default which is generally not the most performant scheduler. Since the release
of stable diffusion, multiple improved schedulers have been published. To use those, the user has to manually load their preferred scheduler and pass it into `),Ls=i("a"),ud=o("DiffusionPipeline.from_pretrained()"),cd=o("."),Ar=p(),W=i("p"),wl=i("em"),hd=o("E.g."),md=o(" to use "),Is=i("a"),_d=o("EulerDiscreteScheduler"),vd=o(" or "),Ts=i("a"),gd=o("DPMSolverMultistepScheduler"),wd=o(" to have a better quality vs. generation speed trade-off for inference, one could load them as follows:"),Lr=p(),c(Ct.$$.fragment),Ir=p(),Cs=i("p"),bd=o("Three things are worth paying attention to here."),Tr=p(),le=i("ul"),Os=i("li"),Ed=o("First, the scheduler is loaded with "),Ns=i("a"),yd=o("SchedulerMixin.from_pretrained()"),Dd=p(),Ve=i("li"),Pd=o("Second, the scheduler is loaded with a function argument, called "),bl=i("code"),$d=o('subfolder="scheduler"'),kd=o(" as the configuration of stable diffusion\u2019s scheduling is defined in a "),Ot=i("a"),Md=o("subfolder of the official pipeline repository"),Sd=p(),P=i("li"),qd=o("Third, the scheduler instance can simply be passed with the "),El=i("code"),jd=o("scheduler"),xd=o(" keyword argument to "),zs=i("a"),Ad=o("DiffusionPipeline.from_pretrained()"),Ld=o(". This works because the "),Hs=i("a"),Id=o("StableDiffusionPipeline"),Td=o(" defines its scheduler with the "),yl=i("code"),Cd=o("scheduler"),Od=o(" attribute. It\u2019s not possible to use a different name, such as "),Dl=i("code"),Nd=o("sampler=scheduler"),zd=o(" since "),Pl=i("code"),Hd=o("sampler"),Vd=o(" is not a defined keyword for "),$l=i("code"),Ud=o("StableDiffusionPipeline.__init__()"),Cr=p(),z=i("p"),Bd=o("Not only the scheduler components can be customized for diffusion pipelines; in theory, all components of a pipeline can be customized. In practice, however, it often only makes sense to switch out a component that has "),kl=i("strong"),Rd=o("compatible"),Fd=o(` alternatives to what the pipeline expects.
Many scheduler classes are compatible with each other as can be seen `),Nt=i("a"),Gd=o("here"),Kd=o(". This is not always the case for other components, such as the "),Ml=i("code"),Wd=o('"unet"'),Yd=o("."),Or=p(),ie=i("p"),Jd=o("One special case that can also be customized is the "),Sl=i("code"),Qd=o('"safety_checker"'),Xd=o(" of stable diffusion. If you believe the safety checker doesn\u2019t serve you any good, you can simply disable it by passing "),ql=i("code"),Zd=o("None"),ep=o(":"),Nr=p(),c(zt.$$.fragment),zr=p(),x=i("p"),tp=o("Another common use case is to reuse the same components in multiple pipelines, "),jl=i("em"),sp=o("e.g."),op=o(" the weights and configurations of "),Ht=i("a"),xl=i("code"),lp=o('"runwayml/stable-diffusion-v1-5"'),ip=o(" can be used for both "),Vs=i("a"),rp=o("StableDiffusionPipeline"),ap=o(" and "),Us=i("a"),np=o("StableDiffusionImg2ImgPipeline"),fp=o(` and we might not want to
use the exact same weights into RAM twice. In this case, customizing all the input instances would help us
to only load the weights into RAM once:`),Hr=p(),c(Vt.$$.fragment),Vr=p(),Ue=i("p"),dp=o("Note how the above code snippet makes use of "),Bs=i("a"),pp=o("DiffusionPipeline.components"),up=o("."),Ur=p(),ke=i("h3"),Be=i("a"),Al=i("span"),c(Ut.$$.fragment),cp=p(),Ll=i("span"),hp=o("How does loading work?"),Br=p(),Re=i("p"),mp=o("As a class method, "),Rs=i("a"),_p=o("DiffusionPipeline.from_pretrained()"),vp=o(" is responsible for two things:"),Rr=p(),Fe=i("ul"),C=i("li"),gp=o("Download the latest version of the folder structure required to run the "),Il=i("code"),wp=o("repo_id"),bp=o(" with "),Tl=i("code"),Ep=o("diffusers"),yp=o(" and cache them. If the latest folder structure is available in the local cache, "),Fs=i("a"),Dp=o("DiffusionPipeline.from_pretrained()"),Pp=o(" will simply reuse the cache and "),Cl=i("strong"),$p=o("not"),kp=o(" re-download the files."),Mp=p(),O=i("li"),Sp=o("Load the cached weights into the "),Ol=i("em"),qp=o("correct"),jp=o(" pipeline class \u2013 one of the "),Gs=i("a"),xp=o("officially supported pipeline classes"),Ap=o(" - and return an instance of the class. The "),Nl=i("em"),Lp=o("correct"),Ip=o(" pipeline class is thereby retrieved from the "),zl=i("code"),Tp=o("model_index.json"),Cp=o(" file."),Fr=p(),A=i("p"),Op=o("The underlying folder structure of diffusion pipelines correspond 1-to-1 to their corresponding class instances, "),Hl=i("em"),Np=o("e.g."),zp=p(),Ks=i("a"),Hp=o("LDMTextToImagePipeline"),Vp=o(" for "),Bt=i("a"),Vl=i("code"),Up=o("CompVis/ldm-text2im-large-256"),Bp=o(`
This can be understood better by looking at an example. Let\u2019s print out pipeline class instance `),Ul=i("code"),Rp=o("pipeline"),Fp=o(" we just defined:"),Gr=p(),c(Rt.$$.fragment),Kr=p(),Ft=i("p"),Bl=i("em"),Gp=o("Output"),Kp=o(":"),Wr=p(),c(Gt.$$.fragment),Yr=p(),re=i("p"),Wp=o("First, we see that the official pipeline is the "),Ws=i("a"),Yp=o("LDMTextToImagePipeline"),Jp=o(", and second we see that the "),Rl=i("code"),Qp=o("LDMTextToImagePipeline"),Xp=o(" consists of 5 components:"),Jr=p(),L=i("ul"),Me=i("li"),Fl=i("code"),Zp=o('"bert"'),eu=o(" of class "),Gl=i("code"),tu=o("LDMBertModel"),su=o(" as defined "),Kt=i("a"),ou=o("in the pipeline"),lu=p(),Wt=i("li"),Kl=i("code"),iu=o('"scheduler"'),ru=o(" of class "),Ys=i("a"),au=o("DDIMScheduler"),nu=p(),Se=i("li"),Wl=i("code"),fu=o('"tokenizer"'),du=o(" of class "),Yl=i("code"),pu=o("BertTokenizer"),uu=o(" as defined "),Ge=i("a"),cu=o("in "),Jl=i("code"),hu=o("transformers"),mu=p(),Yt=i("li"),Ql=i("code"),_u=o('"unet"'),vu=o(" of class "),Js=i("a"),gu=o("UNet2DConditionModel"),wu=p(),Jt=i("li"),Xl=i("code"),bu=o('"vqvae"'),Eu=o(" of class "),Qs=i("a"),yu=o("AutoencoderKL"),Qr=p(),H=i("p"),Du=o("Let\u2019s now compare the pipeline instance to the folder structure of the model repository "),Zl=i("code"),Pu=o("CompVis/ldm-text2im-large-256"),$u=o(". Looking at the folder structure of "),Qt=i("a"),ei=i("code"),ku=o("CompVis/ldm-text2im-large-256"),Mu=o(" on the Hub, we can see it matches 1-to-1 the printed out instance of "),ti=i("code"),Su=o("LDMTextToImagePipeline"),qu=o(" above:"),Xr=p(),c(Xt.$$.fragment),Zr=p(),w=i("p"),ju=o("As we can see each attribute of the instance of "),si=i("code"),xu=o("LDMTextToImagePipeline"),Au=o(" has its configuration and possibly weights defined in a subfolder that is called "),oi=i("strong"),Lu=o("exactly"),Iu=o(" like the class attribute ("),li=i("code"),Tu=o('"bert"'),Cu=o(", "),ii=i("code"),Ou=o('"scheduler"'),Nu=o(", "),ri=i("code"),zu=o('"tokenizer"'),Hu=o(", "),ai=i("code"),Vu=o('"unet"'),Uu=o(", "),ni=i("code"),Bu=o('"vqvae"'),Ru=o("). Importantly, every pipeline expects a "),fi=i("code"),Fu=o("model_index.json"),Gu=o(" file that tells the "),di=i("code"),Ku=o("DiffusionPipeline"),Wu=o(" both:"),ea=p(),Ke=i("ul"),pi=i("li"),Yu=o("which pipeline class should be loaded, and"),Ju=p(),ui=i("li"),Qu=o("what sub-classes from which library are stored in which subfolders"),ta=p(),ae=i("p"),Xu=o("In the case of "),ci=i("code"),Zu=o("CompVis/ldm-text2im-large-256"),ec=o(" the "),hi=i("code"),tc=o("model_index.json"),sc=o(" is therefore defined as follows:"),sa=p(),c(Zt.$$.fragment),oa=p(),ne=i("ul"),We=i("li"),mi=i("code"),oc=o("_class_name"),lc=o(" tells "),_i=i("code"),ic=o("DiffusionPipeline"),rc=o(" which pipeline class should be loaded."),ac=p(),Ye=i("li"),vi=i("code"),nc=o("_diffusers_version"),fc=o(" can be useful to know under which "),gi=i("code"),dc=o("diffusers"),pc=o(" version this model was created."),uc=p(),wi=i("li"),cc=o("Every component of the pipeline is then defined under the form:"),la=p(),c(es.$$.fragment),ia=p(),fe=i("ul"),de=i("li"),hc=o("The "),bi=i("code"),mc=o('"name"'),_c=o(" field corresponds both to the name of the subfolder in which the configuration and weights are stored as well as the attribute name of the pipeline class (as can be seen "),ts=i("a"),vc=o("here"),gc=o(" and "),ss=i("a"),wc=o("here"),bc=p(),M=i("li"),Ec=o("The "),Ei=i("code"),yc=o('"library"'),Dc=o(" field corresponds to the name of the library, "),yi=i("em"),Pc=o("e.g."),$c=p(),Di=i("code"),kc=o("diffusers"),Mc=o(" or "),Pi=i("code"),Sc=o("transformers"),qc=o(" from which the "),$i=i("code"),jc=o('"class"'),xc=o(" should be loaded"),Ac=p(),V=i("li"),Lc=o("The "),ki=i("code"),Ic=o('"class"'),Tc=o(" field corresponds to the name of the class, "),Mi=i("em"),Cc=o("e.g."),Oc=p(),os=i("a"),Si=i("code"),Nc=o("BertTokenizer"),zc=o(" or "),Xs=i("a"),Hc=o("UNet2DConditionModel"),ra=p(),qe=i("h2"),Je=i("a"),qi=i("span"),c(ls.$$.fragment),Vc=p(),ji=i("span"),Uc=o("Loading models"),aa=p(),U=i("p"),Bc=o("Models as defined under "),is=i("a"),Rc=o("src/diffusers/models"),Fc=o(" can be loaded via the "),Zs=i("a"),Gc=o("ModelMixin.from_pretrained()"),Kc=o(" function. The API is very similar the "),eo=i("a"),Wc=o("DiffusionPipeline.from_pretrained()"),Yc=o(" and works in the same way:"),na=p(),Qe=i("ul"),Y=i("li"),Jc=o("Download the latest version of the model weights and configuration with "),xi=i("code"),Qc=o("diffusers"),Xc=o(" and cache them. If the latest files are available in the local cache, "),to=i("a"),Zc=o("ModelMixin.from_pretrained()"),eh=o(" will simply reuse the cache and "),Ai=i("strong"),th=o("not"),sh=o(" re-download the files."),oh=p(),je=i("li"),lh=o("Load the cached weights into the "),Li=i("em"),ih=o("defined"),rh=o(" model class - one of "),so=i("a"),ah=o("the existing model classes"),nh=o(" - and return an instance of the class."),fa=p(),B=i("p"),fh=o("In constrast to "),oo=i("a"),dh=o("DiffusionPipeline.from_pretrained()"),ph=o(", models rely on fewer files that usually don\u2019t require a folder structure, but just a "),Ii=i("code"),uh=o("diffusion_pytorch_model.bin"),ch=o(" and "),Ti=i("code"),hh=o("config.json"),mh=o(" file."),da=p(),lo=i("p"),_h=o("Let\u2019s look at an example:"),pa=p(),c(rs.$$.fragment),ua=p(),R=i("p"),vh=o("Note how we have to define the "),Ci=i("code"),gh=o('subfolder="unet"'),wh=o(" argument to tell "),io=i("a"),bh=o("ModelMixin.from_pretrained()"),Eh=o(" that the model weights are located in a "),as=i("a"),yh=o("subfolder of the repository"),Dh=o("."),ca=p(),pe=i("p"),Ph=o("As explained in "),ro=i("a"),$h=o("Loading customized pipelines"),kh=o(", one can pass a loaded model to a diffusion pipeline, via "),ao=i("a"),Mh=o("DiffusionPipeline.from_pretrained()"),Sh=o(":"),ha=p(),c(ns.$$.fragment),ma=p(),ue=i("p"),qh=o("If the model files can be found directly at the root level, which is usually only the case for some very simple diffusion models, such as "),fs=i("a"),Oi=i("code"),jh=o("google/ddpm-cifar10-32"),xh=o(`, we don\u2019t
need to pass a `),Ni=i("code"),Ah=o("subfolder"),Lh=o(" argument:"),_a=p(),c(ds.$$.fragment),va=p(),xe=i("h2"),Xe=i("a"),zi=i("span"),c(ps.$$.fragment),Ih=p(),Hi=i("span"),Th=o("Loading schedulers"),ga=p(),F=i("p"),Ch=o("Schedulers rely on "),no=i("a"),Oh=o("SchedulerMixin.from_pretrained()"),Nh=o(". Schedulers are "),Vi=i("strong"),zh=o("not parameterized"),Hh=o(" or "),Ui=i("strong"),Vh=o("trained"),Uh=o(`, but instead purely defined by a configuration file.
For consistency, we use the same method name as we do for models or pipelines, but no weights are loaded in this case.`),wa=p(),fo=i("p"),Bh=o(`In constrast to pipelines or models, loading schedulers does not consume any significant amount of memory and the same configuration file can often be used for a variety of different schedulers.
For example, all of:`),ba=p(),$=i("ul"),Bi=i("li"),po=i("a"),Rh=o("DDPMScheduler"),Fh=p(),Ri=i("li"),uo=i("a"),Gh=o("DDIMScheduler"),Kh=p(),Fi=i("li"),co=i("a"),Wh=o("PNDMScheduler"),Yh=p(),Gi=i("li"),ho=i("a"),Jh=o("LMSDiscreteScheduler"),Qh=p(),Ki=i("li"),mo=i("a"),Xh=o("EulerDiscreteScheduler"),Zh=p(),Wi=i("li"),_o=i("a"),em=o("EulerAncestralDiscreteScheduler"),tm=p(),Yi=i("li"),vo=i("a"),sm=o("DPMSolverMultistepScheduler"),Ea=p(),Ze=i("p"),om=o("are compatible with "),go=i("a"),lm=o("StableDiffusionPipeline"),im=o(" and therefore the same scheduler configuration file can be loaded in any of those classes:"),ya=p(),c(us.$$.fragment),this.h()},l(t){const n=o2('[data-svelte="svelte-1phssyn"]',document.head);be=r(n,"META",{name:!0,content:!0}),n.forEach(s),Zi=u(t),Ee=r(t,"H1",{class:!0});var Pa=a(Ee);Le=r(Pa,"A",{id:!0,class:!0,href:!0});var pm=a(Le);zo=r(pm,"SPAN",{});var um=a(zo);h(ft.$$.fragment,um),um.forEach(s),pm.forEach(s),Ka=u(Pa),Ho=r(Pa,"SPAN",{});var cm=a(Ho);Wa=l(cm,"Loading"),cm.forEach(s),Pa.forEach(s),er=u(t),Ie=r(t,"P",{});var $a=a(Ie);Ya=l($a,"A core premise of the diffusers library is to make diffusion models "),Vo=r($a,"STRONG",{});var hm=a(Vo);Ja=l(hm,"as accessible as possible"),hm.forEach(s),Qa=l($a,`.
Accessibility is therefore achieved by providing an API to load complete diffusion pipelines as well as individual components with a single line of code.`),$a.forEach(s),tr=u(t),ms=r(t,"P",{});var mm=a(ms);Xa=l(mm,"In the following we explain in-detail how to easily load:"),mm.forEach(s),sr=u(t),J=r(t,"UL",{});var wo=a(J);dt=r(wo,"LI",{});var ka=a(dt);Uo=r(ka,"EM",{});var _m=a(Uo);Za=l(_m,"Complete Diffusion Pipelines"),_m.forEach(s),en=l(ka," via the "),_s=r(ka,"A",{href:!0});var vm=a(_s);tn=l(vm,"DiffusionPipeline.from_pretrained()"),vm.forEach(s),ka.forEach(s),sn=u(wo),pt=r(wo,"LI",{});var Ma=a(pt);Bo=r(Ma,"EM",{});var gm=a(Bo);on=l(gm,"Diffusion Models"),gm.forEach(s),ln=l(Ma," via "),vs=r(Ma,"A",{href:!0});var wm=a(vs);rn=l(wm,"ModelMixin.from_pretrained()"),wm.forEach(s),Ma.forEach(s),an=u(wo),ut=r(wo,"LI",{});var Sa=a(ut);Ro=r(Sa,"EM",{});var bm=a(Ro);nn=l(bm,"Schedulers"),bm.forEach(s),fn=l(Sa," via "),gs=r(Sa,"A",{href:!0});var Em=a(gs);dn=l(Em,"SchedulerMixin.from_pretrained()"),Em.forEach(s),Sa.forEach(s),wo.forEach(s),or=u(t),ye=r(t,"H2",{class:!0});var qa=a(ye);Te=r(qa,"A",{id:!0,class:!0,href:!0});var ym=a(Te);Fo=r(ym,"SPAN",{});var Dm=a(Fo);h(ct.$$.fragment,Dm),Dm.forEach(s),ym.forEach(s),pn=u(qa),Go=r(qa,"SPAN",{});var Pm=a(Go);un=l(Pm,"Loading pipelines"),Pm.forEach(s),qa.forEach(s),lr=u(t),N=r(t,"P",{});var et=a(N);cn=l(et,"The "),ws=r(et,"A",{href:!0});var $m=a(ws);hn=l($m,"DiffusionPipeline"),$m.forEach(s),mn=l(et," class is the easiest way to access any diffusion model that is "),ht=r(et,"A",{href:!0,rel:!0});var km=a(ht);_n=l(km,"available on the Hub"),km.forEach(s),vn=l(et,". Let\u2019s look at an example on how to download "),mt=r(et,"A",{href:!0,rel:!0});var Mm=a(mt);gn=l(Mm,"CompVis\u2019 Latent Diffusion model"),Mm.forEach(s),wn=l(et,"."),et.forEach(s),ir=u(t),h(_t.$$.fragment,t),rr=u(t),D=r(t,"P",{});var I=a(D);bn=l(I,"Here "),bs=r(I,"A",{href:!0});var Sm=a(bs);En=l(Sm,"DiffusionPipeline"),Sm.forEach(s),yn=l(I," automatically detects the correct pipeline ("),Ko=r(I,"EM",{});var qm=a(Ko);Dn=l(qm,"i.e."),qm.forEach(s),Pn=u(I),Es=r(I,"A",{href:!0});var jm=a(Es);$n=l(jm,"LDMTextToImagePipeline"),jm.forEach(s),kn=l(I,"), downloads and caches all required configuration and weight files (if not already done so), and finally returns a pipeline instance, called "),Wo=r(I,"CODE",{});var xm=a(Wo);Mn=l(xm,"ldm"),xm.forEach(s),Sn=l(I,`.
The pipeline instance can then be called using `),Ce=r(I,"A",{href:!0});var ja=a(Ce);qn=l(ja,"LDMTextToImagePipeline."),Yo=r(ja,"STRONG",{});var Am=a(Yo);jn=l(Am,"call"),Am.forEach(s),xn=l(ja,"()"),ja.forEach(s),An=l(I," (i.e., "),Jo=r(I,"CODE",{});var Lm=a(Jo);Ln=l(Lm,'ldm("image of a astronaut riding a horse")'),Lm.forEach(s),In=l(I,") for text-to-image generation."),I.forEach(s),ar=u(t),Oe=r(t,"P",{});var xa=a(Oe);Tn=l(xa,"Instead of using the generic "),ys=r(xa,"A",{href:!0});var Im=a(ys);Cn=l(Im,"DiffusionPipeline"),Im.forEach(s),On=l(xa," class for loading, you can also load the appropriate pipeline class directly. The code snippet above yields the same instance as when doing:"),xa.forEach(s),nr=u(t),h(vt.$$.fragment,t),fr=u(t),b=r(t,"P",{});var k=a(b);Nn=l(k,"Diffusion pipelines like "),Qo=r(k,"CODE",{});var Tm=a(Qo);zn=l(Tm,"LDMTextToImagePipeline"),Tm.forEach(s),Hn=l(k," often consist of multiple components. These components can be both parameterized models, such as "),Xo=r(k,"CODE",{});var Cm=a(Xo);Vn=l(Cm,'"unet"'),Cm.forEach(s),Un=l(k,", "),Zo=r(k,"CODE",{});var Om=a(Zo);Bn=l(Om,'"vqvae"'),Om.forEach(s),Rn=l(k," and \u201Cbert\u201D, tokenizers or schedulers. These components can interact in complex ways with each other when using the pipeline in inference, "),el=r(k,"EM",{});var Nm=a(el);Fn=l(Nm,"e.g."),Nm.forEach(s),Gn=l(k," for "),Ds=r(k,"A",{href:!0});var zm=a(Ds);Kn=l(zm,"LDMTextToImagePipeline"),zm.forEach(s),Wn=l(k," or "),Ps=r(k,"A",{href:!0});var Hm=a(Ps);Yn=l(Hm,"StableDiffusionPipeline"),Hm.forEach(s),Jn=l(k," the inference call is explained "),gt=r(k,"A",{href:!0,rel:!0});var Vm=a(gt);Qn=l(Vm,"here"),Vm.forEach(s),Xn=l(k,`.
The purpose of the `),$s=r(k,"A",{href:!0});var Um=a($s);Zn=l(Um,"pipeline classes"),Um.forEach(s),ef=l(k," is to wrap the complexity of these diffusion systems and give the user an easy-to-use API while staying flexible for customization, as will be shown later."),k.forEach(s),dr=u(t),De=r(t,"H3",{class:!0});var Aa=a(De);Ne=r(Aa,"A",{id:!0,class:!0,href:!0});var Bm=a(Ne);tl=r(Bm,"SPAN",{});var Rm=a(tl);h(wt.$$.fragment,Rm),Rm.forEach(s),Bm.forEach(s),tf=u(Aa),sl=r(Aa,"SPAN",{});var Fm=a(sl);sf=l(Fm,"Loading pipelines that require access request"),Fm.forEach(s),Aa.forEach(s),pr=u(t),Q=r(t,"P",{});var bo=a(Q);of=l(bo,"Due to the capabilities of diffusion models to generate extremely realistic images, there is a certain danger that such models might be misused for unwanted applications, "),ol=r(bo,"EM",{});var Gm=a(ol);lf=l(Gm,"e.g."),Gm.forEach(s),rf=l(bo,` generating pornography or violent images.
In order to minimize the possibility of such unsolicited use cases, some of the most powerful diffusion models require users to acknowledge a license before being able to use the model. If the user does not agree to the license, the pipeline cannot be downloaded.
If you try to load `),bt=r(bo,"A",{href:!0,rel:!0});var Km=a(bt);ll=r(Km,"CODE",{});var Wm=a(ll);af=l(Wm,"runwayml/stable-diffusion-v1-5"),Wm.forEach(s),Km.forEach(s),nf=l(bo," the same way as done previously:"),bo.forEach(s),ur=u(t),h(Et.$$.fragment,t),cr=u(t),X=r(t,"P",{});var Eo=a(X);ff=l(Eo,"it will only work if you have both "),il=r(Eo,"EM",{});var Ym=a(il);df=l(Ym,"click-accepted"),Ym.forEach(s),pf=l(Eo," the license on "),yt=r(Eo,"A",{href:!0,rel:!0});var Jm=a(yt);uf=l(Jm,"the model card"),Jm.forEach(s),cf=l(Eo,` and are logged into the Hugging Face Hub. Otherwise you will get an error message
such as the following:`),Eo.forEach(s),hr=u(t),h(Dt.$$.fragment,t),mr=u(t),Z=r(t,"P",{});var yo=a(Z);hf=l(yo,"Therefore, we need to make sure to "),rl=r(yo,"EM",{});var Qm=a(rl);mf=l(Qm,"click-accept"),Qm.forEach(s),_f=l(yo,` the license. You can do this by simply visiting
the `),Pt=r(yo,"A",{href:!0,rel:!0});var Xm=a(Pt);vf=l(Xm,"model card"),Xm.forEach(s),gf=l(yo," and clicking on \u201CAgree and access repository\u201D:"),yo.forEach(s),_r=u(t),K=r(t,"P",{align:!0});var Do=a(K);wf=r(Do,"BR",{}),bf=u(Do),ks=r(Do,"IMG",{src:!0,width:!0}),Ef=u(Do),yf=r(Do,"BR",{}),Do.forEach(s),vr=u(t),Ms=r(t,"P",{});var Zm=a(Ms);Df=l(Zm,"Second, you need to login with your access token:"),Zm.forEach(s),gr=u(t),h($t.$$.fragment,t),wr=u(t),q=r(t,"P",{});var ce=a(q);Pf=l(ce,"before trying to load the model. Or alternatively, you can pass "),kt=r(ce,"A",{href:!0,rel:!0});var e_=a(kt);$f=l(e_,"your access token"),e_.forEach(s),kf=l(ce," directly via the flag "),al=r(ce,"CODE",{});var t_=a(al);Mf=l(t_,"use_auth_token"),t_.forEach(s),Sf=l(ce,". In this case you do "),nl=r(ce,"STRONG",{});var s_=a(nl);qf=l(s_,"not"),s_.forEach(s),jf=l(ce,` need
to run `),fl=r(ce,"CODE",{});var o_=a(fl);xf=l(o_,"huggingface-cli login"),o_.forEach(s),Af=l(ce," before:"),ce.forEach(s),br=u(t),h(Mt.$$.fragment,t),Er=u(t),Ss=r(t,"P",{});var l_=a(Ss);Lf=l(l_,"The final option to use pipelines that require access without having to rely on the Hugging Face Hub is to load the pipeline locally as explained in the next section."),l_.forEach(s),yr=u(t),Pe=r(t,"H3",{class:!0});var La=a(Pe);ze=r(La,"A",{id:!0,class:!0,href:!0});var i_=a(ze);dl=r(i_,"SPAN",{});var r_=a(dl);h(St.$$.fragment,r_),r_.forEach(s),i_.forEach(s),If=u(La),pl=r(La,"SPAN",{});var a_=a(pl);Tf=l(a_,"Loading pipelines locally"),a_.forEach(s),La.forEach(s),Dr=u(t),qs=r(t,"P",{});var n_=a(qs);Cf=l(n_,`If you prefer to have complete control over the pipeline and its corresponding files or, as said before, if you want to use pipelines that require an access request without having to be connected to the Hugging Face Hub,
we recommend loading pipelines locally.`),n_.forEach(s),Pr=u(t),ee=r(t,"P",{});var Po=a(ee);Of=l(Po,"To load a diffusion pipeline locally, you first need to manually download the whole folder structure on your local disk and then pass a local path to the "),js=r(Po,"A",{href:!0});var f_=a(js);Nf=l(f_,"DiffusionPipeline.from_pretrained()"),f_.forEach(s),zf=l(Po,`. Let\u2019s again look at an example for
`),qt=r(Po,"A",{href:!0,rel:!0});var d_=a(qt);Hf=l(d_,"CompVis\u2019 Latent Diffusion model"),d_.forEach(s),Vf=l(Po,"."),Po.forEach(s),$r=u(t),te=r(t,"P",{});var $o=a(te);Uf=l($o,"First, you should make use of "),jt=r($o,"A",{href:!0,rel:!0});var p_=a(jt);ul=r(p_,"CODE",{});var u_=a(ul);Bf=l(u_,"git-lfs"),u_.forEach(s),p_.forEach(s),Rf=l($o," to download the whole folder structure that has been uploaded to the "),xt=r($o,"A",{href:!0,rel:!0});var c_=a(xt);Ff=l(c_,"model repository"),c_.forEach(s),Gf=l($o,":"),$o.forEach(s),kr=u(t),h(At.$$.fragment,t),Mr=u(t),se=r(t,"P",{});var ko=a(se);Kf=l(ko,"The command above will create a local folder called "),cl=r(ko,"CODE",{});var h_=a(cl);Wf=l(h_,"./stable-diffusion-v1-5"),h_.forEach(s),Yf=l(ko,` on your disk.
Now, all you have to do is to simply pass the local folder path to `),hl=r(ko,"CODE",{});var m_=a(hl);Jf=l(m_,"from_pretrained"),m_.forEach(s),Qf=l(ko,":"),ko.forEach(s),Sr=u(t),h(Lt.$$.fragment,t),qr=u(t),oe=r(t,"P",{});var Mo=a(oe);Xf=l(Mo,"If "),ml=r(Mo,"CODE",{});var __=a(ml);Zf=l(__,"repo_id"),__.forEach(s),ed=l(Mo," is a local path, as it is the case here, "),xs=r(Mo,"A",{href:!0});var v_=a(xs);td=l(v_,"DiffusionPipeline.from_pretrained()"),v_.forEach(s),sd=l(Mo,` will automatically detect it and therefore not try to download any files from the Hub.
While we usually recommend to load weights directly from the Hub to be certain to stay up to date with the newest changes, loading pipelines locally should be preferred if one
wants to stay anonymous, self-contained applications, etc\u2026`),Mo.forEach(s),jr=u(t),$e=r(t,"H3",{class:!0});var Ia=a($e);He=r(Ia,"A",{id:!0,class:!0,href:!0});var g_=a(He);_l=r(g_,"SPAN",{});var w_=a(_l);h(It.$$.fragment,w_),w_.forEach(s),g_.forEach(s),od=u(Ia),vl=r(Ia,"SPAN",{});var b_=a(vl);ld=l(b_,"Loading customized pipelines"),b_.forEach(s),Ia.forEach(s),xr=u(t),j=r(t,"P",{});var he=a(j);id=l(he,"Advanced users that want to load customized versions of diffusion pipelines can do so by swapping any of the default components, "),gl=r(he,"EM",{});var E_=a(gl);rd=l(E_,"e.g."),E_.forEach(s),ad=l(he,` the scheduler, with other scheduler classes.
A classical use case of this functionality is to swap the scheduler. `),Tt=r(he,"A",{href:!0,rel:!0});var y_=a(Tt);nd=l(y_,"Stable Diffusion v1-5"),y_.forEach(s),fd=l(he," uses the "),As=r(he,"A",{href:!0});var D_=a(As);dd=l(D_,"PNDMScheduler"),D_.forEach(s),pd=l(he,` by default which is generally not the most performant scheduler. Since the release
of stable diffusion, multiple improved schedulers have been published. To use those, the user has to manually load their preferred scheduler and pass it into `),Ls=r(he,"A",{href:!0});var P_=a(Ls);ud=l(P_,"DiffusionPipeline.from_pretrained()"),P_.forEach(s),cd=l(he,"."),he.forEach(s),Ar=u(t),W=r(t,"P",{});var cs=a(W);wl=r(cs,"EM",{});var $_=a(wl);hd=l($_,"E.g."),$_.forEach(s),md=l(cs," to use "),Is=r(cs,"A",{href:!0});var k_=a(Is);_d=l(k_,"EulerDiscreteScheduler"),k_.forEach(s),vd=l(cs," or "),Ts=r(cs,"A",{href:!0});var M_=a(Ts);gd=l(M_,"DPMSolverMultistepScheduler"),M_.forEach(s),wd=l(cs," to have a better quality vs. generation speed trade-off for inference, one could load them as follows:"),cs.forEach(s),Lr=u(t),h(Ct.$$.fragment,t),Ir=u(t),Cs=r(t,"P",{});var S_=a(Cs);bd=l(S_,"Three things are worth paying attention to here."),S_.forEach(s),Tr=u(t),le=r(t,"UL",{});var So=a(le);Os=r(So,"LI",{});var rm=a(Os);Ed=l(rm,"First, the scheduler is loaded with "),Ns=r(rm,"A",{href:!0});var q_=a(Ns);yd=l(q_,"SchedulerMixin.from_pretrained()"),q_.forEach(s),rm.forEach(s),Dd=u(So),Ve=r(So,"LI",{});var Ji=a(Ve);Pd=l(Ji,"Second, the scheduler is loaded with a function argument, called "),bl=r(Ji,"CODE",{});var j_=a(bl);$d=l(j_,'subfolder="scheduler"'),j_.forEach(s),kd=l(Ji," as the configuration of stable diffusion\u2019s scheduling is defined in a "),Ot=r(Ji,"A",{href:!0,rel:!0});var x_=a(Ot);Md=l(x_,"subfolder of the official pipeline repository"),x_.forEach(s),Ji.forEach(s),Sd=u(So),P=r(So,"LI",{});var S=a(P);qd=l(S,"Third, the scheduler instance can simply be passed with the "),El=r(S,"CODE",{});var A_=a(El);jd=l(A_,"scheduler"),A_.forEach(s),xd=l(S," keyword argument to "),zs=r(S,"A",{href:!0});var L_=a(zs);Ad=l(L_,"DiffusionPipeline.from_pretrained()"),L_.forEach(s),Ld=l(S,". This works because the "),Hs=r(S,"A",{href:!0});var I_=a(Hs);Id=l(I_,"StableDiffusionPipeline"),I_.forEach(s),Td=l(S," defines its scheduler with the "),yl=r(S,"CODE",{});var T_=a(yl);Cd=l(T_,"scheduler"),T_.forEach(s),Od=l(S," attribute. It\u2019s not possible to use a different name, such as "),Dl=r(S,"CODE",{});var C_=a(Dl);Nd=l(C_,"sampler=scheduler"),C_.forEach(s),zd=l(S," since "),Pl=r(S,"CODE",{});var O_=a(Pl);Hd=l(O_,"sampler"),O_.forEach(s),Vd=l(S," is not a defined keyword for "),$l=r(S,"CODE",{});var N_=a($l);Ud=l(N_,"StableDiffusionPipeline.__init__()"),N_.forEach(s),S.forEach(s),So.forEach(s),Cr=u(t),z=r(t,"P",{});var tt=a(z);Bd=l(tt,"Not only the scheduler components can be customized for diffusion pipelines; in theory, all components of a pipeline can be customized. In practice, however, it often only makes sense to switch out a component that has "),kl=r(tt,"STRONG",{});var z_=a(kl);Rd=l(z_,"compatible"),z_.forEach(s),Fd=l(tt,` alternatives to what the pipeline expects.
Many scheduler classes are compatible with each other as can be seen `),Nt=r(tt,"A",{href:!0,rel:!0});var H_=a(Nt);Gd=l(H_,"here"),H_.forEach(s),Kd=l(tt,". This is not always the case for other components, such as the "),Ml=r(tt,"CODE",{});var V_=a(Ml);Wd=l(V_,'"unet"'),V_.forEach(s),Yd=l(tt,"."),tt.forEach(s),Or=u(t),ie=r(t,"P",{});var qo=a(ie);Jd=l(qo,"One special case that can also be customized is the "),Sl=r(qo,"CODE",{});var U_=a(Sl);Qd=l(U_,'"safety_checker"'),U_.forEach(s),Xd=l(qo," of stable diffusion. If you believe the safety checker doesn\u2019t serve you any good, you can simply disable it by passing "),ql=r(qo,"CODE",{});var B_=a(ql);Zd=l(B_,"None"),B_.forEach(s),ep=l(qo,":"),qo.forEach(s),Nr=u(t),h(zt.$$.fragment,t),zr=u(t),x=r(t,"P",{});var me=a(x);tp=l(me,"Another common use case is to reuse the same components in multiple pipelines, "),jl=r(me,"EM",{});var R_=a(jl);sp=l(R_,"e.g."),R_.forEach(s),op=l(me," the weights and configurations of "),Ht=r(me,"A",{href:!0,rel:!0});var F_=a(Ht);xl=r(F_,"CODE",{});var G_=a(xl);lp=l(G_,'"runwayml/stable-diffusion-v1-5"'),G_.forEach(s),F_.forEach(s),ip=l(me," can be used for both "),Vs=r(me,"A",{href:!0});var K_=a(Vs);rp=l(K_,"StableDiffusionPipeline"),K_.forEach(s),ap=l(me," and "),Us=r(me,"A",{href:!0});var W_=a(Us);np=l(W_,"StableDiffusionImg2ImgPipeline"),W_.forEach(s),fp=l(me,` and we might not want to
use the exact same weights into RAM twice. In this case, customizing all the input instances would help us
to only load the weights into RAM once:`),me.forEach(s),Hr=u(t),h(Vt.$$.fragment,t),Vr=u(t),Ue=r(t,"P",{});var Ta=a(Ue);dp=l(Ta,"Note how the above code snippet makes use of "),Bs=r(Ta,"A",{href:!0});var Y_=a(Bs);pp=l(Y_,"DiffusionPipeline.components"),Y_.forEach(s),up=l(Ta,"."),Ta.forEach(s),Ur=u(t),ke=r(t,"H3",{class:!0});var Ca=a(ke);Be=r(Ca,"A",{id:!0,class:!0,href:!0});var J_=a(Be);Al=r(J_,"SPAN",{});var Q_=a(Al);h(Ut.$$.fragment,Q_),Q_.forEach(s),J_.forEach(s),cp=u(Ca),Ll=r(Ca,"SPAN",{});var X_=a(Ll);hp=l(X_,"How does loading work?"),X_.forEach(s),Ca.forEach(s),Br=u(t),Re=r(t,"P",{});var Oa=a(Re);mp=l(Oa,"As a class method, "),Rs=r(Oa,"A",{href:!0});var Z_=a(Rs);_p=l(Z_,"DiffusionPipeline.from_pretrained()"),Z_.forEach(s),vp=l(Oa," is responsible for two things:"),Oa.forEach(s),Rr=u(t),Fe=r(t,"UL",{});var Na=a(Fe);C=r(Na,"LI",{});var _e=a(C);gp=l(_e,"Download the latest version of the folder structure required to run the "),Il=r(_e,"CODE",{});var ev=a(Il);wp=l(ev,"repo_id"),ev.forEach(s),bp=l(_e," with "),Tl=r(_e,"CODE",{});var tv=a(Tl);Ep=l(tv,"diffusers"),tv.forEach(s),yp=l(_e," and cache them. If the latest folder structure is available in the local cache, "),Fs=r(_e,"A",{href:!0});var sv=a(Fs);Dp=l(sv,"DiffusionPipeline.from_pretrained()"),sv.forEach(s),Pp=l(_e," will simply reuse the cache and "),Cl=r(_e,"STRONG",{});var ov=a(Cl);$p=l(ov,"not"),ov.forEach(s),kp=l(_e," re-download the files."),_e.forEach(s),Mp=u(Na),O=r(Na,"LI",{});var ve=a(O);Sp=l(ve,"Load the cached weights into the "),Ol=r(ve,"EM",{});var lv=a(Ol);qp=l(lv,"correct"),lv.forEach(s),jp=l(ve," pipeline class \u2013 one of the "),Gs=r(ve,"A",{href:!0});var iv=a(Gs);xp=l(iv,"officially supported pipeline classes"),iv.forEach(s),Ap=l(ve," - and return an instance of the class. The "),Nl=r(ve,"EM",{});var rv=a(Nl);Lp=l(rv,"correct"),rv.forEach(s),Ip=l(ve," pipeline class is thereby retrieved from the "),zl=r(ve,"CODE",{});var av=a(zl);Tp=l(av,"model_index.json"),av.forEach(s),Cp=l(ve," file."),ve.forEach(s),Na.forEach(s),Fr=u(t),A=r(t,"P",{});var ge=a(A);Op=l(ge,"The underlying folder structure of diffusion pipelines correspond 1-to-1 to their corresponding class instances, "),Hl=r(ge,"EM",{});var nv=a(Hl);Np=l(nv,"e.g."),nv.forEach(s),zp=u(ge),Ks=r(ge,"A",{href:!0});var fv=a(Ks);Hp=l(fv,"LDMTextToImagePipeline"),fv.forEach(s),Vp=l(ge," for "),Bt=r(ge,"A",{href:!0,rel:!0});var dv=a(Bt);Vl=r(dv,"CODE",{});var pv=a(Vl);Up=l(pv,"CompVis/ldm-text2im-large-256"),pv.forEach(s),dv.forEach(s),Bp=l(ge,`
This can be understood better by looking at an example. Let\u2019s print out pipeline class instance `),Ul=r(ge,"CODE",{});var uv=a(Ul);Rp=l(uv,"pipeline"),uv.forEach(s),Fp=l(ge," we just defined:"),ge.forEach(s),Gr=u(t),h(Rt.$$.fragment,t),Kr=u(t),Ft=r(t,"P",{});var am=a(Ft);Bl=r(am,"EM",{});var cv=a(Bl);Gp=l(cv,"Output"),cv.forEach(s),Kp=l(am,":"),am.forEach(s),Wr=u(t),h(Gt.$$.fragment,t),Yr=u(t),re=r(t,"P",{});var jo=a(re);Wp=l(jo,"First, we see that the official pipeline is the "),Ws=r(jo,"A",{href:!0});var hv=a(Ws);Yp=l(hv,"LDMTextToImagePipeline"),hv.forEach(s),Jp=l(jo,", and second we see that the "),Rl=r(jo,"CODE",{});var mv=a(Rl);Qp=l(mv,"LDMTextToImagePipeline"),mv.forEach(s),Xp=l(jo," consists of 5 components:"),jo.forEach(s),Jr=u(t),L=r(t,"UL",{});var we=a(L);Me=r(we,"LI",{});var xo=a(Me);Fl=r(xo,"CODE",{});var _v=a(Fl);Zp=l(_v,'"bert"'),_v.forEach(s),eu=l(xo," of class "),Gl=r(xo,"CODE",{});var vv=a(Gl);tu=l(vv,"LDMBertModel"),vv.forEach(s),su=l(xo," as defined "),Kt=r(xo,"A",{href:!0,rel:!0});var gv=a(Kt);ou=l(gv,"in the pipeline"),gv.forEach(s),xo.forEach(s),lu=u(we),Wt=r(we,"LI",{});var za=a(Wt);Kl=r(za,"CODE",{});var wv=a(Kl);iu=l(wv,'"scheduler"'),wv.forEach(s),ru=l(za," of class "),Ys=r(za,"A",{href:!0});var bv=a(Ys);au=l(bv,"DDIMScheduler"),bv.forEach(s),za.forEach(s),nu=u(we),Se=r(we,"LI",{});var Ao=a(Se);Wl=r(Ao,"CODE",{});var Ev=a(Wl);fu=l(Ev,'"tokenizer"'),Ev.forEach(s),du=l(Ao," of class "),Yl=r(Ao,"CODE",{});var yv=a(Yl);pu=l(yv,"BertTokenizer"),yv.forEach(s),uu=l(Ao," as defined "),Ge=r(Ao,"A",{href:!0,rel:!0});var nm=a(Ge);cu=l(nm,"in "),Jl=r(nm,"CODE",{});var Dv=a(Jl);hu=l(Dv,"transformers"),Dv.forEach(s),nm.forEach(s),Ao.forEach(s),mu=u(we),Yt=r(we,"LI",{});var Ha=a(Yt);Ql=r(Ha,"CODE",{});var Pv=a(Ql);_u=l(Pv,'"unet"'),Pv.forEach(s),vu=l(Ha," of class "),Js=r(Ha,"A",{href:!0});var $v=a(Js);gu=l($v,"UNet2DConditionModel"),$v.forEach(s),Ha.forEach(s),wu=u(we),Jt=r(we,"LI",{});var Va=a(Jt);Xl=r(Va,"CODE",{});var kv=a(Xl);bu=l(kv,'"vqvae"'),kv.forEach(s),Eu=l(Va," of class "),Qs=r(Va,"A",{href:!0});var Mv=a(Qs);yu=l(Mv,"AutoencoderKL"),Mv.forEach(s),Va.forEach(s),we.forEach(s),Qr=u(t),H=r(t,"P",{});var st=a(H);Du=l(st,"Let\u2019s now compare the pipeline instance to the folder structure of the model repository "),Zl=r(st,"CODE",{});var Sv=a(Zl);Pu=l(Sv,"CompVis/ldm-text2im-large-256"),Sv.forEach(s),$u=l(st,". Looking at the folder structure of "),Qt=r(st,"A",{href:!0,rel:!0});var qv=a(Qt);ei=r(qv,"CODE",{});var jv=a(ei);ku=l(jv,"CompVis/ldm-text2im-large-256"),jv.forEach(s),qv.forEach(s),Mu=l(st," on the Hub, we can see it matches 1-to-1 the printed out instance of "),ti=r(st,"CODE",{});var xv=a(ti);Su=l(xv,"LDMTextToImagePipeline"),xv.forEach(s),qu=l(st," above:"),st.forEach(s),Xr=u(t),h(Xt.$$.fragment,t),Zr=u(t),w=r(t,"P",{});var E=a(w);ju=l(E,"As we can see each attribute of the instance of "),si=r(E,"CODE",{});var Av=a(si);xu=l(Av,"LDMTextToImagePipeline"),Av.forEach(s),Au=l(E," has its configuration and possibly weights defined in a subfolder that is called "),oi=r(E,"STRONG",{});var Lv=a(oi);Lu=l(Lv,"exactly"),Lv.forEach(s),Iu=l(E," like the class attribute ("),li=r(E,"CODE",{});var Iv=a(li);Tu=l(Iv,'"bert"'),Iv.forEach(s),Cu=l(E,", "),ii=r(E,"CODE",{});var Tv=a(ii);Ou=l(Tv,'"scheduler"'),Tv.forEach(s),Nu=l(E,", "),ri=r(E,"CODE",{});var Cv=a(ri);zu=l(Cv,'"tokenizer"'),Cv.forEach(s),Hu=l(E,", "),ai=r(E,"CODE",{});var Ov=a(ai);Vu=l(Ov,'"unet"'),Ov.forEach(s),Uu=l(E,", "),ni=r(E,"CODE",{});var Nv=a(ni);Bu=l(Nv,'"vqvae"'),Nv.forEach(s),Ru=l(E,"). Importantly, every pipeline expects a "),fi=r(E,"CODE",{});var zv=a(fi);Fu=l(zv,"model_index.json"),zv.forEach(s),Gu=l(E," file that tells the "),di=r(E,"CODE",{});var Hv=a(di);Ku=l(Hv,"DiffusionPipeline"),Hv.forEach(s),Wu=l(E," both:"),E.forEach(s),ea=u(t),Ke=r(t,"UL",{});var Ua=a(Ke);pi=r(Ua,"LI",{});var Vv=a(pi);Yu=l(Vv,"which pipeline class should be loaded, and"),Vv.forEach(s),Ju=u(Ua),ui=r(Ua,"LI",{});var Uv=a(ui);Qu=l(Uv,"what sub-classes from which library are stored in which subfolders"),Uv.forEach(s),Ua.forEach(s),ta=u(t),ae=r(t,"P",{});var Lo=a(ae);Xu=l(Lo,"In the case of "),ci=r(Lo,"CODE",{});var Bv=a(ci);Zu=l(Bv,"CompVis/ldm-text2im-large-256"),Bv.forEach(s),ec=l(Lo," the "),hi=r(Lo,"CODE",{});var Rv=a(hi);tc=l(Rv,"model_index.json"),Rv.forEach(s),sc=l(Lo," is therefore defined as follows:"),Lo.forEach(s),sa=u(t),h(Zt.$$.fragment,t),oa=u(t),ne=r(t,"UL",{});var Io=a(ne);We=r(Io,"LI",{});var Qi=a(We);mi=r(Qi,"CODE",{});var Fv=a(mi);oc=l(Fv,"_class_name"),Fv.forEach(s),lc=l(Qi," tells "),_i=r(Qi,"CODE",{});var Gv=a(_i);ic=l(Gv,"DiffusionPipeline"),Gv.forEach(s),rc=l(Qi," which pipeline class should be loaded."),Qi.forEach(s),ac=u(Io),Ye=r(Io,"LI",{});var Xi=a(Ye);vi=r(Xi,"CODE",{});var Kv=a(vi);nc=l(Kv,"_diffusers_version"),Kv.forEach(s),fc=l(Xi," can be useful to know under which "),gi=r(Xi,"CODE",{});var Wv=a(gi);dc=l(Wv,"diffusers"),Wv.forEach(s),pc=l(Xi," version this model was created."),Xi.forEach(s),uc=u(Io),wi=r(Io,"LI",{});var Yv=a(wi);cc=l(Yv,"Every component of the pipeline is then defined under the form:"),Yv.forEach(s),Io.forEach(s),la=u(t),h(es.$$.fragment,t),ia=u(t),fe=r(t,"UL",{});var To=a(fe);de=r(To,"LI",{});var hs=a(de);hc=l(hs,"The "),bi=r(hs,"CODE",{});var Jv=a(bi);mc=l(Jv,'"name"'),Jv.forEach(s),_c=l(hs," field corresponds both to the name of the subfolder in which the configuration and weights are stored as well as the attribute name of the pipeline class (as can be seen "),ts=r(hs,"A",{href:!0,rel:!0});var Qv=a(ts);vc=l(Qv,"here"),Qv.forEach(s),gc=l(hs," and "),ss=r(hs,"A",{href:!0,rel:!0});var Xv=a(ss);wc=l(Xv,"here"),Xv.forEach(s),hs.forEach(s),bc=u(To),M=r(To,"LI",{});var G=a(M);Ec=l(G,"The "),Ei=r(G,"CODE",{});var Zv=a(Ei);yc=l(Zv,'"library"'),Zv.forEach(s),Dc=l(G," field corresponds to the name of the library, "),yi=r(G,"EM",{});var e1=a(yi);Pc=l(e1,"e.g."),e1.forEach(s),$c=u(G),Di=r(G,"CODE",{});var t1=a(Di);kc=l(t1,"diffusers"),t1.forEach(s),Mc=l(G," or "),Pi=r(G,"CODE",{});var s1=a(Pi);Sc=l(s1,"transformers"),s1.forEach(s),qc=l(G," from which the "),$i=r(G,"CODE",{});var o1=a($i);jc=l(o1,'"class"'),o1.forEach(s),xc=l(G," should be loaded"),G.forEach(s),Ac=u(To),V=r(To,"LI",{});var Ae=a(V);Lc=l(Ae,"The "),ki=r(Ae,"CODE",{});var l1=a(ki);Ic=l(l1,'"class"'),l1.forEach(s),Tc=l(Ae," field corresponds to the name of the class, "),Mi=r(Ae,"EM",{});var i1=a(Mi);Cc=l(i1,"e.g."),i1.forEach(s),Oc=u(Ae),os=r(Ae,"A",{href:!0,rel:!0});var r1=a(os);Si=r(r1,"CODE",{});var a1=a(Si);Nc=l(a1,"BertTokenizer"),a1.forEach(s),r1.forEach(s),zc=l(Ae," or "),Xs=r(Ae,"A",{href:!0});var n1=a(Xs);Hc=l(n1,"UNet2DConditionModel"),n1.forEach(s),Ae.forEach(s),To.forEach(s),ra=u(t),qe=r(t,"H2",{class:!0});var Ba=a(qe);Je=r(Ba,"A",{id:!0,class:!0,href:!0});var f1=a(Je);qi=r(f1,"SPAN",{});var d1=a(qi);h(ls.$$.fragment,d1),d1.forEach(s),f1.forEach(s),Vc=u(Ba),ji=r(Ba,"SPAN",{});var p1=a(ji);Uc=l(p1,"Loading models"),p1.forEach(s),Ba.forEach(s),aa=u(t),U=r(t,"P",{});var ot=a(U);Bc=l(ot,"Models as defined under "),is=r(ot,"A",{href:!0,rel:!0});var u1=a(is);Rc=l(u1,"src/diffusers/models"),u1.forEach(s),Fc=l(ot," can be loaded via the "),Zs=r(ot,"A",{href:!0});var c1=a(Zs);Gc=l(c1,"ModelMixin.from_pretrained()"),c1.forEach(s),Kc=l(ot," function. The API is very similar the "),eo=r(ot,"A",{href:!0});var h1=a(eo);Wc=l(h1,"DiffusionPipeline.from_pretrained()"),h1.forEach(s),Yc=l(ot," and works in the same way:"),ot.forEach(s),na=u(t),Qe=r(t,"UL",{});var Ra=a(Qe);Y=r(Ra,"LI",{});var lt=a(Y);Jc=l(lt,"Download the latest version of the model weights and configuration with "),xi=r(lt,"CODE",{});var m1=a(xi);Qc=l(m1,"diffusers"),m1.forEach(s),Xc=l(lt," and cache them. If the latest files are available in the local cache, "),to=r(lt,"A",{href:!0});var _1=a(to);Zc=l(_1,"ModelMixin.from_pretrained()"),_1.forEach(s),eh=l(lt," will simply reuse the cache and "),Ai=r(lt,"STRONG",{});var v1=a(Ai);th=l(v1,"not"),v1.forEach(s),sh=l(lt," re-download the files."),lt.forEach(s),oh=u(Ra),je=r(Ra,"LI",{});var Co=a(je);lh=l(Co,"Load the cached weights into the "),Li=r(Co,"EM",{});var g1=a(Li);ih=l(g1,"defined"),g1.forEach(s),rh=l(Co," model class - one of "),so=r(Co,"A",{href:!0});var w1=a(so);ah=l(w1,"the existing model classes"),w1.forEach(s),nh=l(Co," - and return an instance of the class."),Co.forEach(s),Ra.forEach(s),fa=u(t),B=r(t,"P",{});var it=a(B);fh=l(it,"In constrast to "),oo=r(it,"A",{href:!0});var b1=a(oo);dh=l(b1,"DiffusionPipeline.from_pretrained()"),b1.forEach(s),ph=l(it,", models rely on fewer files that usually don\u2019t require a folder structure, but just a "),Ii=r(it,"CODE",{});var E1=a(Ii);uh=l(E1,"diffusion_pytorch_model.bin"),E1.forEach(s),ch=l(it," and "),Ti=r(it,"CODE",{});var y1=a(Ti);hh=l(y1,"config.json"),y1.forEach(s),mh=l(it," file."),it.forEach(s),da=u(t),lo=r(t,"P",{});var D1=a(lo);_h=l(D1,"Let\u2019s look at an example:"),D1.forEach(s),pa=u(t),h(rs.$$.fragment,t),ua=u(t),R=r(t,"P",{});var rt=a(R);vh=l(rt,"Note how we have to define the "),Ci=r(rt,"CODE",{});var P1=a(Ci);gh=l(P1,'subfolder="unet"'),P1.forEach(s),wh=l(rt," argument to tell "),io=r(rt,"A",{href:!0});var $1=a(io);bh=l($1,"ModelMixin.from_pretrained()"),$1.forEach(s),Eh=l(rt," that the model weights are located in a "),as=r(rt,"A",{href:!0,rel:!0});var k1=a(as);yh=l(k1,"subfolder of the repository"),k1.forEach(s),Dh=l(rt,"."),rt.forEach(s),ca=u(t),pe=r(t,"P",{});var Oo=a(pe);Ph=l(Oo,"As explained in "),ro=r(Oo,"A",{href:!0});var M1=a(ro);$h=l(M1,"Loading customized pipelines"),M1.forEach(s),kh=l(Oo,", one can pass a loaded model to a diffusion pipeline, via "),ao=r(Oo,"A",{href:!0});var S1=a(ao);Mh=l(S1,"DiffusionPipeline.from_pretrained()"),S1.forEach(s),Sh=l(Oo,":"),Oo.forEach(s),ha=u(t),h(ns.$$.fragment,t),ma=u(t),ue=r(t,"P",{});var No=a(ue);qh=l(No,"If the model files can be found directly at the root level, which is usually only the case for some very simple diffusion models, such as "),fs=r(No,"A",{href:!0,rel:!0});var q1=a(fs);Oi=r(q1,"CODE",{});var j1=a(Oi);jh=l(j1,"google/ddpm-cifar10-32"),j1.forEach(s),q1.forEach(s),xh=l(No,`, we don\u2019t
need to pass a `),Ni=r(No,"CODE",{});var x1=a(Ni);Ah=l(x1,"subfolder"),x1.forEach(s),Lh=l(No," argument:"),No.forEach(s),_a=u(t),h(ds.$$.fragment,t),va=u(t),xe=r(t,"H2",{class:!0});var Fa=a(xe);Xe=r(Fa,"A",{id:!0,class:!0,href:!0});var A1=a(Xe);zi=r(A1,"SPAN",{});var L1=a(zi);h(ps.$$.fragment,L1),L1.forEach(s),A1.forEach(s),Ih=u(Fa),Hi=r(Fa,"SPAN",{});var I1=a(Hi);Th=l(I1,"Loading schedulers"),I1.forEach(s),Fa.forEach(s),ga=u(t),F=r(t,"P",{});var at=a(F);Ch=l(at,"Schedulers rely on "),no=r(at,"A",{href:!0});var T1=a(no);Oh=l(T1,"SchedulerMixin.from_pretrained()"),T1.forEach(s),Nh=l(at,". Schedulers are "),Vi=r(at,"STRONG",{});var C1=a(Vi);zh=l(C1,"not parameterized"),C1.forEach(s),Hh=l(at," or "),Ui=r(at,"STRONG",{});var O1=a(Ui);Vh=l(O1,"trained"),O1.forEach(s),Uh=l(at,`, but instead purely defined by a configuration file.
For consistency, we use the same method name as we do for models or pipelines, but no weights are loaded in this case.`),at.forEach(s),wa=u(t),fo=r(t,"P",{});var N1=a(fo);Bh=l(N1,`In constrast to pipelines or models, loading schedulers does not consume any significant amount of memory and the same configuration file can often be used for a variety of different schedulers.
For example, all of:`),N1.forEach(s),ba=u(t),$=r(t,"UL",{});var T=a($);Bi=r(T,"LI",{});var z1=a(Bi);po=r(z1,"A",{href:!0});var H1=a(po);Rh=l(H1,"DDPMScheduler"),H1.forEach(s),z1.forEach(s),Fh=u(T),Ri=r(T,"LI",{});var V1=a(Ri);uo=r(V1,"A",{href:!0});var U1=a(uo);Gh=l(U1,"DDIMScheduler"),U1.forEach(s),V1.forEach(s),Kh=u(T),Fi=r(T,"LI",{});var B1=a(Fi);co=r(B1,"A",{href:!0});var R1=a(co);Wh=l(R1,"PNDMScheduler"),R1.forEach(s),B1.forEach(s),Yh=u(T),Gi=r(T,"LI",{});var F1=a(Gi);ho=r(F1,"A",{href:!0});var G1=a(ho);Jh=l(G1,"LMSDiscreteScheduler"),G1.forEach(s),F1.forEach(s),Qh=u(T),Ki=r(T,"LI",{});var K1=a(Ki);mo=r(K1,"A",{href:!0});var W1=a(mo);Xh=l(W1,"EulerDiscreteScheduler"),W1.forEach(s),K1.forEach(s),Zh=u(T),Wi=r(T,"LI",{});var Y1=a(Wi);_o=r(Y1,"A",{href:!0});var J1=a(_o);em=l(J1,"EulerAncestralDiscreteScheduler"),J1.forEach(s),Y1.forEach(s),tm=u(T),Yi=r(T,"LI",{});var Q1=a(Yi);vo=r(Q1,"A",{href:!0});var X1=a(vo);sm=l(X1,"DPMSolverMultistepScheduler"),X1.forEach(s),Q1.forEach(s),T.forEach(s),Ea=u(t),Ze=r(t,"P",{});var Ga=a(Ze);om=l(Ga,"are compatible with "),go=r(Ga,"A",{href:!0});var Z1=a(go);lm=l(Z1,"StableDiffusionPipeline"),Z1.forEach(s),im=l(Ga," and therefore the same scheduler configuration file can be loaded in any of those classes:"),Ga.forEach(s),ya=u(t),h(us.$$.fragment,t),this.h()},h(){d(be,"name","hf:doc:metadata"),d(be,"content",JSON.stringify(n2)),d(Le,"id","loading"),d(Le,"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"),d(Le,"href","#loading"),d(Ee,"class","relative group"),d(_s,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(vs,"href","/docs/diffusers/v0.10.2/en/api/models#diffusers.ModelMixin.from_pretrained"),d(gs,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.SchedulerMixin.from_pretrained"),d(Te,"id","loading-pipelines"),d(Te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Te,"href","#loading-pipelines"),d(ye,"class","relative group"),d(ws,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(ht,"href","https://huggingface.co/models?library=diffusers"),d(ht,"rel","nofollow"),d(mt,"href","https://huggingface.co/CompVis/ldm-text2im-large-256"),d(mt,"rel","nofollow"),d(bs,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(Es,"href","/docs/diffusers/v0.10.2/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Ce,"href","/docs/diffusers/v0.10.2/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline.__call__"),d(ys,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(Ds,"href","/docs/diffusers/v0.10.2/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Ps,"href","/docs/diffusers/v0.10.2/en/api/pipelines/stable_diffusion#diffusers.StableDiffusionPipeline"),d(gt,"href","https://huggingface.co/blog/stable_diffusion#how-does-stable-diffusion-work"),d(gt,"rel","nofollow"),d($s,"href","./api/overview#diffusers-summary"),d(Ne,"id","loading-pipelines-that-require-access-request"),d(Ne,"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"),d(Ne,"href","#loading-pipelines-that-require-access-request"),d(De,"class","relative group"),d(bt,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),d(bt,"rel","nofollow"),d(yt,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),d(yt,"rel","nofollow"),d(Pt,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),d(Pt,"rel","nofollow"),l2(ks.src,dm="https://raw.githubusercontent.com/huggingface/diffusers/main/docs/source/imgs/access_request.png")||d(ks,"src",dm),d(ks,"width","400"),d(K,"align","center"),d(kt,"href","https://huggingface.co/docs/hub/security-tokens#user-access-tokens"),d(kt,"rel","nofollow"),d(ze,"id","loading-pipelines-locally"),d(ze,"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"),d(ze,"href","#loading-pipelines-locally"),d(Pe,"class","relative group"),d(js,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(qt,"href","https://huggingface.co/CompVis/ldm-text2im-large-256"),d(qt,"rel","nofollow"),d(jt,"href","https://git-lfs.github.com/"),d(jt,"rel","nofollow"),d(xt,"href","https://huggingface.co/CompVis/ldm-text2im-large-256/tree/main"),d(xt,"rel","nofollow"),d(xs,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(He,"id","loading-customized-pipelines"),d(He,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(He,"href","#loading-customized-pipelines"),d($e,"class","relative group"),d(Tt,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),d(Tt,"rel","nofollow"),d(As,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.PNDMScheduler"),d(Ls,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Is,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.EulerDiscreteScheduler"),d(Ts,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.DPMSolverMultistepScheduler"),d(Ns,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.SchedulerMixin.from_pretrained"),d(Ot,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5/tree/main/scheduler"),d(Ot,"rel","nofollow"),d(zs,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Hs,"href","/docs/diffusers/v0.10.2/en/api/pipelines/stable_diffusion#diffusers.StableDiffusionPipeline"),d(Nt,"href","https://github.com/huggingface/diffusers/blob/0dd8c6b4dbab4069de9ed1cafb53cbd495873879/src/diffusers/schedulers/scheduling_ddim.py#L112"),d(Nt,"rel","nofollow"),d(Ht,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),d(Ht,"rel","nofollow"),d(Vs,"href","/docs/diffusers/v0.10.2/en/api/pipelines/stable_diffusion#diffusers.StableDiffusionPipeline"),d(Us,"href","/docs/diffusers/v0.10.2/en/api/pipelines/stable_diffusion#diffusers.StableDiffusionImg2ImgPipeline"),d(Bs,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.components"),d(Be,"id","how-does-loading-work"),d(Be,"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"),d(Be,"href","#how-does-loading-work"),d(ke,"class","relative group"),d(Rs,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Fs,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Gs,"href","./api/overview#diffusers-summary"),d(Ks,"href","/docs/diffusers/v0.10.2/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Bt,"href","https://huggingface.co/CompVis/ldm-text2im-large-256"),d(Bt,"rel","nofollow"),d(Ws,"href","/docs/diffusers/v0.10.2/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Kt,"href","https://github.com/huggingface/diffusers/blob/cd502b25cf0debac6f98d27a6638ef95208d1ea2/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py#L664"),d(Kt,"rel","nofollow"),d(Ys,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.DDIMScheduler"),d(Ge,"href","https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer"),d(Ge,"rel","nofollow"),d(Js,"href","/docs/diffusers/v0.10.2/en/api/models#diffusers.UNet2DConditionModel"),d(Qs,"href","/docs/diffusers/v0.10.2/en/api/models#diffusers.AutoencoderKL"),d(Qt,"href","https://huggingface.co/CompVis/ldm-text2im-large-256/tree/main"),d(Qt,"rel","nofollow"),d(ts,"href","https://huggingface.co/CompVis/ldm-text2im-large-256/tree/main/bert"),d(ts,"rel","nofollow"),d(ss,"href","https://github.com/huggingface/diffusers/blob/cd502b25cf0debac6f98d27a6638ef95208d1ea2/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py#L42"),d(ss,"rel","nofollow"),d(os,"href","https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer"),d(os,"rel","nofollow"),d(Xs,"href","/docs/diffusers/v0.10.2/en/api/models#diffusers.UNet2DConditionModel"),d(Je,"id","loading-models"),d(Je,"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"),d(Je,"href","#loading-models"),d(qe,"class","relative group"),d(is,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/models"),d(is,"rel","nofollow"),d(Zs,"href","/docs/diffusers/v0.10.2/en/api/models#diffusers.ModelMixin.from_pretrained"),d(eo,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(to,"href","/docs/diffusers/v0.10.2/en/api/models#diffusers.ModelMixin.from_pretrained"),d(so,"href","./api/models"),d(oo,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(io,"href","/docs/diffusers/v0.10.2/en/api/models#diffusers.ModelMixin.from_pretrained"),d(as,"href","https://huggingface.co/CompVis/ldm-text2im-large-256/tree/main/unet"),d(as,"rel","nofollow"),d(ro,"href","%22./using-diffusers/loading#loading-customized-pipelines%22"),d(ao,"href","/docs/diffusers/v0.10.2/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(fs,"href","https://huggingface.co/google/ddpm-cifar10-32"),d(fs,"rel","nofollow"),d(Xe,"id","loading-schedulers"),d(Xe,"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"),d(Xe,"href","#loading-schedulers"),d(xe,"class","relative group"),d(no,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.SchedulerMixin.from_pretrained"),d(po,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.DDPMScheduler"),d(uo,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.DDIMScheduler"),d(co,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.PNDMScheduler"),d(ho,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.LMSDiscreteScheduler"),d(mo,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.EulerDiscreteScheduler"),d(_o,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.EulerAncestralDiscreteScheduler"),d(vo,"href","/docs/diffusers/v0.10.2/en/api/schedulers#diffusers.DPMSolverMultistepScheduler"),d(go,"href","/docs/diffusers/v0.10.2/en/api/pipelines/stable_diffusion#diffusers.StableDiffusionPipeline")},m(t,n){e(document.head,be),f(t,Zi,n),f(t,Ee,n),e(Ee,Le),e(Le,zo),m(ft,zo,null),e(Ee,Ka),e(Ee,Ho),e(Ho,Wa),f(t,er,n),f(t,Ie,n),e(Ie,Ya),e(Ie,Vo),e(Vo,Ja),e(Ie,Qa),f(t,tr,n),f(t,ms,n),e(ms,Xa),f(t,sr,n),f(t,J,n),e(J,dt),e(dt,Uo),e(Uo,Za),e(dt,en),e(dt,_s),e(_s,tn),e(J,sn),e(J,pt),e(pt,Bo),e(Bo,on),e(pt,ln),e(pt,vs),e(vs,rn),e(J,an),e(J,ut),e(ut,Ro),e(Ro,nn),e(ut,fn),e(ut,gs),e(gs,dn),f(t,or,n),f(t,ye,n),e(ye,Te),e(Te,Fo),m(ct,Fo,null),e(ye,pn),e(ye,Go),e(Go,un),f(t,lr,n),f(t,N,n),e(N,cn),e(N,ws),e(ws,hn),e(N,mn),e(N,ht),e(ht,_n),e(N,vn),e(N,mt),e(mt,gn),e(N,wn),f(t,ir,n),m(_t,t,n),f(t,rr,n),f(t,D,n),e(D,bn),e(D,bs),e(bs,En),e(D,yn),e(D,Ko),e(Ko,Dn),e(D,Pn),e(D,Es),e(Es,$n),e(D,kn),e(D,Wo),e(Wo,Mn),e(D,Sn),e(D,Ce),e(Ce,qn),e(Ce,Yo),e(Yo,jn),e(Ce,xn),e(D,An),e(D,Jo),e(Jo,Ln),e(D,In),f(t,ar,n),f(t,Oe,n),e(Oe,Tn),e(Oe,ys),e(ys,Cn),e(Oe,On),f(t,nr,n),m(vt,t,n),f(t,fr,n),f(t,b,n),e(b,Nn),e(b,Qo),e(Qo,zn),e(b,Hn),e(b,Xo),e(Xo,Vn),e(b,Un),e(b,Zo),e(Zo,Bn),e(b,Rn),e(b,el),e(el,Fn),e(b,Gn),e(b,Ds),e(Ds,Kn),e(b,Wn),e(b,Ps),e(Ps,Yn),e(b,Jn),e(b,gt),e(gt,Qn),e(b,Xn),e(b,$s),e($s,Zn),e(b,ef),f(t,dr,n),f(t,De,n),e(De,Ne),e(Ne,tl),m(wt,tl,null),e(De,tf),e(De,sl),e(sl,sf),f(t,pr,n),f(t,Q,n),e(Q,of),e(Q,ol),e(ol,lf),e(Q,rf),e(Q,bt),e(bt,ll),e(ll,af),e(Q,nf),f(t,ur,n),m(Et,t,n),f(t,cr,n),f(t,X,n),e(X,ff),e(X,il),e(il,df),e(X,pf),e(X,yt),e(yt,uf),e(X,cf),f(t,hr,n),m(Dt,t,n),f(t,mr,n),f(t,Z,n),e(Z,hf),e(Z,rl),e(rl,mf),e(Z,_f),e(Z,Pt),e(Pt,vf),e(Z,gf),f(t,_r,n),f(t,K,n),e(K,wf),e(K,bf),e(K,ks),e(K,Ef),e(K,yf),f(t,vr,n),f(t,Ms,n),e(Ms,Df),f(t,gr,n),m($t,t,n),f(t,wr,n),f(t,q,n),e(q,Pf),e(q,kt),e(kt,$f),e(q,kf),e(q,al),e(al,Mf),e(q,Sf),e(q,nl),e(nl,qf),e(q,jf),e(q,fl),e(fl,xf),e(q,Af),f(t,br,n),m(Mt,t,n),f(t,Er,n),f(t,Ss,n),e(Ss,Lf),f(t,yr,n),f(t,Pe,n),e(Pe,ze),e(ze,dl),m(St,dl,null),e(Pe,If),e(Pe,pl),e(pl,Tf),f(t,Dr,n),f(t,qs,n),e(qs,Cf),f(t,Pr,n),f(t,ee,n),e(ee,Of),e(ee,js),e(js,Nf),e(ee,zf),e(ee,qt),e(qt,Hf),e(ee,Vf),f(t,$r,n),f(t,te,n),e(te,Uf),e(te,jt),e(jt,ul),e(ul,Bf),e(te,Rf),e(te,xt),e(xt,Ff),e(te,Gf),f(t,kr,n),m(At,t,n),f(t,Mr,n),f(t,se,n),e(se,Kf),e(se,cl),e(cl,Wf),e(se,Yf),e(se,hl),e(hl,Jf),e(se,Qf),f(t,Sr,n),m(Lt,t,n),f(t,qr,n),f(t,oe,n),e(oe,Xf),e(oe,ml),e(ml,Zf),e(oe,ed),e(oe,xs),e(xs,td),e(oe,sd),f(t,jr,n),f(t,$e,n),e($e,He),e(He,_l),m(It,_l,null),e($e,od),e($e,vl),e(vl,ld),f(t,xr,n),f(t,j,n),e(j,id),e(j,gl),e(gl,rd),e(j,ad),e(j,Tt),e(Tt,nd),e(j,fd),e(j,As),e(As,dd),e(j,pd),e(j,Ls),e(Ls,ud),e(j,cd),f(t,Ar,n),f(t,W,n),e(W,wl),e(wl,hd),e(W,md),e(W,Is),e(Is,_d),e(W,vd),e(W,Ts),e(Ts,gd),e(W,wd),f(t,Lr,n),m(Ct,t,n),f(t,Ir,n),f(t,Cs,n),e(Cs,bd),f(t,Tr,n),f(t,le,n),e(le,Os),e(Os,Ed),e(Os,Ns),e(Ns,yd),e(le,Dd),e(le,Ve),e(Ve,Pd),e(Ve,bl),e(bl,$d),e(Ve,kd),e(Ve,Ot),e(Ot,Md),e(le,Sd),e(le,P),e(P,qd),e(P,El),e(El,jd),e(P,xd),e(P,zs),e(zs,Ad),e(P,Ld),e(P,Hs),e(Hs,Id),e(P,Td),e(P,yl),e(yl,Cd),e(P,Od),e(P,Dl),e(Dl,Nd),e(P,zd),e(P,Pl),e(Pl,Hd),e(P,Vd),e(P,$l),e($l,Ud),f(t,Cr,n),f(t,z,n),e(z,Bd),e(z,kl),e(kl,Rd),e(z,Fd),e(z,Nt),e(Nt,Gd),e(z,Kd),e(z,Ml),e(Ml,Wd),e(z,Yd),f(t,Or,n),f(t,ie,n),e(ie,Jd),e(ie,Sl),e(Sl,Qd),e(ie,Xd),e(ie,ql),e(ql,Zd),e(ie,ep),f(t,Nr,n),m(zt,t,n),f(t,zr,n),f(t,x,n),e(x,tp),e(x,jl),e(jl,sp),e(x,op),e(x,Ht),e(Ht,xl),e(xl,lp),e(x,ip),e(x,Vs),e(Vs,rp),e(x,ap),e(x,Us),e(Us,np),e(x,fp),f(t,Hr,n),m(Vt,t,n),f(t,Vr,n),f(t,Ue,n),e(Ue,dp),e(Ue,Bs),e(Bs,pp),e(Ue,up),f(t,Ur,n),f(t,ke,n),e(ke,Be),e(Be,Al),m(Ut,Al,null),e(ke,cp),e(ke,Ll),e(Ll,hp),f(t,Br,n),f(t,Re,n),e(Re,mp),e(Re,Rs),e(Rs,_p),e(Re,vp),f(t,Rr,n),f(t,Fe,n),e(Fe,C),e(C,gp),e(C,Il),e(Il,wp),e(C,bp),e(C,Tl),e(Tl,Ep),e(C,yp),e(C,Fs),e(Fs,Dp),e(C,Pp),e(C,Cl),e(Cl,$p),e(C,kp),e(Fe,Mp),e(Fe,O),e(O,Sp),e(O,Ol),e(Ol,qp),e(O,jp),e(O,Gs),e(Gs,xp),e(O,Ap),e(O,Nl),e(Nl,Lp),e(O,Ip),e(O,zl),e(zl,Tp),e(O,Cp),f(t,Fr,n),f(t,A,n),e(A,Op),e(A,Hl),e(Hl,Np),e(A,zp),e(A,Ks),e(Ks,Hp),e(A,Vp),e(A,Bt),e(Bt,Vl),e(Vl,Up),e(A,Bp),e(A,Ul),e(Ul,Rp),e(A,Fp),f(t,Gr,n),m(Rt,t,n),f(t,Kr,n),f(t,Ft,n),e(Ft,Bl),e(Bl,Gp),e(Ft,Kp),f(t,Wr,n),m(Gt,t,n),f(t,Yr,n),f(t,re,n),e(re,Wp),e(re,Ws),e(Ws,Yp),e(re,Jp),e(re,Rl),e(Rl,Qp),e(re,Xp),f(t,Jr,n),f(t,L,n),e(L,Me),e(Me,Fl),e(Fl,Zp),e(Me,eu),e(Me,Gl),e(Gl,tu),e(Me,su),e(Me,Kt),e(Kt,ou),e(L,lu),e(L,Wt),e(Wt,Kl),e(Kl,iu),e(Wt,ru),e(Wt,Ys),e(Ys,au),e(L,nu),e(L,Se),e(Se,Wl),e(Wl,fu),e(Se,du),e(Se,Yl),e(Yl,pu),e(Se,uu),e(Se,Ge),e(Ge,cu),e(Ge,Jl),e(Jl,hu),e(L,mu),e(L,Yt),e(Yt,Ql),e(Ql,_u),e(Yt,vu),e(Yt,Js),e(Js,gu),e(L,wu),e(L,Jt),e(Jt,Xl),e(Xl,bu),e(Jt,Eu),e(Jt,Qs),e(Qs,yu),f(t,Qr,n),f(t,H,n),e(H,Du),e(H,Zl),e(Zl,Pu),e(H,$u),e(H,Qt),e(Qt,ei),e(ei,ku),e(H,Mu),e(H,ti),e(ti,Su),e(H,qu),f(t,Xr,n),m(Xt,t,n),f(t,Zr,n),f(t,w,n),e(w,ju),e(w,si),e(si,xu),e(w,Au),e(w,oi),e(oi,Lu),e(w,Iu),e(w,li),e(li,Tu),e(w,Cu),e(w,ii),e(ii,Ou),e(w,Nu),e(w,ri),e(ri,zu),e(w,Hu),e(w,ai),e(ai,Vu),e(w,Uu),e(w,ni),e(ni,Bu),e(w,Ru),e(w,fi),e(fi,Fu),e(w,Gu),e(w,di),e(di,Ku),e(w,Wu),f(t,ea,n),f(t,Ke,n),e(Ke,pi),e(pi,Yu),e(Ke,Ju),e(Ke,ui),e(ui,Qu),f(t,ta,n),f(t,ae,n),e(ae,Xu),e(ae,ci),e(ci,Zu),e(ae,ec),e(ae,hi),e(hi,tc),e(ae,sc),f(t,sa,n),m(Zt,t,n),f(t,oa,n),f(t,ne,n),e(ne,We),e(We,mi),e(mi,oc),e(We,lc),e(We,_i),e(_i,ic),e(We,rc),e(ne,ac),e(ne,Ye),e(Ye,vi),e(vi,nc),e(Ye,fc),e(Ye,gi),e(gi,dc),e(Ye,pc),e(ne,uc),e(ne,wi),e(wi,cc),f(t,la,n),m(es,t,n),f(t,ia,n),f(t,fe,n),e(fe,de),e(de,hc),e(de,bi),e(bi,mc),e(de,_c),e(de,ts),e(ts,vc),e(de,gc),e(de,ss),e(ss,wc),e(fe,bc),e(fe,M),e(M,Ec),e(M,Ei),e(Ei,yc),e(M,Dc),e(M,yi),e(yi,Pc),e(M,$c),e(M,Di),e(Di,kc),e(M,Mc),e(M,Pi),e(Pi,Sc),e(M,qc),e(M,$i),e($i,jc),e(M,xc),e(fe,Ac),e(fe,V),e(V,Lc),e(V,ki),e(ki,Ic),e(V,Tc),e(V,Mi),e(Mi,Cc),e(V,Oc),e(V,os),e(os,Si),e(Si,Nc),e(V,zc),e(V,Xs),e(Xs,Hc),f(t,ra,n),f(t,qe,n),e(qe,Je),e(Je,qi),m(ls,qi,null),e(qe,Vc),e(qe,ji),e(ji,Uc),f(t,aa,n),f(t,U,n),e(U,Bc),e(U,is),e(is,Rc),e(U,Fc),e(U,Zs),e(Zs,Gc),e(U,Kc),e(U,eo),e(eo,Wc),e(U,Yc),f(t,na,n),f(t,Qe,n),e(Qe,Y),e(Y,Jc),e(Y,xi),e(xi,Qc),e(Y,Xc),e(Y,to),e(to,Zc),e(Y,eh),e(Y,Ai),e(Ai,th),e(Y,sh),e(Qe,oh),e(Qe,je),e(je,lh),e(je,Li),e(Li,ih),e(je,rh),e(je,so),e(so,ah),e(je,nh),f(t,fa,n),f(t,B,n),e(B,fh),e(B,oo),e(oo,dh),e(B,ph),e(B,Ii),e(Ii,uh),e(B,ch),e(B,Ti),e(Ti,hh),e(B,mh),f(t,da,n),f(t,lo,n),e(lo,_h),f(t,pa,n),m(rs,t,n),f(t,ua,n),f(t,R,n),e(R,vh),e(R,Ci),e(Ci,gh),e(R,wh),e(R,io),e(io,bh),e(R,Eh),e(R,as),e(as,yh),e(R,Dh),f(t,ca,n),f(t,pe,n),e(pe,Ph),e(pe,ro),e(ro,$h),e(pe,kh),e(pe,ao),e(ao,Mh),e(pe,Sh),f(t,ha,n),m(ns,t,n),f(t,ma,n),f(t,ue,n),e(ue,qh),e(ue,fs),e(fs,Oi),e(Oi,jh),e(ue,xh),e(ue,Ni),e(Ni,Ah),e(ue,Lh),f(t,_a,n),m(ds,t,n),f(t,va,n),f(t,xe,n),e(xe,Xe),e(Xe,zi),m(ps,zi,null),e(xe,Ih),e(xe,Hi),e(Hi,Th),f(t,ga,n),f(t,F,n),e(F,Ch),e(F,no),e(no,Oh),e(F,Nh),e(F,Vi),e(Vi,zh),e(F,Hh),e(F,Ui),e(Ui,Vh),e(F,Uh),f(t,wa,n),f(t,fo,n),e(fo,Bh),f(t,ba,n),f(t,$,n),e($,Bi),e(Bi,po),e(po,Rh),e($,Fh),e($,Ri),e(Ri,uo),e(uo,Gh),e($,Kh),e($,Fi),e(Fi,co),e(co,Wh),e($,Yh),e($,Gi),e(Gi,ho),e(ho,Jh),e($,Qh),e($,Ki),e(Ki,mo),e(mo,Xh),e($,Zh),e($,Wi),e(Wi,_o),e(_o,em),e($,tm),e($,Yi),e(Yi,vo),e(vo,sm),f(t,Ea,n),f(t,Ze,n),e(Ze,om),e(Ze,go),e(go,lm),e(Ze,im),f(t,ya,n),m(us,t,n),Da=!0},p:i2,i(t){Da||(_(ft.$$.fragment,t),_(ct.$$.fragment,t),_(_t.$$.fragment,t),_(vt.$$.fragment,t),_(wt.$$.fragment,t),_(Et.$$.fragment,t),_(Dt.$$.fragment,t),_($t.$$.fragment,t),_(Mt.$$.fragment,t),_(St.$$.fragment,t),_(At.$$.fragment,t),_(Lt.$$.fragment,t),_(It.$$.fragment,t),_(Ct.$$.fragment,t),_(zt.$$.fragment,t),_(Vt.$$.fragment,t),_(Ut.$$.fragment,t),_(Rt.$$.fragment,t),_(Gt.$$.fragment,t),_(Xt.$$.fragment,t),_(Zt.$$.fragment,t),_(es.$$.fragment,t),_(ls.$$.fragment,t),_(rs.$$.fragment,t),_(ns.$$.fragment,t),_(ds.$$.fragment,t),_(ps.$$.fragment,t),_(us.$$.fragment,t),Da=!0)},o(t){v(ft.$$.fragment,t),v(ct.$$.fragment,t),v(_t.$$.fragment,t),v(vt.$$.fragment,t),v(wt.$$.fragment,t),v(Et.$$.fragment,t),v(Dt.$$.fragment,t),v($t.$$.fragment,t),v(Mt.$$.fragment,t),v(St.$$.fragment,t),v(At.$$.fragment,t),v(Lt.$$.fragment,t),v(It.$$.fragment,t),v(Ct.$$.fragment,t),v(zt.$$.fragment,t),v(Vt.$$.fragment,t),v(Ut.$$.fragment,t),v(Rt.$$.fragment,t),v(Gt.$$.fragment,t),v(Xt.$$.fragment,t),v(Zt.$$.fragment,t),v(es.$$.fragment,t),v(ls.$$.fragment,t),v(rs.$$.fragment,t),v(ns.$$.fragment,t),v(ds.$$.fragment,t),v(ps.$$.fragment,t),v(us.$$.fragment,t),Da=!1},d(t){s(be),t&&s(Zi),t&&s(Ee),g(ft),t&&s(er),t&&s(Ie),t&&s(tr),t&&s(ms),t&&s(sr),t&&s(J),t&&s(or),t&&s(ye),g(ct),t&&s(lr),t&&s(N),t&&s(ir),g(_t,t),t&&s(rr),t&&s(D),t&&s(ar),t&&s(Oe),t&&s(nr),g(vt,t),t&&s(fr),t&&s(b),t&&s(dr),t&&s(De),g(wt),t&&s(pr),t&&s(Q),t&&s(ur),g(Et,t),t&&s(cr),t&&s(X),t&&s(hr),g(Dt,t),t&&s(mr),t&&s(Z),t&&s(_r),t&&s(K),t&&s(vr),t&&s(Ms),t&&s(gr),g($t,t),t&&s(wr),t&&s(q),t&&s(br),g(Mt,t),t&&s(Er),t&&s(Ss),t&&s(yr),t&&s(Pe),g(St),t&&s(Dr),t&&s(qs),t&&s(Pr),t&&s(ee),t&&s($r),t&&s(te),t&&s(kr),g(At,t),t&&s(Mr),t&&s(se),t&&s(Sr),g(Lt,t),t&&s(qr),t&&s(oe),t&&s(jr),t&&s($e),g(It),t&&s(xr),t&&s(j),t&&s(Ar),t&&s(W),t&&s(Lr),g(Ct,t),t&&s(Ir),t&&s(Cs),t&&s(Tr),t&&s(le),t&&s(Cr),t&&s(z),t&&s(Or),t&&s(ie),t&&s(Nr),g(zt,t),t&&s(zr),t&&s(x),t&&s(Hr),g(Vt,t),t&&s(Vr),t&&s(Ue),t&&s(Ur),t&&s(ke),g(Ut),t&&s(Br),t&&s(Re),t&&s(Rr),t&&s(Fe),t&&s(Fr),t&&s(A),t&&s(Gr),g(Rt,t),t&&s(Kr),t&&s(Ft),t&&s(Wr),g(Gt,t),t&&s(Yr),t&&s(re),t&&s(Jr),t&&s(L),t&&s(Qr),t&&s(H),t&&s(Xr),g(Xt,t),t&&s(Zr),t&&s(w),t&&s(ea),t&&s(Ke),t&&s(ta),t&&s(ae),t&&s(sa),g(Zt,t),t&&s(oa),t&&s(ne),t&&s(la),g(es,t),t&&s(ia),t&&s(fe),t&&s(ra),t&&s(qe),g(ls),t&&s(aa),t&&s(U),t&&s(na),t&&s(Qe),t&&s(fa),t&&s(B),t&&s(da),t&&s(lo),t&&s(pa),g(rs,t),t&&s(ua),t&&s(R),t&&s(ca),t&&s(pe),t&&s(ha),g(ns,t),t&&s(ma),t&&s(ue),t&&s(_a),g(ds,t),t&&s(va),t&&s(xe),g(ps),t&&s(ga),t&&s(F),t&&s(wa),t&&s(fo),t&&s(ba),t&&s($),t&&s(Ea),t&&s(Ze),t&&s(ya),g(us,t)}}}const n2={local:"loading",sections:[{local:"loading-pipelines",sections:[{local:"loading-pipelines-that-require-access-request",title:"Loading pipelines that require access request"},{local:"loading-pipelines-locally",title:"Loading pipelines locally"},{local:"loading-customized-pipelines",title:"Loading customized pipelines"},{local:"how-does-loading-work",title:"How does loading work?"}],title:"Loading pipelines"},{local:"loading-models",title:"Loading models"},{local:"loading-schedulers",title:"Loading schedulers"}],title:"Loading"};function f2(fm){return r2(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class c2 extends e2{constructor(be){super();t2(this,be,f2,a2,s2,{})}}export{c2 as default,n2 as metadata};

Xet Storage Details

Size:
89.2 kB
·
Xet hash:
083a631150e7d5877a5a4aadc884bb67aad739e5ea30eeac4db8e26ba5285f09

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.