import{S as e2,i as t2,s as s2,e as l,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 i,b as d,N as i2,G as e,g as f,y as m,L as l2,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,Zl,Ee,Le,No,ft,Ka,zo,Wa,er,Ie,Ya,Ho,Ja,Qa,tr,ms,Xa,sr,J,dt,Vo,Za,en,_s,tn,sn,pt,Uo,on,ln,vs,rn,an,ut,Bo,nn,fn,gs,dn,or,ye,Te,Ro,ct,pn,Fo,un,ir,N,cn,ws,hn,mn,ht,_n,vn,mt,gn,wn,lr,_t,rr,D,bn,bs,En,yn,Go,Dn,Pn,Es,$n,kn,Ko,Mn,Sn,Ce,qn,Wo,jn,xn,An,Yo,Ln,In,ar,Oe,Tn,ys,Cn,On,nr,vt,fr,b,Nn,Jo,zn,Hn,Qo,Vn,Un,Xo,Bn,Rn,Zo,Fn,Gn,Ds,Kn,Wn,Ps,Yn,Jn,gt,Qn,Xn,$s,Zn,ef,dr,De,Ne,ei,wt,tf,ti,sf,pr,Q,of,si,lf,rf,bt,oi,af,nf,ur,Et,cr,X,ff,ii,df,pf,yt,uf,cf,hr,Dt,mr,Z,hf,li,mf,_f,Pt,vf,gf,_r,K,wf,bf,ks,dm,Ef,yf,vr,Ms,Df,gr,$t,wr,q,Pf,kt,$f,kf,ri,Mf,Sf,ai,qf,jf,ni,xf,Af,br,Mt,Er,Ss,Lf,yr,Pe,ze,fi,St,If,di,Tf,Dr,qs,Cf,Pr,ee,Of,js,Nf,zf,qt,Hf,Vf,$r,te,Uf,jt,pi,Bf,Rf,xt,Ff,Gf,kr,At,Mr,se,Kf,ui,Wf,Yf,ci,Jf,Qf,Sr,Lt,qr,oe,Xf,hi,Zf,ed,xs,td,sd,jr,$e,He,mi,It,od,_i,id,xr,j,ld,vi,rd,ad,Tt,nd,fd,As,dd,pd,Ls,ud,cd,Ar,W,gi,hd,md,Is,_d,vd,Ts,gd,wd,Lr,Ct,Ir,Cs,bd,Tr,ie,Os,Ed,Ns,yd,Dd,Ve,Pd,wi,$d,kd,Ot,Md,Sd,P,qd,bi,jd,xd,zs,Ad,Ld,Hs,Id,Td,Ei,Cd,Od,yi,Nd,zd,Di,Hd,Vd,Pi,Ud,Cr,z,Bd,$i,Rd,Fd,Nt,Gd,Kd,ki,Wd,Yd,Or,le,Jd,Mi,Qd,Xd,Si,Zd,ep,Nr,zt,zr,x,tp,qi,sp,op,Ht,ji,ip,lp,Vs,rp,ap,Us,np,fp,Hr,Vt,Vr,Ue,dp,xi,pp,up,Ur,ke,Be,Ai,Ut,cp,Li,hp,Br,Re,mp,Bs,_p,vp,Rr,Fe,C,gp,Ii,wp,bp,Ti,Ep,yp,Rs,Dp,Pp,Ci,$p,kp,Mp,O,Sp,Oi,qp,jp,Fs,xp,Ap,Ni,Lp,Ip,zi,Tp,Cp,Fr,A,Op,Hi,Np,zp,Gs,Hp,Vp,Bt,Vi,Up,Bp,Ui,Rp,Fp,Gr,Rt,Kr,Ft,Bi,Gp,Kp,Wr,Gt,Yr,re,Wp,Ks,Yp,Jp,Ri,Qp,Xp,Jr,L,Me,Fi,Zp,eu,Gi,tu,su,Kt,ou,iu,Wt,Ki,lu,ru,Ws,au,nu,Se,Wi,fu,du,Yi,pu,uu,Ge,cu,Ji,hu,mu,Yt,Qi,_u,vu,Ys,gu,wu,Jt,Xi,bu,Eu,Js,yu,Qr,H,Du,Zi,Pu,$u,Qt,el,ku,Mu,tl,Su,qu,Xr,Xt,Zr,w,ju,sl,xu,Au,ol,Lu,Iu,il,Tu,Cu,ll,Ou,Nu,rl,zu,Hu,al,Vu,Uu,nl,Bu,Ru,fl,Fu,Gu,dl,Ku,Wu,ea,Ke,pl,Yu,Ju,ul,Qu,ta,ae,Xu,cl,Zu,ec,hl,tc,sc,sa,Zt,oa,ne,We,ml,oc,ic,_l,lc,rc,ac,Ye,vl,nc,fc,gl,dc,pc,uc,wl,cc,ia,es,la,fe,de,hc,bl,mc,_c,ts,vc,gc,ss,wc,bc,M,Ec,El,yc,Dc,yl,Pc,$c,Dl,kc,Mc,Pl,Sc,qc,$l,jc,xc,Ac,V,Lc,kl,Ic,Tc,Ml,Cc,Oc,os,Sl,Nc,zc,Qs,Hc,ra,qe,Je,ql,is,Vc,jl,Uc,aa,U,Bc,ls,Rc,Fc,Xs,Gc,Kc,Zs,Wc,Yc,na,Qe,Y,Jc,xl,Qc,Xc,eo,Zc,eh,Al,th,sh,oh,je,ih,Ll,lh,rh,to,ah,nh,fa,B,fh,so,dh,ph,Il,uh,ch,Tl,hh,mh,da,oo,_h,pa,rs,ua,R,vh,Cl,gh,wh,io,bh,Eh,as,yh,Dh,ca,pe,Ph,lo,$h,kh,ro,Mh,Sh,ha,ns,ma,ue,qh,fs,Ol,jh,xh,Nl,Ah,Lh,_a,ds,va,xe,Xe,zl,ps,Ih,Hl,Th,ga,F,Ch,ao,Oh,Nh,Vl,zh,Hh,Ul,Vh,Uh,wa,no,Bh,ba,$,Bl,fo,Rh,Fh,Rl,po,Gh,Kh,Fl,uo,Wh,Yh,Gl,co,Jh,Qh,Kl,ho,Xh,Zh,Wl,mo,em,tm,Yl,_o,sm,Ea,Ze,om,vo,im,lm,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>
]`}}),is=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=l("meta"),Zl=p(),Ee=l("h1"),Le=l("a"),No=l("span"),c(ft.$$.fragment),Ka=p(),zo=l("span"),Wa=o("Loading"),er=p(),Ie=l("p"),Ya=o("A core premise of the diffusers library is to make diffusion models "),Ho=l("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=l("p"),Xa=o("In the following we explain in-detail how to easily load:"),sr=p(),J=l("ul"),dt=l("li"),Vo=l("em"),Za=o("Complete Diffusion Pipelines"),en=o(" via the "),_s=l("a"),tn=o("DiffusionPipeline.from_pretrained()"),sn=p(),pt=l("li"),Uo=l("em"),on=o("Diffusion Models"),ln=o(" via "),vs=l("a"),rn=o("ModelMixin.from_pretrained()"),an=p(),ut=l("li"),Bo=l("em"),nn=o("Schedulers"),fn=o(" via "),gs=l("a"),dn=o("SchedulerMixin.from_pretrained()"),or=p(),ye=l("h2"),Te=l("a"),Ro=l("span"),c(ct.$$.fragment),pn=p(),Fo=l("span"),un=o("Loading pipelines"),ir=p(),N=l("p"),cn=o("The "),ws=l("a"),hn=o("DiffusionPipeline"),mn=o(" class is the easiest way to access any diffusion model that is "),ht=l("a"),_n=o("available on the Hub"),vn=o(". Let\u2019s look at an example on how to download "),mt=l("a"),gn=o("CompVis\u2019 Latent Diffusion model"),wn=o("."),lr=p(),c(_t.$$.fragment),rr=p(),D=l("p"),bn=o("Here "),bs=l("a"),En=o("DiffusionPipeline"),yn=o(" automatically detects the correct pipeline ("),Go=l("em"),Dn=o("i.e."),Pn=p(),Es=l("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 "),Ko=l("code"),Mn=o("ldm"),Sn=o(`.
The pipeline instance can then be called using `),Ce=l("a"),qn=o("LDMTextToImagePipeline."),Wo=l("strong"),jn=o("call"),xn=o("()"),An=o(" (i.e., "),Yo=l("code"),Ln=o('ldm("image of a astronaut riding a horse")'),In=o(") for text-to-image generation."),ar=p(),Oe=l("p"),Tn=o("Instead of using the generic "),ys=l("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=l("p"),Nn=o("Diffusion pipelines like "),Jo=l("code"),zn=o("LDMTextToImagePipeline"),Hn=o(" often consist of multiple components. These components can be both parameterized models, such as "),Qo=l("code"),Vn=o('"unet"'),Un=o(", "),Xo=l("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, "),Zo=l("em"),Fn=o("e.g."),Gn=o(" for "),Ds=l("a"),Kn=o("LDMTextToImagePipeline"),Wn=o(" or "),Ps=l("a"),Yn=o("StableDiffusionPipeline"),Jn=o(" the inference call is explained "),gt=l("a"),Qn=o("here"),Xn=o(`.
The purpose of the `),$s=l("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=l("h3"),Ne=l("a"),ei=l("span"),c(wt.$$.fragment),tf=p(),ti=l("span"),sf=o("Loading pipelines that require access request"),pr=p(),Q=l("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, "),si=l("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=l("a"),oi=l("code"),af=o("runwayml/stable-diffusion-v1-5"),nf=o(" the same way as done previously:"),ur=p(),c(Et.$$.fragment),cr=p(),X=l("p"),ff=o("it will only work if you have both "),ii=l("em"),df=o("click-accepted"),pf=o(" the license on "),yt=l("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=l("p"),hf=o("Therefore, we need to make sure to "),li=l("em"),mf=o("click-accept"),_f=o(` the license. You can do this by simply visiting
the `),Pt=l("a"),vf=o("model card"),gf=o(" and clicking on \u201CAgree and access repository\u201D:"),_r=p(),K=l("p"),wf=l("br"),bf=p(),ks=l("img"),Ef=p(),yf=l("br"),vr=p(),Ms=l("p"),Df=o("Second, you need to login with your access token:"),gr=p(),c($t.$$.fragment),wr=p(),q=l("p"),Pf=o("before trying to load the model. Or alternatively, you can pass "),kt=l("a"),$f=o("your access token"),kf=o(" directly via the flag "),ri=l("code"),Mf=o("use_auth_token"),Sf=o(". In this case you do "),ai=l("strong"),qf=o("not"),jf=o(` need
to run `),ni=l("code"),xf=o("huggingface-cli login"),Af=o(" before:"),br=p(),c(Mt.$$.fragment),Er=p(),Ss=l("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=l("h3"),ze=l("a"),fi=l("span"),c(St.$$.fragment),If=p(),di=l("span"),Tf=o("Loading pipelines locally"),Dr=p(),qs=l("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=l("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=l("a"),Nf=o("DiffusionPipeline.from_pretrained()"),zf=o(`. Let\u2019s again look at an example for
`),qt=l("a"),Hf=o("CompVis\u2019 Latent Diffusion model"),Vf=o("."),$r=p(),te=l("p"),Uf=o("First, you should make use of "),jt=l("a"),pi=l("code"),Bf=o("git-lfs"),Rf=o(" to download the whole folder structure that has been uploaded to the "),xt=l("a"),Ff=o("model repository"),Gf=o(":"),kr=p(),c(At.$$.fragment),Mr=p(),se=l("p"),Kf=o("The command above will create a local folder called "),ui=l("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 `),ci=l("code"),Jf=o("from_pretrained"),Qf=o(":"),Sr=p(),c(Lt.$$.fragment),qr=p(),oe=l("p"),Xf=o("If "),hi=l("code"),Zf=o("repo_id"),ed=o(" is a local path, as it is the case here, "),xs=l("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=l("h3"),He=l("a"),mi=l("span"),c(It.$$.fragment),od=p(),_i=l("span"),id=o("Loading customized pipelines"),xr=p(),j=l("p"),ld=o("Advanced users that want to load customized versions of diffusion pipelines can do so by swapping any of the default components, "),vi=l("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=l("a"),nd=o("Stable Diffusion v1-5"),fd=o(" uses the "),As=l("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=l("a"),ud=o("DiffusionPipeline.from_pretrained()"),cd=o("."),Ar=p(),W=l("p"),gi=l("em"),hd=o("E.g."),md=o(" to use "),Is=l("a"),_d=o("EulerDiscreteScheduler"),vd=o(" or "),Ts=l("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=l("p"),bd=o("Three things are worth paying attention to here."),Tr=p(),ie=l("ul"),Os=l("li"),Ed=o("First, the scheduler is loaded with "),Ns=l("a"),yd=o("SchedulerMixin.from_pretrained()"),Dd=p(),Ve=l("li"),Pd=o("Second, the scheduler is loaded with a function argument, called "),wi=l("code"),$d=o('subfolder="scheduler"'),kd=o(" as the configuration of stable diffusion\u2019s scheduling is defined in a "),Ot=l("a"),Md=o("subfolder of the official pipeline repository"),Sd=p(),P=l("li"),qd=o("Third, the scheduler instance can simply be passed with the "),bi=l("code"),jd=o("scheduler"),xd=o(" keyword argument to "),zs=l("a"),Ad=o("DiffusionPipeline.from_pretrained()"),Ld=o(". This works because the "),Hs=l("a"),Id=o("StableDiffusionPipeline"),Td=o(" defines its scheduler with the "),Ei=l("code"),Cd=o("scheduler"),Od=o(" attribute. It\u2019s not possible to use a different name, such as "),yi=l("code"),Nd=o("sampler=scheduler"),zd=o(" since "),Di=l("code"),Hd=o("sampler"),Vd=o(" is not a defined keyword for "),Pi=l("code"),Ud=o("StableDiffusionPipeline.__init__()"),Cr=p(),z=l("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 "),$i=l("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=l("a"),Gd=o("here"),Kd=o(". This is not always the case for other components, such as the "),ki=l("code"),Wd=o('"unet"'),Yd=o("."),Or=p(),le=l("p"),Jd=o("One special case that can also be customized is the "),Mi=l("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 "),Si=l("code"),Zd=o("None"),ep=o(":"),Nr=p(),c(zt.$$.fragment),zr=p(),x=l("p"),tp=o("Another common use case is to reuse the same components in multiple pipelines, "),qi=l("em"),sp=o("e.g."),op=o(" the weights and configurations of "),Ht=l("a"),ji=l("code"),ip=o('"runwayml/stable-diffusion-v1-5"'),lp=o(" can be used for both "),Vs=l("a"),rp=o("StableDiffusionPipeline"),ap=o(" and "),Us=l("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=l("p"),dp=o("Note how the above code snippet makes use of "),xi=l("code"),pp=o("DiffusionPipeline.components"),up=o("."),Ur=p(),ke=l("h3"),Be=l("a"),Ai=l("span"),c(Ut.$$.fragment),cp=p(),Li=l("span"),hp=o("How does loading work?"),Br=p(),Re=l("p"),mp=o("As a class method, "),Bs=l("a"),_p=o("DiffusionPipeline.from_pretrained()"),vp=o(" is responsible for two things:"),Rr=p(),Fe=l("ul"),C=l("li"),gp=o("Download the latest version of the folder structure required to run the "),Ii=l("code"),wp=o("repo_id"),bp=o(" with "),Ti=l("code"),Ep=o("diffusers"),yp=o(" and cache them. If the latest folder structure is available in the local cache, "),Rs=l("a"),Dp=o("DiffusionPipeline.from_pretrained()"),Pp=o(" will simply reuse the cache and "),Ci=l("strong"),$p=o("not"),kp=o(" re-download the files."),Mp=p(),O=l("li"),Sp=o("Load the cached weights into the "),Oi=l("em"),qp=o("correct"),jp=o(" pipeline class \u2013 one of the "),Fs=l("a"),xp=o("officially supported pipeline classes"),Ap=o(" - and return an instance of the class. The "),Ni=l("em"),Lp=o("correct"),Ip=o(" pipeline class is thereby retrieved from the "),zi=l("code"),Tp=o("model_index.json"),Cp=o(" file."),Fr=p(),A=l("p"),Op=o("The underlying folder structure of diffusion pipelines correspond 1-to-1 to their corresponding class instances, "),Hi=l("em"),Np=o("e.g."),zp=p(),Gs=l("a"),Hp=o("LDMTextToImagePipeline"),Vp=o(" for "),Bt=l("a"),Vi=l("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 `),Ui=l("code"),Rp=o("pipeline"),Fp=o(" we just defined:"),Gr=p(),c(Rt.$$.fragment),Kr=p(),Ft=l("p"),Bi=l("em"),Gp=o("Output"),Kp=o(":"),Wr=p(),c(Gt.$$.fragment),Yr=p(),re=l("p"),Wp=o("First, we see that the official pipeline is the "),Ks=l("a"),Yp=o("LDMTextToImagePipeline"),Jp=o(", and second we see that the "),Ri=l("code"),Qp=o("LDMTextToImagePipeline"),Xp=o(" consists of 5 components:"),Jr=p(),L=l("ul"),Me=l("li"),Fi=l("code"),Zp=o('"bert"'),eu=o(" of class "),Gi=l("code"),tu=o("LDMBertModel"),su=o(" as defined "),Kt=l("a"),ou=o("in the pipeline"),iu=p(),Wt=l("li"),Ki=l("code"),lu=o('"scheduler"'),ru=o(" of class "),Ws=l("a"),au=o("DDIMScheduler"),nu=p(),Se=l("li"),Wi=l("code"),fu=o('"tokenizer"'),du=o(" of class "),Yi=l("code"),pu=o("BertTokenizer"),uu=o(" as defined "),Ge=l("a"),cu=o("in "),Ji=l("code"),hu=o("transformers"),mu=p(),Yt=l("li"),Qi=l("code"),_u=o('"unet"'),vu=o(" of class "),Ys=l("a"),gu=o("UNet2DConditionModel"),wu=p(),Jt=l("li"),Xi=l("code"),bu=o('"vqvae"'),Eu=o(" of class "),Js=l("a"),yu=o("AutoencoderKL"),Qr=p(),H=l("p"),Du=o("Let\u2019s now compare the pipeline instance to the folder structure of the model repository "),Zi=l("code"),Pu=o("CompVis/ldm-text2im-large-256"),$u=o(". Looking at the folder structure of "),Qt=l("a"),el=l("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 "),tl=l("code"),Su=o("LDMTextToImagePipeline"),qu=o(" above:"),Xr=p(),c(Xt.$$.fragment),Zr=p(),w=l("p"),ju=o("As we can see each attribute of the instance of "),sl=l("code"),xu=o("LDMTextToImagePipeline"),Au=o(" has its configuration and possibly weights defined in a subfolder that is called "),ol=l("strong"),Lu=o("exactly"),Iu=o(" like the class attribute ("),il=l("code"),Tu=o('"bert"'),Cu=o(", "),ll=l("code"),Ou=o('"scheduler"'),Nu=o(", "),rl=l("code"),zu=o('"tokenizer"'),Hu=o(", "),al=l("code"),Vu=o('"unet"'),Uu=o(", "),nl=l("code"),Bu=o('"vqvae"'),Ru=o("). Importantly, every pipeline expects a "),fl=l("code"),Fu=o("model_index.json"),Gu=o(" file that tells the "),dl=l("code"),Ku=o("DiffusionPipeline"),Wu=o(" both:"),ea=p(),Ke=l("ul"),pl=l("li"),Yu=o("which pipeline class should be loaded, and"),Ju=p(),ul=l("li"),Qu=o("what sub-classes from which library are stored in which subfolders"),ta=p(),ae=l("p"),Xu=o("In the case of "),cl=l("code"),Zu=o("CompVis/ldm-text2im-large-256"),ec=o(" the "),hl=l("code"),tc=o("model_index.json"),sc=o(" is therefore defined as follows:"),sa=p(),c(Zt.$$.fragment),oa=p(),ne=l("ul"),We=l("li"),ml=l("code"),oc=o("_class_name"),ic=o(" tells "),_l=l("code"),lc=o("DiffusionPipeline"),rc=o(" which pipeline class should be loaded."),ac=p(),Ye=l("li"),vl=l("code"),nc=o("_diffusers_version"),fc=o(" can be useful to know under which "),gl=l("code"),dc=o("diffusers"),pc=o(" version this model was created."),uc=p(),wl=l("li"),cc=o("Every component of the pipeline is then defined under the form:"),ia=p(),c(es.$$.fragment),la=p(),fe=l("ul"),de=l("li"),hc=o("The "),bl=l("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=l("a"),vc=o("here"),gc=o(" and "),ss=l("a"),wc=o("here"),bc=p(),M=l("li"),Ec=o("The "),El=l("code"),yc=o('"library"'),Dc=o(" field corresponds to the name of the library, "),yl=l("em"),Pc=o("e.g."),$c=p(),Dl=l("code"),kc=o("diffusers"),Mc=o(" or "),Pl=l("code"),Sc=o("transformers"),qc=o(" from which the "),$l=l("code"),jc=o('"class"'),xc=o(" should be loaded"),Ac=p(),V=l("li"),Lc=o("The "),kl=l("code"),Ic=o('"class"'),Tc=o(" field corresponds to the name of the class, "),Ml=l("em"),Cc=o("e.g."),Oc=p(),os=l("a"),Sl=l("code"),Nc=o("BertTokenizer"),zc=o(" or "),Qs=l("a"),Hc=o("UNet2DConditionModel"),ra=p(),qe=l("h2"),Je=l("a"),ql=l("span"),c(is.$$.fragment),Vc=p(),jl=l("span"),Uc=o("Loading models"),aa=p(),U=l("p"),Bc=o("Models as defined under "),ls=l("a"),Rc=o("src/diffusers/models"),Fc=o(" can be loaded via the "),Xs=l("a"),Gc=o("ModelMixin.from_pretrained()"),Kc=o(" function. The API is very similar the "),Zs=l("a"),Wc=o("DiffusionPipeline.from_pretrained()"),Yc=o(" and works in the same way:"),na=p(),Qe=l("ul"),Y=l("li"),Jc=o("Download the latest version of the model weights and configuration with "),xl=l("code"),Qc=o("diffusers"),Xc=o(" and cache them. If the latest files are available in the local cache, "),eo=l("a"),Zc=o("ModelMixin.from_pretrained()"),eh=o(" will simply reuse the cache and "),Al=l("strong"),th=o("not"),sh=o(" re-download the files."),oh=p(),je=l("li"),ih=o("Load the cached weights into the "),Ll=l("em"),lh=o("defined"),rh=o(" model class - one of "),to=l("a"),ah=o("the existing model classes"),nh=o(" - and return an instance of the class."),fa=p(),B=l("p"),fh=o("In constrast to "),so=l("a"),dh=o("DiffusionPipeline.from_pretrained()"),ph=o(", models rely on fewer files that usually don\u2019t require a folder structure, but just a "),Il=l("code"),uh=o("diffusion_pytorch_model.bin"),ch=o(" and "),Tl=l("code"),hh=o("config.json"),mh=o(" file."),da=p(),oo=l("p"),_h=o("Let\u2019s look at an example:"),pa=p(),c(rs.$$.fragment),ua=p(),R=l("p"),vh=o("Note how we have to define the "),Cl=l("code"),gh=o('subfolder="unet"'),wh=o(" argument to tell "),io=l("a"),bh=o("ModelMixin.from_pretrained()"),Eh=o(" that the model weights are located in a "),as=l("a"),yh=o("subfolder of the repository"),Dh=o("."),ca=p(),pe=l("p"),Ph=o("As explained in "),lo=l("a"),$h=o("Loading customized pipelines"),kh=o(", one can pass a loaded model to a diffusion pipeline, via "),ro=l("a"),Mh=o("DiffusionPipeline.from_pretrained()"),Sh=o(":"),ha=p(),c(ns.$$.fragment),ma=p(),ue=l("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=l("a"),Ol=l("code"),jh=o("google/ddpm-cifar10-32"),xh=o(`, we don\u2019t
need to pass a `),Nl=l("code"),Ah=o("subfolder"),Lh=o(" argument:"),_a=p(),c(ds.$$.fragment),va=p(),xe=l("h2"),Xe=l("a"),zl=l("span"),c(ps.$$.fragment),Ih=p(),Hl=l("span"),Th=o("Loading schedulers"),ga=p(),F=l("p"),Ch=o("Schedulers rely on "),ao=l("a"),Oh=o("SchedulerMixin.from_pretrained()"),Nh=o(". Schedulers are "),Vl=l("strong"),zh=o("not parameterized"),Hh=o(" or "),Ul=l("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(),no=l("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(),$=l("ul"),Bl=l("li"),fo=l("a"),Rh=o("DDPMScheduler"),Fh=p(),Rl=l("li"),po=l("a"),Gh=o("DDIMScheduler"),Kh=p(),Fl=l("li"),uo=l("a"),Wh=o("PNDMScheduler"),Yh=p(),Gl=l("li"),co=l("a"),Jh=o("LMSDiscreteScheduler"),Qh=p(),Kl=l("li"),ho=l("a"),Xh=o("EulerDiscreteScheduler"),Zh=p(),Wl=l("li"),mo=l("a"),em=o("EulerAncestralDiscreteScheduler"),tm=p(),Yl=l("li"),_o=l("a"),sm=o("DPMSolverMultistepScheduler"),Ea=p(),Ze=l("p"),om=o("are compatible with "),vo=l("a"),im=o("StableDiffusionPipeline"),lm=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),Zl=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);No=r(pm,"SPAN",{});var um=a(No);h(ft.$$.fragment,um),um.forEach(s),pm.forEach(s),Ka=u(Pa),zo=r(Pa,"SPAN",{});var cm=a(zo);Wa=i(cm,"Loading"),cm.forEach(s),Pa.forEach(s),er=u(t),Ie=r(t,"P",{});var $a=a(Ie);Ya=i($a,"A core premise of the diffusers library is to make diffusion models "),Ho=r($a,"STRONG",{});var hm=a(Ho);Ja=i(hm,"as accessible as possible"),hm.forEach(s),Qa=i($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=i(mm,"In the following we explain in-detail how to easily load:"),mm.forEach(s),sr=u(t),J=r(t,"UL",{});var go=a(J);dt=r(go,"LI",{});var ka=a(dt);Vo=r(ka,"EM",{});var _m=a(Vo);Za=i(_m,"Complete Diffusion Pipelines"),_m.forEach(s),en=i(ka," via the "),_s=r(ka,"A",{href:!0});var vm=a(_s);tn=i(vm,"DiffusionPipeline.from_pretrained()"),vm.forEach(s),ka.forEach(s),sn=u(go),pt=r(go,"LI",{});var Ma=a(pt);Uo=r(Ma,"EM",{});var gm=a(Uo);on=i(gm,"Diffusion Models"),gm.forEach(s),ln=i(Ma," via "),vs=r(Ma,"A",{href:!0});var wm=a(vs);rn=i(wm,"ModelMixin.from_pretrained()"),wm.forEach(s),Ma.forEach(s),an=u(go),ut=r(go,"LI",{});var Sa=a(ut);Bo=r(Sa,"EM",{});var bm=a(Bo);nn=i(bm,"Schedulers"),bm.forEach(s),fn=i(Sa," via "),gs=r(Sa,"A",{href:!0});var Em=a(gs);dn=i(Em,"SchedulerMixin.from_pretrained()"),Em.forEach(s),Sa.forEach(s),go.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);Ro=r(ym,"SPAN",{});var Dm=a(Ro);h(ct.$$.fragment,Dm),Dm.forEach(s),ym.forEach(s),pn=u(qa),Fo=r(qa,"SPAN",{});var Pm=a(Fo);un=i(Pm,"Loading pipelines"),Pm.forEach(s),qa.forEach(s),ir=u(t),N=r(t,"P",{});var et=a(N);cn=i(et,"The "),ws=r(et,"A",{href:!0});var $m=a(ws);hn=i($m,"DiffusionPipeline"),$m.forEach(s),mn=i(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=i(km,"available on the Hub"),km.forEach(s),vn=i(et,". Let\u2019s look at an example on how to download "),mt=r(et,"A",{href:!0,rel:!0});var Mm=a(mt);gn=i(Mm,"CompVis\u2019 Latent Diffusion model"),Mm.forEach(s),wn=i(et,"."),et.forEach(s),lr=u(t),h(_t.$$.fragment,t),rr=u(t),D=r(t,"P",{});var I=a(D);bn=i(I,"Here "),bs=r(I,"A",{href:!0});var Sm=a(bs);En=i(Sm,"DiffusionPipeline"),Sm.forEach(s),yn=i(I," automatically detects the correct pipeline ("),Go=r(I,"EM",{});var qm=a(Go);Dn=i(qm,"i.e."),qm.forEach(s),Pn=u(I),Es=r(I,"A",{href:!0});var jm=a(Es);$n=i(jm,"LDMTextToImagePipeline"),jm.forEach(s),kn=i(I,"), downloads and caches all required configuration and weight files (if not already done so), and finally returns a pipeline instance, called "),Ko=r(I,"CODE",{});var xm=a(Ko);Mn=i(xm,"ldm"),xm.forEach(s),Sn=i(I,`.
The pipeline instance can then be called using `),Ce=r(I,"A",{href:!0});var ja=a(Ce);qn=i(ja,"LDMTextToImagePipeline."),Wo=r(ja,"STRONG",{});var Am=a(Wo);jn=i(Am,"call"),Am.forEach(s),xn=i(ja,"()"),ja.forEach(s),An=i(I," (i.e., "),Yo=r(I,"CODE",{});var Lm=a(Yo);Ln=i(Lm,'ldm("image of a astronaut riding a horse")'),Lm.forEach(s),In=i(I,") for text-to-image generation."),I.forEach(s),ar=u(t),Oe=r(t,"P",{});var xa=a(Oe);Tn=i(xa,"Instead of using the generic "),ys=r(xa,"A",{href:!0});var Im=a(ys);Cn=i(Im,"DiffusionPipeline"),Im.forEach(s),On=i(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=i(k,"Diffusion pipelines like "),Jo=r(k,"CODE",{});var Tm=a(Jo);zn=i(Tm,"LDMTextToImagePipeline"),Tm.forEach(s),Hn=i(k," often consist of multiple components. These components can be both parameterized models, such as "),Qo=r(k,"CODE",{});var Cm=a(Qo);Vn=i(Cm,'"unet"'),Cm.forEach(s),Un=i(k,", "),Xo=r(k,"CODE",{});var Om=a(Xo);Bn=i(Om,'"vqvae"'),Om.forEach(s),Rn=i(k," and \u201Cbert\u201D, tokenizers or schedulers. These components can interact in complex ways with each other when using the pipeline in inference, "),Zo=r(k,"EM",{});var Nm=a(Zo);Fn=i(Nm,"e.g."),Nm.forEach(s),Gn=i(k," for "),Ds=r(k,"A",{href:!0});var zm=a(Ds);Kn=i(zm,"LDMTextToImagePipeline"),zm.forEach(s),Wn=i(k," or "),Ps=r(k,"A",{href:!0});var Hm=a(Ps);Yn=i(Hm,"StableDiffusionPipeline"),Hm.forEach(s),Jn=i(k," the inference call is explained "),gt=r(k,"A",{href:!0,rel:!0});var Vm=a(gt);Qn=i(Vm,"here"),Vm.forEach(s),Xn=i(k,`.
The purpose of the `),$s=r(k,"A",{href:!0});var Um=a($s);Zn=i(Um,"pipeline classes"),Um.forEach(s),ef=i(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);ei=r(Bm,"SPAN",{});var Rm=a(ei);h(wt.$$.fragment,Rm),Rm.forEach(s),Bm.forEach(s),tf=u(Aa),ti=r(Aa,"SPAN",{});var Fm=a(ti);sf=i(Fm,"Loading pipelines that require access request"),Fm.forEach(s),Aa.forEach(s),pr=u(t),Q=r(t,"P",{});var wo=a(Q);of=i(wo,"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, "),si=r(wo,"EM",{});var Gm=a(si);lf=i(Gm,"e.g."),Gm.forEach(s),rf=i(wo,` 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(wo,"A",{href:!0,rel:!0});var Km=a(bt);oi=r(Km,"CODE",{});var Wm=a(oi);af=i(Wm,"runwayml/stable-diffusion-v1-5"),Wm.forEach(s),Km.forEach(s),nf=i(wo," the same way as done previously:"),wo.forEach(s),ur=u(t),h(Et.$$.fragment,t),cr=u(t),X=r(t,"P",{});var bo=a(X);ff=i(bo,"it will only work if you have both "),ii=r(bo,"EM",{});var Ym=a(ii);df=i(Ym,"click-accepted"),Ym.forEach(s),pf=i(bo," the license on "),yt=r(bo,"A",{href:!0,rel:!0});var Jm=a(yt);uf=i(Jm,"the model card"),Jm.forEach(s),cf=i(bo,` and are logged into the Hugging Face Hub. Otherwise you will get an error message
such as the following:`),bo.forEach(s),hr=u(t),h(Dt.$$.fragment,t),mr=u(t),Z=r(t,"P",{});var Eo=a(Z);hf=i(Eo,"Therefore, we need to make sure to "),li=r(Eo,"EM",{});var Qm=a(li);mf=i(Qm,"click-accept"),Qm.forEach(s),_f=i(Eo,` the license. You can do this by simply visiting
the `),Pt=r(Eo,"A",{href:!0,rel:!0});var Xm=a(Pt);vf=i(Xm,"model card"),Xm.forEach(s),gf=i(Eo," and clicking on \u201CAgree and access repository\u201D:"),Eo.forEach(s),_r=u(t),K=r(t,"P",{align:!0});var yo=a(K);wf=r(yo,"BR",{}),bf=u(yo),ks=r(yo,"IMG",{src:!0,width:!0}),Ef=u(yo),yf=r(yo,"BR",{}),yo.forEach(s),vr=u(t),Ms=r(t,"P",{});var Zm=a(Ms);Df=i(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=i(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=i(e_,"your access token"),e_.forEach(s),kf=i(ce," directly via the flag "),ri=r(ce,"CODE",{});var t_=a(ri);Mf=i(t_,"use_auth_token"),t_.forEach(s),Sf=i(ce,". In this case you do "),ai=r(ce,"STRONG",{});var s_=a(ai);qf=i(s_,"not"),s_.forEach(s),jf=i(ce,` need
to run `),ni=r(ce,"CODE",{});var o_=a(ni);xf=i(o_,"huggingface-cli login"),o_.forEach(s),Af=i(ce," before:"),ce.forEach(s),br=u(t),h(Mt.$$.fragment,t),Er=u(t),Ss=r(t,"P",{});var i_=a(Ss);Lf=i(i_,"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."),i_.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 l_=a(ze);fi=r(l_,"SPAN",{});var r_=a(fi);h(St.$$.fragment,r_),r_.forEach(s),l_.forEach(s),If=u(La),di=r(La,"SPAN",{});var a_=a(di);Tf=i(a_,"Loading pipelines locally"),a_.forEach(s),La.forEach(s),Dr=u(t),qs=r(t,"P",{});var n_=a(qs);Cf=i(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 Do=a(ee);Of=i(Do,"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(Do,"A",{href:!0});var f_=a(js);Nf=i(f_,"DiffusionPipeline.from_pretrained()"),f_.forEach(s),zf=i(Do,`. Let\u2019s again look at an example for
`),qt=r(Do,"A",{href:!0,rel:!0});var d_=a(qt);Hf=i(d_,"CompVis\u2019 Latent Diffusion model"),d_.forEach(s),Vf=i(Do,"."),Do.forEach(s),$r=u(t),te=r(t,"P",{});var Po=a(te);Uf=i(Po,"First, you should make use of "),jt=r(Po,"A",{href:!0,rel:!0});var p_=a(jt);pi=r(p_,"CODE",{});var u_=a(pi);Bf=i(u_,"git-lfs"),u_.forEach(s),p_.forEach(s),Rf=i(Po," to download the whole folder structure that has been uploaded to the "),xt=r(Po,"A",{href:!0,rel:!0});var c_=a(xt);Ff=i(c_,"model repository"),c_.forEach(s),Gf=i(Po,":"),Po.forEach(s),kr=u(t),h(At.$$.fragment,t),Mr=u(t),se=r(t,"P",{});var $o=a(se);Kf=i($o,"The command above will create a local folder called "),ui=r($o,"CODE",{});var h_=a(ui);Wf=i(h_,"./stable-diffusion-v1-5"),h_.forEach(s),Yf=i($o,` on your disk.
Now, all you have to do is to simply pass the local folder path to `),ci=r($o,"CODE",{});var m_=a(ci);Jf=i(m_,"from_pretrained"),m_.forEach(s),Qf=i($o,":"),$o.forEach(s),Sr=u(t),h(Lt.$$.fragment,t),qr=u(t),oe=r(t,"P",{});var ko=a(oe);Xf=i(ko,"If "),hi=r(ko,"CODE",{});var __=a(hi);Zf=i(__,"repo_id"),__.forEach(s),ed=i(ko," is a local path, as it is the case here, "),xs=r(ko,"A",{href:!0});var v_=a(xs);td=i(v_,"DiffusionPipeline.from_pretrained()"),v_.forEach(s),sd=i(ko,` 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`),ko.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);mi=r(g_,"SPAN",{});var w_=a(mi);h(It.$$.fragment,w_),w_.forEach(s),g_.forEach(s),od=u(Ia),_i=r(Ia,"SPAN",{});var b_=a(_i);id=i(b_,"Loading customized pipelines"),b_.forEach(s),Ia.forEach(s),xr=u(t),j=r(t,"P",{});var he=a(j);ld=i(he,"Advanced users that want to load customized versions of diffusion pipelines can do so by swapping any of the default components, "),vi=r(he,"EM",{});var E_=a(vi);rd=i(E_,"e.g."),E_.forEach(s),ad=i(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=i(y_,"Stable Diffusion v1-5"),y_.forEach(s),fd=i(he," uses the "),As=r(he,"A",{href:!0});var D_=a(As);dd=i(D_,"PNDMScheduler"),D_.forEach(s),pd=i(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=i(P_,"DiffusionPipeline.from_pretrained()"),P_.forEach(s),cd=i(he,"."),he.forEach(s),Ar=u(t),W=r(t,"P",{});var cs=a(W);gi=r(cs,"EM",{});var $_=a(gi);hd=i($_,"E.g."),$_.forEach(s),md=i(cs," to use "),Is=r(cs,"A",{href:!0});var k_=a(Is);_d=i(k_,"EulerDiscreteScheduler"),k_.forEach(s),vd=i(cs," or "),Ts=r(cs,"A",{href:!0});var M_=a(Ts);gd=i(M_,"DPMSolverMultistepScheduler"),M_.forEach(s),wd=i(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=i(S_,"Three things are worth paying attention to here."),S_.forEach(s),Tr=u(t),ie=r(t,"UL",{});var Mo=a(ie);Os=r(Mo,"LI",{});var rm=a(Os);Ed=i(rm,"First, the scheduler is loaded with "),Ns=r(rm,"A",{href:!0});var q_=a(Ns);yd=i(q_,"SchedulerMixin.from_pretrained()"),q_.forEach(s),rm.forEach(s),Dd=u(Mo),Ve=r(Mo,"LI",{});var Jl=a(Ve);Pd=i(Jl,"Second, the scheduler is loaded with a function argument, called "),wi=r(Jl,"CODE",{});var j_=a(wi);$d=i(j_,'subfolder="scheduler"'),j_.forEach(s),kd=i(Jl," as the configuration of stable diffusion\u2019s scheduling is defined in a "),Ot=r(Jl,"A",{href:!0,rel:!0});var x_=a(Ot);Md=i(x_,"subfolder of the official pipeline repository"),x_.forEach(s),Jl.forEach(s),Sd=u(Mo),P=r(Mo,"LI",{});var S=a(P);qd=i(S,"Third, the scheduler instance can simply be passed with the "),bi=r(S,"CODE",{});var A_=a(bi);jd=i(A_,"scheduler"),A_.forEach(s),xd=i(S," keyword argument to "),zs=r(S,"A",{href:!0});var L_=a(zs);Ad=i(L_,"DiffusionPipeline.from_pretrained()"),L_.forEach(s),Ld=i(S,". This works because the "),Hs=r(S,"A",{href:!0});var I_=a(Hs);Id=i(I_,"StableDiffusionPipeline"),I_.forEach(s),Td=i(S," defines its scheduler with the "),Ei=r(S,"CODE",{});var T_=a(Ei);Cd=i(T_,"scheduler"),T_.forEach(s),Od=i(S," attribute. It\u2019s not possible to use a different name, such as "),yi=r(S,"CODE",{});var C_=a(yi);Nd=i(C_,"sampler=scheduler"),C_.forEach(s),zd=i(S," since "),Di=r(S,"CODE",{});var O_=a(Di);Hd=i(O_,"sampler"),O_.forEach(s),Vd=i(S," is not a defined keyword for "),Pi=r(S,"CODE",{});var N_=a(Pi);Ud=i(N_,"StableDiffusionPipeline.__init__()"),N_.forEach(s),S.forEach(s),Mo.forEach(s),Cr=u(t),z=r(t,"P",{});var tt=a(z);Bd=i(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 "),$i=r(tt,"STRONG",{});var z_=a($i);Rd=i(z_,"compatible"),z_.forEach(s),Fd=i(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=i(H_,"here"),H_.forEach(s),Kd=i(tt,". This is not always the case for other components, such as the "),ki=r(tt,"CODE",{});var V_=a(ki);Wd=i(V_,'"unet"'),V_.forEach(s),Yd=i(tt,"."),tt.forEach(s),Or=u(t),le=r(t,"P",{});var So=a(le);Jd=i(So,"One special case that can also be customized is the "),Mi=r(So,"CODE",{});var U_=a(Mi);Qd=i(U_,'"safety_checker"'),U_.forEach(s),Xd=i(So," of stable diffusion. If you believe the safety checker doesn\u2019t serve you any good, you can simply disable it by passing "),Si=r(So,"CODE",{});var B_=a(Si);Zd=i(B_,"None"),B_.forEach(s),ep=i(So,":"),So.forEach(s),Nr=u(t),h(zt.$$.fragment,t),zr=u(t),x=r(t,"P",{});var me=a(x);tp=i(me,"Another common use case is to reuse the same components in multiple pipelines, "),qi=r(me,"EM",{});var R_=a(qi);sp=i(R_,"e.g."),R_.forEach(s),op=i(me," the weights and configurations of "),Ht=r(me,"A",{href:!0,rel:!0});var F_=a(Ht);ji=r(F_,"CODE",{});var G_=a(ji);ip=i(G_,'"runwayml/stable-diffusion-v1-5"'),G_.forEach(s),F_.forEach(s),lp=i(me," can be used for both "),Vs=r(me,"A",{href:!0});var K_=a(Vs);rp=i(K_,"StableDiffusionPipeline"),K_.forEach(s),ap=i(me," and "),Us=r(me,"A",{href:!0});var W_=a(Us);np=i(W_,"StableDiffusionImg2ImgPipeline"),W_.forEach(s),fp=i(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=i(Ta,"Note how the above code snippet makes use of "),xi=r(Ta,"CODE",{});var Y_=a(xi);pp=i(Y_,"DiffusionPipeline.components"),Y_.forEach(s),up=i(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);Ai=r(J_,"SPAN",{});var Q_=a(Ai);h(Ut.$$.fragment,Q_),Q_.forEach(s),J_.forEach(s),cp=u(Ca),Li=r(Ca,"SPAN",{});var X_=a(Li);hp=i(X_,"How does loading work?"),X_.forEach(s),Ca.forEach(s),Br=u(t),Re=r(t,"P",{});var Oa=a(Re);mp=i(Oa,"As a class method, "),Bs=r(Oa,"A",{href:!0});var Z_=a(Bs);_p=i(Z_,"DiffusionPipeline.from_pretrained()"),Z_.forEach(s),vp=i(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=i(_e,"Download the latest version of the folder structure required to run the "),Ii=r(_e,"CODE",{});var ev=a(Ii);wp=i(ev,"repo_id"),ev.forEach(s),bp=i(_e," with "),Ti=r(_e,"CODE",{});var tv=a(Ti);Ep=i(tv,"diffusers"),tv.forEach(s),yp=i(_e," and cache them. If the latest folder structure is available in the local cache, "),Rs=r(_e,"A",{href:!0});var sv=a(Rs);Dp=i(sv,"DiffusionPipeline.from_pretrained()"),sv.forEach(s),Pp=i(_e," will simply reuse the cache and "),Ci=r(_e,"STRONG",{});var ov=a(Ci);$p=i(ov,"not"),ov.forEach(s),kp=i(_e," re-download the files."),_e.forEach(s),Mp=u(Na),O=r(Na,"LI",{});var ve=a(O);Sp=i(ve,"Load the cached weights into the "),Oi=r(ve,"EM",{});var iv=a(Oi);qp=i(iv,"correct"),iv.forEach(s),jp=i(ve," pipeline class \u2013 one of the "),Fs=r(ve,"A",{href:!0});var lv=a(Fs);xp=i(lv,"officially supported pipeline classes"),lv.forEach(s),Ap=i(ve," - and return an instance of the class. The "),Ni=r(ve,"EM",{});var rv=a(Ni);Lp=i(rv,"correct"),rv.forEach(s),Ip=i(ve," pipeline class is thereby retrieved from the "),zi=r(ve,"CODE",{});var av=a(zi);Tp=i(av,"model_index.json"),av.forEach(s),Cp=i(ve," file."),ve.forEach(s),Na.forEach(s),Fr=u(t),A=r(t,"P",{});var ge=a(A);Op=i(ge,"The underlying folder structure of diffusion pipelines correspond 1-to-1 to their corresponding class instances, "),Hi=r(ge,"EM",{});var nv=a(Hi);Np=i(nv,"e.g."),nv.forEach(s),zp=u(ge),Gs=r(ge,"A",{href:!0});var fv=a(Gs);Hp=i(fv,"LDMTextToImagePipeline"),fv.forEach(s),Vp=i(ge," for "),Bt=r(ge,"A",{href:!0,rel:!0});var dv=a(Bt);Vi=r(dv,"CODE",{});var pv=a(Vi);Up=i(pv,"CompVis/ldm-text2im-large-256"),pv.forEach(s),dv.forEach(s),Bp=i(ge,`
This can be understood better by looking at an example. Let\u2019s print out pipeline class instance `),Ui=r(ge,"CODE",{});var uv=a(Ui);Rp=i(uv,"pipeline"),uv.forEach(s),Fp=i(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);Bi=r(am,"EM",{});var cv=a(Bi);Gp=i(cv,"Output"),cv.forEach(s),Kp=i(am,":"),am.forEach(s),Wr=u(t),h(Gt.$$.fragment,t),Yr=u(t),re=r(t,"P",{});var qo=a(re);Wp=i(qo,"First, we see that the official pipeline is the "),Ks=r(qo,"A",{href:!0});var hv=a(Ks);Yp=i(hv,"LDMTextToImagePipeline"),hv.forEach(s),Jp=i(qo,", and second we see that the "),Ri=r(qo,"CODE",{});var mv=a(Ri);Qp=i(mv,"LDMTextToImagePipeline"),mv.forEach(s),Xp=i(qo," consists of 5 components:"),qo.forEach(s),Jr=u(t),L=r(t,"UL",{});var we=a(L);Me=r(we,"LI",{});var jo=a(Me);Fi=r(jo,"CODE",{});var _v=a(Fi);Zp=i(_v,'"bert"'),_v.forEach(s),eu=i(jo," of class "),Gi=r(jo,"CODE",{});var vv=a(Gi);tu=i(vv,"LDMBertModel"),vv.forEach(s),su=i(jo," as defined "),Kt=r(jo,"A",{href:!0,rel:!0});var gv=a(Kt);ou=i(gv,"in the pipeline"),gv.forEach(s),jo.forEach(s),iu=u(we),Wt=r(we,"LI",{});var za=a(Wt);Ki=r(za,"CODE",{});var wv=a(Ki);lu=i(wv,'"scheduler"'),wv.forEach(s),ru=i(za," of class "),Ws=r(za,"A",{href:!0});var bv=a(Ws);au=i(bv,"DDIMScheduler"),bv.forEach(s),za.forEach(s),nu=u(we),Se=r(we,"LI",{});var xo=a(Se);Wi=r(xo,"CODE",{});var Ev=a(Wi);fu=i(Ev,'"tokenizer"'),Ev.forEach(s),du=i(xo," of class "),Yi=r(xo,"CODE",{});var yv=a(Yi);pu=i(yv,"BertTokenizer"),yv.forEach(s),uu=i(xo," as defined "),Ge=r(xo,"A",{href:!0,rel:!0});var nm=a(Ge);cu=i(nm,"in "),Ji=r(nm,"CODE",{});var Dv=a(Ji);hu=i(Dv,"transformers"),Dv.forEach(s),nm.forEach(s),xo.forEach(s),mu=u(we),Yt=r(we,"LI",{});var Ha=a(Yt);Qi=r(Ha,"CODE",{});var Pv=a(Qi);_u=i(Pv,'"unet"'),Pv.forEach(s),vu=i(Ha," of class "),Ys=r(Ha,"A",{href:!0});var $v=a(Ys);gu=i($v,"UNet2DConditionModel"),$v.forEach(s),Ha.forEach(s),wu=u(we),Jt=r(we,"LI",{});var Va=a(Jt);Xi=r(Va,"CODE",{});var kv=a(Xi);bu=i(kv,'"vqvae"'),kv.forEach(s),Eu=i(Va," of class "),Js=r(Va,"A",{href:!0});var Mv=a(Js);yu=i(Mv,"AutoencoderKL"),Mv.forEach(s),Va.forEach(s),we.forEach(s),Qr=u(t),H=r(t,"P",{});var st=a(H);Du=i(st,"Let\u2019s now compare the pipeline instance to the folder structure of the model repository "),Zi=r(st,"CODE",{});var Sv=a(Zi);Pu=i(Sv,"CompVis/ldm-text2im-large-256"),Sv.forEach(s),$u=i(st,". Looking at the folder structure of "),Qt=r(st,"A",{href:!0,rel:!0});var qv=a(Qt);el=r(qv,"CODE",{});var jv=a(el);ku=i(jv,"CompVis/ldm-text2im-large-256"),jv.forEach(s),qv.forEach(s),Mu=i(st," on the Hub, we can see it matches 1-to-1 the printed out instance of "),tl=r(st,"CODE",{});var xv=a(tl);Su=i(xv,"LDMTextToImagePipeline"),xv.forEach(s),qu=i(st," above:"),st.forEach(s),Xr=u(t),h(Xt.$$.fragment,t),Zr=u(t),w=r(t,"P",{});var E=a(w);ju=i(E,"As we can see each attribute of the instance of "),sl=r(E,"CODE",{});var Av=a(sl);xu=i(Av,"LDMTextToImagePipeline"),Av.forEach(s),Au=i(E," has its configuration and possibly weights defined in a subfolder that is called "),ol=r(E,"STRONG",{});var Lv=a(ol);Lu=i(Lv,"exactly"),Lv.forEach(s),Iu=i(E," like the class attribute ("),il=r(E,"CODE",{});var Iv=a(il);Tu=i(Iv,'"bert"'),Iv.forEach(s),Cu=i(E,", "),ll=r(E,"CODE",{});var Tv=a(ll);Ou=i(Tv,'"scheduler"'),Tv.forEach(s),Nu=i(E,", "),rl=r(E,"CODE",{});var Cv=a(rl);zu=i(Cv,'"tokenizer"'),Cv.forEach(s),Hu=i(E,", "),al=r(E,"CODE",{});var Ov=a(al);Vu=i(Ov,'"unet"'),Ov.forEach(s),Uu=i(E,", "),nl=r(E,"CODE",{});var Nv=a(nl);Bu=i(Nv,'"vqvae"'),Nv.forEach(s),Ru=i(E,"). Importantly, every pipeline expects a "),fl=r(E,"CODE",{});var zv=a(fl);Fu=i(zv,"model_index.json"),zv.forEach(s),Gu=i(E," file that tells the "),dl=r(E,"CODE",{});var Hv=a(dl);Ku=i(Hv,"DiffusionPipeline"),Hv.forEach(s),Wu=i(E," both:"),E.forEach(s),ea=u(t),Ke=r(t,"UL",{});var Ua=a(Ke);pl=r(Ua,"LI",{});var Vv=a(pl);Yu=i(Vv,"which pipeline class should be loaded, and"),Vv.forEach(s),Ju=u(Ua),ul=r(Ua,"LI",{});var Uv=a(ul);Qu=i(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 Ao=a(ae);Xu=i(Ao,"In the case of "),cl=r(Ao,"CODE",{});var Bv=a(cl);Zu=i(Bv,"CompVis/ldm-text2im-large-256"),Bv.forEach(s),ec=i(Ao," the "),hl=r(Ao,"CODE",{});var Rv=a(hl);tc=i(Rv,"model_index.json"),Rv.forEach(s),sc=i(Ao," is therefore defined as follows:"),Ao.forEach(s),sa=u(t),h(Zt.$$.fragment,t),oa=u(t),ne=r(t,"UL",{});var Lo=a(ne);We=r(Lo,"LI",{});var Ql=a(We);ml=r(Ql,"CODE",{});var Fv=a(ml);oc=i(Fv,"_class_name"),Fv.forEach(s),ic=i(Ql," tells "),_l=r(Ql,"CODE",{});var Gv=a(_l);lc=i(Gv,"DiffusionPipeline"),Gv.forEach(s),rc=i(Ql," which pipeline class should be loaded."),Ql.forEach(s),ac=u(Lo),Ye=r(Lo,"LI",{});var Xl=a(Ye);vl=r(Xl,"CODE",{});var Kv=a(vl);nc=i(Kv,"_diffusers_version"),Kv.forEach(s),fc=i(Xl," can be useful to know under which "),gl=r(Xl,"CODE",{});var Wv=a(gl);dc=i(Wv,"diffusers"),Wv.forEach(s),pc=i(Xl," version this model was created."),Xl.forEach(s),uc=u(Lo),wl=r(Lo,"LI",{});var Yv=a(wl);cc=i(Yv,"Every component of the pipeline is then defined under the form:"),Yv.forEach(s),Lo.forEach(s),ia=u(t),h(es.$$.fragment,t),la=u(t),fe=r(t,"UL",{});var Io=a(fe);de=r(Io,"LI",{});var hs=a(de);hc=i(hs,"The "),bl=r(hs,"CODE",{});var Jv=a(bl);mc=i(Jv,'"name"'),Jv.forEach(s),_c=i(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=i(Qv,"here"),Qv.forEach(s),gc=i(hs," and "),ss=r(hs,"A",{href:!0,rel:!0});var Xv=a(ss);wc=i(Xv,"here"),Xv.forEach(s),hs.forEach(s),bc=u(Io),M=r(Io,"LI",{});var G=a(M);Ec=i(G,"The "),El=r(G,"CODE",{});var Zv=a(El);yc=i(Zv,'"library"'),Zv.forEach(s),Dc=i(G," field corresponds to the name of the library, "),yl=r(G,"EM",{});var eg=a(yl);Pc=i(eg,"e.g."),eg.forEach(s),$c=u(G),Dl=r(G,"CODE",{});var tg=a(Dl);kc=i(tg,"diffusers"),tg.forEach(s),Mc=i(G," or "),Pl=r(G,"CODE",{});var sg=a(Pl);Sc=i(sg,"transformers"),sg.forEach(s),qc=i(G," from which the "),$l=r(G,"CODE",{});var og=a($l);jc=i(og,'"class"'),og.forEach(s),xc=i(G," should be loaded"),G.forEach(s),Ac=u(Io),V=r(Io,"LI",{});var Ae=a(V);Lc=i(Ae,"The "),kl=r(Ae,"CODE",{});var ig=a(kl);Ic=i(ig,'"class"'),ig.forEach(s),Tc=i(Ae," field corresponds to the name of the class, "),Ml=r(Ae,"EM",{});var lg=a(Ml);Cc=i(lg,"e.g."),lg.forEach(s),Oc=u(Ae),os=r(Ae,"A",{href:!0,rel:!0});var rg=a(os);Sl=r(rg,"CODE",{});var ag=a(Sl);Nc=i(ag,"BertTokenizer"),ag.forEach(s),rg.forEach(s),zc=i(Ae," or "),Qs=r(Ae,"A",{href:!0});var ng=a(Qs);Hc=i(ng,"UNet2DConditionModel"),ng.forEach(s),Ae.forEach(s),Io.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 fg=a(Je);ql=r(fg,"SPAN",{});var dg=a(ql);h(is.$$.fragment,dg),dg.forEach(s),fg.forEach(s),Vc=u(Ba),jl=r(Ba,"SPAN",{});var pg=a(jl);Uc=i(pg,"Loading models"),pg.forEach(s),Ba.forEach(s),aa=u(t),U=r(t,"P",{});var ot=a(U);Bc=i(ot,"Models as defined under "),ls=r(ot,"A",{href:!0,rel:!0});var ug=a(ls);Rc=i(ug,"src/diffusers/models"),ug.forEach(s),Fc=i(ot," can be loaded via the "),Xs=r(ot,"A",{href:!0});var cg=a(Xs);Gc=i(cg,"ModelMixin.from_pretrained()"),cg.forEach(s),Kc=i(ot," function. The API is very similar the "),Zs=r(ot,"A",{href:!0});var hg=a(Zs);Wc=i(hg,"DiffusionPipeline.from_pretrained()"),hg.forEach(s),Yc=i(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 it=a(Y);Jc=i(it,"Download the latest version of the model weights and configuration with "),xl=r(it,"CODE",{});var mg=a(xl);Qc=i(mg,"diffusers"),mg.forEach(s),Xc=i(it," and cache them. If the latest files are available in the local cache, "),eo=r(it,"A",{href:!0});var _g=a(eo);Zc=i(_g,"ModelMixin.from_pretrained()"),_g.forEach(s),eh=i(it," will simply reuse the cache and "),Al=r(it,"STRONG",{});var vg=a(Al);th=i(vg,"not"),vg.forEach(s),sh=i(it," re-download the files."),it.forEach(s),oh=u(Ra),je=r(Ra,"LI",{});var To=a(je);ih=i(To,"Load the cached weights into the "),Ll=r(To,"EM",{});var gg=a(Ll);lh=i(gg,"defined"),gg.forEach(s),rh=i(To," model class - one of "),to=r(To,"A",{href:!0});var wg=a(to);ah=i(wg,"the existing model classes"),wg.forEach(s),nh=i(To," - and return an instance of the class."),To.forEach(s),Ra.forEach(s),fa=u(t),B=r(t,"P",{});var lt=a(B);fh=i(lt,"In constrast to "),so=r(lt,"A",{href:!0});var bg=a(so);dh=i(bg,"DiffusionPipeline.from_pretrained()"),bg.forEach(s),ph=i(lt,", models rely on fewer files that usually don\u2019t require a folder structure, but just a "),Il=r(lt,"CODE",{});var Eg=a(Il);uh=i(Eg,"diffusion_pytorch_model.bin"),Eg.forEach(s),ch=i(lt," and "),Tl=r(lt,"CODE",{});var yg=a(Tl);hh=i(yg,"config.json"),yg.forEach(s),mh=i(lt," file."),lt.forEach(s),da=u(t),oo=r(t,"P",{});var Dg=a(oo);_h=i(Dg,"Let\u2019s look at an example:"),Dg.forEach(s),pa=u(t),h(rs.$$.fragment,t),ua=u(t),R=r(t,"P",{});var rt=a(R);vh=i(rt,"Note how we have to define the "),Cl=r(rt,"CODE",{});var Pg=a(Cl);gh=i(Pg,'subfolder="unet"'),Pg.forEach(s),wh=i(rt," argument to tell "),io=r(rt,"A",{href:!0});var $g=a(io);bh=i($g,"ModelMixin.from_pretrained()"),$g.forEach(s),Eh=i(rt," that the model weights are located in a "),as=r(rt,"A",{href:!0,rel:!0});var kg=a(as);yh=i(kg,"subfolder of the repository"),kg.forEach(s),Dh=i(rt,"."),rt.forEach(s),ca=u(t),pe=r(t,"P",{});var Co=a(pe);Ph=i(Co,"As explained in "),lo=r(Co,"A",{href:!0});var Mg=a(lo);$h=i(Mg,"Loading customized pipelines"),Mg.forEach(s),kh=i(Co,", one can pass a loaded model to a diffusion pipeline, via "),ro=r(Co,"A",{href:!0});var Sg=a(ro);Mh=i(Sg,"DiffusionPipeline.from_pretrained()"),Sg.forEach(s),Sh=i(Co,":"),Co.forEach(s),ha=u(t),h(ns.$$.fragment,t),ma=u(t),ue=r(t,"P",{});var Oo=a(ue);qh=i(Oo,"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(Oo,"A",{href:!0,rel:!0});var qg=a(fs);Ol=r(qg,"CODE",{});var jg=a(Ol);jh=i(jg,"google/ddpm-cifar10-32"),jg.forEach(s),qg.forEach(s),xh=i(Oo,`, we don\u2019t
need to pass a `),Nl=r(Oo,"CODE",{});var xg=a(Nl);Ah=i(xg,"subfolder"),xg.forEach(s),Lh=i(Oo," argument:"),Oo.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 Ag=a(Xe);zl=r(Ag,"SPAN",{});var Lg=a(zl);h(ps.$$.fragment,Lg),Lg.forEach(s),Ag.forEach(s),Ih=u(Fa),Hl=r(Fa,"SPAN",{});var Ig=a(Hl);Th=i(Ig,"Loading schedulers"),Ig.forEach(s),Fa.forEach(s),ga=u(t),F=r(t,"P",{});var at=a(F);Ch=i(at,"Schedulers rely on "),ao=r(at,"A",{href:!0});var Tg=a(ao);Oh=i(Tg,"SchedulerMixin.from_pretrained()"),Tg.forEach(s),Nh=i(at,". Schedulers are "),Vl=r(at,"STRONG",{});var Cg=a(Vl);zh=i(Cg,"not parameterized"),Cg.forEach(s),Hh=i(at," or "),Ul=r(at,"STRONG",{});var Og=a(Ul);Vh=i(Og,"trained"),Og.forEach(s),Uh=i(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),no=r(t,"P",{});var Ng=a(no);Bh=i(Ng,`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:`),Ng.forEach(s),ba=u(t),$=r(t,"UL",{});var T=a($);Bl=r(T,"LI",{});var zg=a(Bl);fo=r(zg,"A",{href:!0});var Hg=a(fo);Rh=i(Hg,"DDPMScheduler"),Hg.forEach(s),zg.forEach(s),Fh=u(T),Rl=r(T,"LI",{});var Vg=a(Rl);po=r(Vg,"A",{href:!0});var Ug=a(po);Gh=i(Ug,"DDIMScheduler"),Ug.forEach(s),Vg.forEach(s),Kh=u(T),Fl=r(T,"LI",{});var Bg=a(Fl);uo=r(Bg,"A",{href:!0});var Rg=a(uo);Wh=i(Rg,"PNDMScheduler"),Rg.forEach(s),Bg.forEach(s),Yh=u(T),Gl=r(T,"LI",{});var Fg=a(Gl);co=r(Fg,"A",{href:!0});var Gg=a(co);Jh=i(Gg,"LMSDiscreteScheduler"),Gg.forEach(s),Fg.forEach(s),Qh=u(T),Kl=r(T,"LI",{});var Kg=a(Kl);ho=r(Kg,"A",{href:!0});var Wg=a(ho);Xh=i(Wg,"EulerDiscreteScheduler"),Wg.forEach(s),Kg.forEach(s),Zh=u(T),Wl=r(T,"LI",{});var Yg=a(Wl);mo=r(Yg,"A",{href:!0});var Jg=a(mo);em=i(Jg,"EulerAncestralDiscreteScheduler"),Jg.forEach(s),Yg.forEach(s),tm=u(T),Yl=r(T,"LI",{});var Qg=a(Yl);_o=r(Qg,"A",{href:!0});var Xg=a(_o);sm=i(Xg,"DPMSolverMultistepScheduler"),Xg.forEach(s),Qg.forEach(s),T.forEach(s),Ea=u(t),Ze=r(t,"P",{});var Ga=a(Ze);om=i(Ga,"are compatible with "),vo=r(Ga,"A",{href:!0});var Zg=a(vo);im=i(Zg,"StableDiffusionPipeline"),Zg.forEach(s),lm=i(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/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(vs,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin.from_pretrained"),d(gs,"href","/docs/diffusers/main/en/api/schedulers/overview#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/main/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/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(Es,"href","/docs/diffusers/main/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Ce,"href","/docs/diffusers/main/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline.__call__"),d(ys,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(Ds,"href","/docs/diffusers/main/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Ps,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#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"),i2(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/main/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/main/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/main/en/api/schedulers/pndm#diffusers.PNDMScheduler"),d(Ls,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Is,"href","/docs/diffusers/main/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),d(Ts,"href","/docs/diffusers/main/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler"),d(Ns,"href","/docs/diffusers/main/en/api/schedulers/overview#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/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Hs,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#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/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),d(Us,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/img2img#diffusers.StableDiffusionImg2ImgPipeline"),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(Bs,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Rs,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Fs,"href","./api/overview#diffusers-summary"),d(Gs,"href","/docs/diffusers/main/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Bt,"href","https://huggingface.co/CompVis/ldm-text2im-large-256"),d(Bt,"rel","nofollow"),d(Ks,"href","/docs/diffusers/main/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(Ws,"href","/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler"),d(Ge,"href","https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer"),d(Ge,"rel","nofollow"),d(Ys,"href","/docs/diffusers/main/en/api/models#diffusers.UNet2DConditionModel"),d(Js,"href","/docs/diffusers/main/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(Qs,"href","/docs/diffusers/main/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(ls,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/models"),d(ls,"rel","nofollow"),d(Xs,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin.from_pretrained"),d(Zs,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(eo,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin.from_pretrained"),d(to,"href","./api/models"),d(so,"href","/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(io,"href","/docs/diffusers/main/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(lo,"href","%22./using-diffusers/loading#loading-customized-pipelines%22"),d(ro,"href","/docs/diffusers/main/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(ao,"href","/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin.from_pretrained"),d(fo,"href","/docs/diffusers/main/en/api/schedulers/ddpm#diffusers.DDPMScheduler"),d(po,"href","/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler"),d(uo,"href","/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler"),d(co,"href","/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler"),d(ho,"href","/docs/diffusers/main/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),d(mo,"href","/docs/diffusers/main/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler"),d(_o,"href","/docs/diffusers/main/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler"),d(vo,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline")},m(t,n){e(document.head,be),f(t,Zl,n),f(t,Ee,n),e(Ee,Le),e(Le,No),m(ft,No,null),e(Ee,Ka),e(Ee,zo),e(zo,Wa),f(t,er,n),f(t,Ie,n),e(Ie,Ya),e(Ie,Ho),e(Ho,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,Vo),e(Vo,Za),e(dt,en),e(dt,_s),e(_s,tn),e(J,sn),e(J,pt),e(pt,Uo),e(Uo,on),e(pt,ln),e(pt,vs),e(vs,rn),e(J,an),e(J,ut),e(ut,Bo),e(Bo,nn),e(ut,fn),e(ut,gs),e(gs,dn),f(t,or,n),f(t,ye,n),e(ye,Te),e(Te,Ro),m(ct,Ro,null),e(ye,pn),e(ye,Fo),e(Fo,un),f(t,ir,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,lr,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,Go),e(Go,Dn),e(D,Pn),e(D,Es),e(Es,$n),e(D,kn),e(D,Ko),e(Ko,Mn),e(D,Sn),e(D,Ce),e(Ce,qn),e(Ce,Wo),e(Wo,jn),e(Ce,xn),e(D,An),e(D,Yo),e(Yo,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,Jo),e(Jo,zn),e(b,Hn),e(b,Qo),e(Qo,Vn),e(b,Un),e(b,Xo),e(Xo,Bn),e(b,Rn),e(b,Zo),e(Zo,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,ei),m(wt,ei,null),e(De,tf),e(De,ti),e(ti,sf),f(t,pr,n),f(t,Q,n),e(Q,of),e(Q,si),e(si,lf),e(Q,rf),e(Q,bt),e(bt,oi),e(oi,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,ii),e(ii,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,li),e(li,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,ri),e(ri,Mf),e(q,Sf),e(q,ai),e(ai,qf),e(q,jf),e(q,ni),e(ni,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,fi),m(St,fi,null),e(Pe,If),e(Pe,di),e(di,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,pi),e(pi,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,ui),e(ui,Wf),e(se,Yf),e(se,ci),e(ci,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,hi),e(hi,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,mi),m(It,mi,null),e($e,od),e($e,_i),e(_i,id),f(t,xr,n),f(t,j,n),e(j,ld),e(j,vi),e(vi,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,gi),e(gi,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,ie,n),e(ie,Os),e(Os,Ed),e(Os,Ns),e(Ns,yd),e(ie,Dd),e(ie,Ve),e(Ve,Pd),e(Ve,wi),e(wi,$d),e(Ve,kd),e(Ve,Ot),e(Ot,Md),e(ie,Sd),e(ie,P),e(P,qd),e(P,bi),e(bi,jd),e(P,xd),e(P,zs),e(zs,Ad),e(P,Ld),e(P,Hs),e(Hs,Id),e(P,Td),e(P,Ei),e(Ei,Cd),e(P,Od),e(P,yi),e(yi,Nd),e(P,zd),e(P,Di),e(Di,Hd),e(P,Vd),e(P,Pi),e(Pi,Ud),f(t,Cr,n),f(t,z,n),e(z,Bd),e(z,$i),e($i,Rd),e(z,Fd),e(z,Nt),e(Nt,Gd),e(z,Kd),e(z,ki),e(ki,Wd),e(z,Yd),f(t,Or,n),f(t,le,n),e(le,Jd),e(le,Mi),e(Mi,Qd),e(le,Xd),e(le,Si),e(Si,Zd),e(le,ep),f(t,Nr,n),m(zt,t,n),f(t,zr,n),f(t,x,n),e(x,tp),e(x,qi),e(qi,sp),e(x,op),e(x,Ht),e(Ht,ji),e(ji,ip),e(x,lp),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,xi),e(xi,pp),e(Ue,up),f(t,Ur,n),f(t,ke,n),e(ke,Be),e(Be,Ai),m(Ut,Ai,null),e(ke,cp),e(ke,Li),e(Li,hp),f(t,Br,n),f(t,Re,n),e(Re,mp),e(Re,Bs),e(Bs,_p),e(Re,vp),f(t,Rr,n),f(t,Fe,n),e(Fe,C),e(C,gp),e(C,Ii),e(Ii,wp),e(C,bp),e(C,Ti),e(Ti,Ep),e(C,yp),e(C,Rs),e(Rs,Dp),e(C,Pp),e(C,Ci),e(Ci,$p),e(C,kp),e(Fe,Mp),e(Fe,O),e(O,Sp),e(O,Oi),e(Oi,qp),e(O,jp),e(O,Fs),e(Fs,xp),e(O,Ap),e(O,Ni),e(Ni,Lp),e(O,Ip),e(O,zi),e(zi,Tp),e(O,Cp),f(t,Fr,n),f(t,A,n),e(A,Op),e(A,Hi),e(Hi,Np),e(A,zp),e(A,Gs),e(Gs,Hp),e(A,Vp),e(A,Bt),e(Bt,Vi),e(Vi,Up),e(A,Bp),e(A,Ui),e(Ui,Rp),e(A,Fp),f(t,Gr,n),m(Rt,t,n),f(t,Kr,n),f(t,Ft,n),e(Ft,Bi),e(Bi,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,Ks),e(Ks,Yp),e(re,Jp),e(re,Ri),e(Ri,Qp),e(re,Xp),f(t,Jr,n),f(t,L,n),e(L,Me),e(Me,Fi),e(Fi,Zp),e(Me,eu),e(Me,Gi),e(Gi,tu),e(Me,su),e(Me,Kt),e(Kt,ou),e(L,iu),e(L,Wt),e(Wt,Ki),e(Ki,lu),e(Wt,ru),e(Wt,Ws),e(Ws,au),e(L,nu),e(L,Se),e(Se,Wi),e(Wi,fu),e(Se,du),e(Se,Yi),e(Yi,pu),e(Se,uu),e(Se,Ge),e(Ge,cu),e(Ge,Ji),e(Ji,hu),e(L,mu),e(L,Yt),e(Yt,Qi),e(Qi,_u),e(Yt,vu),e(Yt,Ys),e(Ys,gu),e(L,wu),e(L,Jt),e(Jt,Xi),e(Xi,bu),e(Jt,Eu),e(Jt,Js),e(Js,yu),f(t,Qr,n),f(t,H,n),e(H,Du),e(H,Zi),e(Zi,Pu),e(H,$u),e(H,Qt),e(Qt,el),e(el,ku),e(H,Mu),e(H,tl),e(tl,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,sl),e(sl,xu),e(w,Au),e(w,ol),e(ol,Lu),e(w,Iu),e(w,il),e(il,Tu),e(w,Cu),e(w,ll),e(ll,Ou),e(w,Nu),e(w,rl),e(rl,zu),e(w,Hu),e(w,al),e(al,Vu),e(w,Uu),e(w,nl),e(nl,Bu),e(w,Ru),e(w,fl),e(fl,Fu),e(w,Gu),e(w,dl),e(dl,Ku),e(w,Wu),f(t,ea,n),f(t,Ke,n),e(Ke,pl),e(pl,Yu),e(Ke,Ju),e(Ke,ul),e(ul,Qu),f(t,ta,n),f(t,ae,n),e(ae,Xu),e(ae,cl),e(cl,Zu),e(ae,ec),e(ae,hl),e(hl,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,ml),e(ml,oc),e(We,ic),e(We,_l),e(_l,lc),e(We,rc),e(ne,ac),e(ne,Ye),e(Ye,vl),e(vl,nc),e(Ye,fc),e(Ye,gl),e(gl,dc),e(Ye,pc),e(ne,uc),e(ne,wl),e(wl,cc),f(t,ia,n),m(es,t,n),f(t,la,n),f(t,fe,n),e(fe,de),e(de,hc),e(de,bl),e(bl,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,El),e(El,yc),e(M,Dc),e(M,yl),e(yl,Pc),e(M,$c),e(M,Dl),e(Dl,kc),e(M,Mc),e(M,Pl),e(Pl,Sc),e(M,qc),e(M,$l),e($l,jc),e(M,xc),e(fe,Ac),e(fe,V),e(V,Lc),e(V,kl),e(kl,Ic),e(V,Tc),e(V,Ml),e(Ml,Cc),e(V,Oc),e(V,os),e(os,Sl),e(Sl,Nc),e(V,zc),e(V,Qs),e(Qs,Hc),f(t,ra,n),f(t,qe,n),e(qe,Je),e(Je,ql),m(is,ql,null),e(qe,Vc),e(qe,jl),e(jl,Uc),f(t,aa,n),f(t,U,n),e(U,Bc),e(U,ls),e(ls,Rc),e(U,Fc),e(U,Xs),e(Xs,Gc),e(U,Kc),e(U,Zs),e(Zs,Wc),e(U,Yc),f(t,na,n),f(t,Qe,n),e(Qe,Y),e(Y,Jc),e(Y,xl),e(xl,Qc),e(Y,Xc),e(Y,eo),e(eo,Zc),e(Y,eh),e(Y,Al),e(Al,th),e(Y,sh),e(Qe,oh),e(Qe,je),e(je,ih),e(je,Ll),e(Ll,lh),e(je,rh),e(je,to),e(to,ah),e(je,nh),f(t,fa,n),f(t,B,n),e(B,fh),e(B,so),e(so,dh),e(B,ph),e(B,Il),e(Il,uh),e(B,ch),e(B,Tl),e(Tl,hh),e(B,mh),f(t,da,n),f(t,oo,n),e(oo,_h),f(t,pa,n),m(rs,t,n),f(t,ua,n),f(t,R,n),e(R,vh),e(R,Cl),e(Cl,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,lo),e(lo,$h),e(pe,kh),e(pe,ro),e(ro,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,Ol),e(Ol,jh),e(ue,xh),e(ue,Nl),e(Nl,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,zl),m(ps,zl,null),e(xe,Ih),e(xe,Hl),e(Hl,Th),f(t,ga,n),f(t,F,n),e(F,Ch),e(F,ao),e(ao,Oh),e(F,Nh),e(F,Vl),e(Vl,zh),e(F,Hh),e(F,Ul),e(Ul,Vh),e(F,Uh),f(t,wa,n),f(t,no,n),e(no,Bh),f(t,ba,n),f(t,$,n),e($,Bl),e(Bl,fo),e(fo,Rh),e($,Fh),e($,Rl),e(Rl,po),e(po,Gh),e($,Kh),e($,Fl),e(Fl,uo),e(uo,Wh),e($,Yh),e($,Gl),e(Gl,co),e(co,Jh),e($,Qh),e($,Kl),e(Kl,ho),e(ho,Xh),e($,Zh),e($,Wl),e(Wl,mo),e(mo,em),e($,tm),e($,Yl),e(Yl,_o),e(_o,sm),f(t,Ea,n),f(t,Ze,n),e(Ze,om),e(Ze,vo),e(vo,im),e(Ze,lm),f(t,ya,n),m(us,t,n),Da=!0},p:l2,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),_(is.$$.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(is.$$.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(Zl),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(ir),t&&s(N),t&&s(lr),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(ie),t&&s(Cr),t&&s(z),t&&s(Or),t&&s(le),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(ia),g(es,t),t&&s(la),t&&s(fe),t&&s(ra),t&&s(qe),g(is),t&&s(aa),t&&s(U),t&&s(na),t&&s(Qe),t&&s(fa),t&&s(B),t&&s(da),t&&s(oo),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(no),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};
