import{S as e1,i as t1,s as s1,e as i,k as p,w as c,t as o,M as o1,c as r,d as s,m as u,a,x as h,h as l,b as d,N as l1,G as e,g as f,y as m,L as i1,q as _,o as v,B as g,v as r1}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 a1(fm){let be,Zi,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,lr,N,cn,ws,hn,mn,ht,_n,vn,mt,gn,wn,ir,_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,el,wt,tf,tl,sf,pr,Q,of,sl,lf,rf,bt,ol,af,nf,ur,Et,cr,X,ff,ll,df,pf,yt,uf,cf,hr,Dt,mr,Z,hf,il,mf,_f,Pt,vf,gf,_r,K,wf,bf,ks,dm,Ef,yf,vr,Ms,Df,gr,$t,wr,q,Pf,kt,$f,kf,rl,Mf,Sf,al,qf,jf,nl,xf,Af,br,Mt,Er,Ss,Lf,yr,Pe,ze,fl,St,If,dl,Tf,Dr,qs,Cf,Pr,ee,Of,js,Nf,zf,qt,Hf,Vf,$r,te,Uf,jt,pl,Bf,Rf,xt,Ff,Gf,kr,At,Mr,se,Kf,ul,Wf,Yf,cl,Jf,Qf,Sr,Lt,qr,oe,Xf,hl,Zf,ed,xs,td,sd,jr,$e,He,ml,It,od,_l,ld,xr,j,id,vl,rd,ad,T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,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,Qs,Hc,ra,qe,Je,qi,ls,Vc,ji,Uc,aa,U,Bc,is,Rc,Fc,Xs,Gc,Kc,Zs,Wc,Yc,na,Qe,Y,Jc,xi,Qc,Xc,eo,Zc,eh,Ai,th,sh,oh,je,lh,Li,ih,rh,to,ah,nh,fa,B,fh,so,dh,ph,Ii,uh,ch,Ti,hh,mh,da,oo,_h,pa,rs,ua,R,vh,Ci,gh,wh,lo,bh,Eh,as,yh,Dh,ca,pe,Ph,io,$h,kh,ro,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,ao,Oh,Nh,Vi,zh,Hh,Ui,Vh,Uh,wa,no,Bh,ba,$,Bi,fo,Rh,Fh,Ri,po,Gh,Kh,Fi,uo,Wh,Yh,Gi,co,Jh,Qh,Ki,ho,Xh,Zh,Wi,mo,em,tm,Yi,_o,sm,Ea,Ze,om,vo,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"),No=i("span"),c(ft.$$.fragment),Ka=p(),zo=i("span"),Wa=o("Loading"),er=p(),Ie=i("p"),Ya=o("A core premise of the diffusers library is to make diffusion models "),Ho=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"),Vo=i("em"),Za=o("Complete Diffusion Pipelines"),en=o(" via the "),_s=i("a"),tn=o("DiffusionPipeline.from_pretrained()"),sn=p(),pt=i("li"),Uo=i("em"),on=o("Diffusion Models"),ln=o(" via "),vs=i("a"),rn=o("ModelMixin.from_pretrained()"),an=p(),ut=i("li"),Bo=i("em"),nn=o("Schedulers"),fn=o(" via "),gs=i("a"),dn=o("SchedulerMixin.from_pretrained()"),or=p(),ye=i("h2"),Te=i("a"),Ro=i("span"),c(ct.$$.fragment),pn=p(),Fo=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 ("),Go=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 "),Ko=i("code"),Mn=o("ldm"),Sn=o(`.
The pipeline instance can then be called using `),Ce=i("a"),qn=o("LDMTextToImagePipeline."),Wo=i("strong"),jn=o("call"),xn=o("()"),An=o(" (i.e., "),Yo=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 "),Jo=i("code"),zn=o("LDMTextToImagePipeline"),Hn=o(" often consist of multiple components. These components can be both parameterized models, such as "),Qo=i("code"),Vn=o('"unet"'),Un=o(", "),Xo=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, "),Zo=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"),el=i("span"),c(wt.$$.fragment),tf=p(),tl=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, "),sl=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"),ol=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 "),ll=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 "),il=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 "),rl=i("code"),Mf=o("use_auth_token"),Sf=o(". In this case you do "),al=i("strong"),qf=o("not"),jf=o(` need
to run `),nl=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"),fl=i("span"),c(St.$$.fragment),If=p(),dl=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"),pl=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 "),ul=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 `),cl=i("code"),Jf=o("from_pretrained"),Qf=o(":"),Sr=p(),c(Lt.$$.fragment),qr=p(),oe=i("p"),Xf=o("If "),hl=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"),ml=i("span"),c(It.$$.fragment),od=p(),_l=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, "),vl=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"),gl=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 "),wl=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 "),bl=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 "),El=i("code"),Cd=o("scheduler"),Od=o(" attribute. It\u2019s not possible to use a different name, such as "),yl=i("code"),Nd=o("sampler=scheduler"),zd=o(" since "),Dl=i("code"),Hd=o("sampler"),Vd=o(" is not a defined keyword for "),Pl=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 "),$l=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 "),kl=i("code"),Wd=o('"unet"'),Yd=o("."),Or=p(),ie=i("p"),Jd=o("One special case that can also be customized is the "),Ml=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 "),Sl=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, "),ql=i("em"),sp=o("e.g."),op=o(" the weights and configurations of "),Ht=i("a"),jl=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 "),xl=i("code"),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, "),Bs=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, "),Rs=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 "),Fs=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(),Gs=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 "),Ks=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 "),Ws=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 "),Ys=i("a"),gu=o("UNet2DConditionModel"),wu=p(),Jt=i("li"),Xl=i("code"),bu=o('"vqvae"'),Eu=o(" of class "),Js=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 "),Qs=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 "),Xs=i("a"),Gc=o("ModelMixin.from_pretrained()"),Kc=o(" function. The API is very similar the "),Zs=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, "),eo=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 "),to=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 "),so=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(),oo=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 "),lo=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 "),io=i("a"),$h=o("Loading customized pipelines"),kh=o(", one can pass a loaded model to a diffusion pipeline, via "),ro=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 "),ao=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(),no=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"),fo=i("a"),Rh=o("DDPMScheduler"),Fh=p(),Ri=i("li"),po=i("a"),Gh=o("DDIMScheduler"),Kh=p(),Fi=i("li"),uo=i("a"),Wh=o("PNDMScheduler"),Yh=p(),Gi=i("li"),co=i("a"),Jh=o("LMSDiscreteScheduler"),Qh=p(),Ki=i("li"),ho=i("a"),Xh=o("EulerDiscreteScheduler"),Zh=p(),Wi=i("li"),mo=i("a"),em=o("EulerAncestralDiscreteScheduler"),tm=p(),Yi=i("li"),_o=i("a"),sm=o("DPMSolverMultistepScheduler"),Ea=p(),Ze=i("p"),om=o("are compatible with "),vo=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=o1('[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);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=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 "),Ho=r($a,"STRONG",{});var hm=a(Ho);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 go=a(J);dt=r(go,"LI",{});var ka=a(dt);Vo=r(ka,"EM",{});var _m=a(Vo);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(go),pt=r(go,"LI",{});var Ma=a(pt);Uo=r(Ma,"EM",{});var gm=a(Uo);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(go),ut=r(go,"LI",{});var Sa=a(ut);Bo=r(Sa,"EM",{});var bm=a(Bo);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),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=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 ("),Go=r(I,"EM",{});var qm=a(Go);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 "),Ko=r(I,"CODE",{});var xm=a(Ko);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."),Wo=r(ja,"STRONG",{});var Am=a(Wo);jn=l(Am,"call"),Am.forEach(s),xn=l(ja,"()"),ja.forEach(s),An=l(I," (i.e., "),Yo=r(I,"CODE",{});var Lm=a(Yo);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 "),Jo=r(k,"CODE",{});var Tm=a(Jo);zn=l(Tm,"LDMTextToImagePipeline"),Tm.forEach(s),Hn=l(k," often consist of multiple components. These components can be both parameterized models, such as "),Qo=r(k,"CODE",{});var Cm=a(Qo);Vn=l(Cm,'"unet"'),Cm.forEach(s),Un=l(k,", "),Xo=r(k,"CODE",{});var Om=a(Xo);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, "),Zo=r(k,"EM",{});var Nm=a(Zo);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);el=r(Bm,"SPAN",{});var Rm=a(el);h(wt.$$.fragment,Rm),Rm.forEach(s),Bm.forEach(s),tf=u(Aa),tl=r(Aa,"SPAN",{});var Fm=a(tl);sf=l(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=l(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, "),sl=r(wo,"EM",{});var Gm=a(sl);lf=l(Gm,"e.g."),Gm.forEach(s),rf=l(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);ol=r(Km,"CODE",{});var Wm=a(ol);af=l(Wm,"runwayml/stable-diffusion-v1-5"),Wm.forEach(s),Km.forEach(s),nf=l(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=l(bo,"it will only work if you have both "),ll=r(bo,"EM",{});var Ym=a(ll);df=l(Ym,"click-accepted"),Ym.forEach(s),pf=l(bo," the license on "),yt=r(bo,"A",{href:!0,rel:!0});var Jm=a(yt);uf=l(Jm,"the model card"),Jm.forEach(s),cf=l(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=l(Eo,"Therefore, we need to make sure to "),il=r(Eo,"EM",{});var Qm=a(il);mf=l(Qm,"click-accept"),Qm.forEach(s),_f=l(Eo,` the license. You can do this by simply visiting
the `),Pt=r(Eo,"A",{href:!0,rel:!0});var Xm=a(Pt);vf=l(Xm,"model card"),Xm.forEach(s),gf=l(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=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 "),rl=r(ce,"CODE",{});var t_=a(rl);Mf=l(t_,"use_auth_token"),t_.forEach(s),Sf=l(ce,". In this case you do "),al=r(ce,"STRONG",{});var s_=a(al);qf=l(s_,"not"),s_.forEach(s),jf=l(ce,` need
to run `),nl=r(ce,"CODE",{});var o_=a(nl);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);fl=r(i_,"SPAN",{});var r_=a(fl);h(St.$$.fragment,r_),r_.forEach(s),i_.forEach(s),If=u(La),dl=r(La,"SPAN",{});var a_=a(dl);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 Do=a(ee);Of=l(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=l(f_,"DiffusionPipeline.from_pretrained()"),f_.forEach(s),zf=l(Do,`. Let\u2019s again look at an example for
`),qt=r(Do,"A",{href:!0,rel:!0});var d_=a(qt);Hf=l(d_,"CompVis\u2019 Latent Diffusion model"),d_.forEach(s),Vf=l(Do,"."),Do.forEach(s),$r=u(t),te=r(t,"P",{});var Po=a(te);Uf=l(Po,"First, you should make use of "),jt=r(Po,"A",{href:!0,rel:!0});var p_=a(jt);pl=r(p_,"CODE",{});var u_=a(pl);Bf=l(u_,"git-lfs"),u_.forEach(s),p_.forEach(s),Rf=l(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=l(c_,"model repository"),c_.forEach(s),Gf=l(Po,":"),Po.forEach(s),kr=u(t),h(At.$$.fragment,t),Mr=u(t),se=r(t,"P",{});var $o=a(se);Kf=l($o,"The command above will create a local folder called "),ul=r($o,"CODE",{});var h_=a(ul);Wf=l(h_,"./stable-diffusion-v1-5"),h_.forEach(s),Yf=l($o,` on your disk.
Now, all you have to do is to simply pass the local folder path to `),cl=r($o,"CODE",{});var m_=a(cl);Jf=l(m_,"from_pretrained"),m_.forEach(s),Qf=l($o,":"),$o.forEach(s),Sr=u(t),h(Lt.$$.fragment,t),qr=u(t),oe=r(t,"P",{});var ko=a(oe);Xf=l(ko,"If "),hl=r(ko,"CODE",{});var __=a(hl);Zf=l(__,"repo_id"),__.forEach(s),ed=l(ko," is a local path, as it is the case here, "),xs=r(ko,"A",{href:!0});var v_=a(xs);td=l(v_,"DiffusionPipeline.from_pretrained()"),v_.forEach(s),sd=l(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);ml=r(g_,"SPAN",{});var w_=a(ml);h(It.$$.fragment,w_),w_.forEach(s),g_.forEach(s),od=u(Ia),_l=r(Ia,"SPAN",{});var b_=a(_l);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, "),vl=r(he,"EM",{});var E_=a(vl);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);gl=r(cs,"EM",{});var $_=a(gl);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 Mo=a(le);Os=r(Mo,"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(Mo),Ve=r(Mo,"LI",{});var Ji=a(Ve);Pd=l(Ji,"Second, the scheduler is loaded with a function argument, called "),wl=r(Ji,"CODE",{});var j_=a(wl);$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(Mo),P=r(Mo,"LI",{});var S=a(P);qd=l(S,"Third, the scheduler instance can simply be passed with the "),bl=r(S,"CODE",{});var A_=a(bl);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 "),El=r(S,"CODE",{});var T_=a(El);Cd=l(T_,"scheduler"),T_.forEach(s),Od=l(S," attribute. It\u2019s not possible to use a different name, such as "),yl=r(S,"CODE",{});var C_=a(yl);Nd=l(C_,"sampler=scheduler"),C_.forEach(s),zd=l(S," since "),Dl=r(S,"CODE",{});var O_=a(Dl);Hd=l(O_,"sampler"),O_.forEach(s),Vd=l(S," is not a defined keyword for "),Pl=r(S,"CODE",{});var N_=a(Pl);Ud=l(N_,"StableDiffusionPipeline.__init__()"),N_.forEach(s),S.forEach(s),Mo.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 "),$l=r(tt,"STRONG",{});var z_=a($l);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 "),kl=r(tt,"CODE",{});var V_=a(kl);Wd=l(V_,'"unet"'),V_.forEach(s),Yd=l(tt,"."),tt.forEach(s),Or=u(t),ie=r(t,"P",{});var So=a(ie);Jd=l(So,"One special case that can also be customized is the "),Ml=r(So,"CODE",{});var U_=a(Ml);Qd=l(U_,'"safety_checker"'),U_.forEach(s),Xd=l(So," of stable diffusion. If you believe the safety checker doesn\u2019t serve you any good, you can simply disable it by passing "),Sl=r(So,"CODE",{});var B_=a(Sl);Zd=l(B_,"None"),B_.forEach(s),ep=l(So,":"),So.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, "),ql=r(me,"EM",{});var R_=a(ql);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);jl=r(F_,"CODE",{});var G_=a(jl);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 "),xl=r(Ta,"CODE",{});var Y_=a(xl);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, "),Bs=r(Oa,"A",{href:!0});var Z_=a(Bs);_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, "),Rs=r(_e,"A",{href:!0});var sv=a(Rs);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 "),Fs=r(ve,"A",{href:!0});var iv=a(Fs);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),Gs=r(ge,"A",{href:!0});var fv=a(Gs);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 qo=a(re);Wp=l(qo,"First, we see that the official pipeline is the "),Ks=r(qo,"A",{href:!0});var hv=a(Ks);Yp=l(hv,"LDMTextToImagePipeline"),hv.forEach(s),Jp=l(qo,", and second we see that the "),Rl=r(qo,"CODE",{});var mv=a(Rl);Qp=l(mv,"LDMTextToImagePipeline"),mv.forEach(s),Xp=l(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);Fl=r(jo,"CODE",{});var _v=a(Fl);Zp=l(_v,'"bert"'),_v.forEach(s),eu=l(jo," of class "),Gl=r(jo,"CODE",{});var vv=a(Gl);tu=l(vv,"LDMBertModel"),vv.forEach(s),su=l(jo," as defined "),Kt=r(jo,"A",{href:!0,rel:!0});var gv=a(Kt);ou=l(gv,"in the pipeline"),gv.forEach(s),jo.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 "),Ws=r(za,"A",{href:!0});var bv=a(Ws);au=l(bv,"DDIMScheduler"),bv.forEach(s),za.forEach(s),nu=u(we),Se=r(we,"LI",{});var xo=a(Se);Wl=r(xo,"CODE",{});var Ev=a(Wl);fu=l(Ev,'"tokenizer"'),Ev.forEach(s),du=l(xo," of class "),Yl=r(xo,"CODE",{});var yv=a(Yl);pu=l(yv,"BertTokenizer"),yv.forEach(s),uu=l(xo," as defined "),Ge=r(xo,"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),xo.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 "),Ys=r(Ha,"A",{href:!0});var $v=a(Ys);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 "),Js=r(Va,"A",{href:!0});var Mv=a(Js);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 Ao=a(ae);Xu=l(Ao,"In the case of "),ci=r(Ao,"CODE",{});var Bv=a(ci);Zu=l(Bv,"CompVis/ldm-text2im-large-256"),Bv.forEach(s),ec=l(Ao," the "),hi=r(Ao,"CODE",{});var Rv=a(hi);tc=l(Rv,"model_index.json"),Rv.forEach(s),sc=l(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 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(Lo),Ye=r(Lo,"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(Lo),wi=r(Lo,"LI",{});var Yv=a(wi);cc=l(Yv,"Every component of the pipeline is then defined under the form:"),Yv.forEach(s),Lo.forEach(s),la=u(t),h(es.$$.fragment,t),ia=u(t),fe=r(t,"UL",{});var Io=a(fe);de=r(Io,"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(Io),M=r(Io,"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 e2=a(yi);Pc=l(e2,"e.g."),e2.forEach(s),$c=u(G),Di=r(G,"CODE",{});var t2=a(Di);kc=l(t2,"diffusers"),t2.forEach(s),Mc=l(G," or "),Pi=r(G,"CODE",{});var s2=a(Pi);Sc=l(s2,"transformers"),s2.forEach(s),qc=l(G," from which the "),$i=r(G,"CODE",{});var o2=a($i);jc=l(o2,'"class"'),o2.forEach(s),xc=l(G," should be loaded"),G.forEach(s),Ac=u(Io),V=r(Io,"LI",{});var Ae=a(V);Lc=l(Ae,"The "),ki=r(Ae,"CODE",{});var l2=a(ki);Ic=l(l2,'"class"'),l2.forEach(s),Tc=l(Ae," field corresponds to the name of the class, "),Mi=r(Ae,"EM",{});var i2=a(Mi);Cc=l(i2,"e.g."),i2.forEach(s),Oc=u(Ae),os=r(Ae,"A",{href:!0,rel:!0});var r2=a(os);Si=r(r2,"CODE",{});var a2=a(Si);Nc=l(a2,"BertTokenizer"),a2.forEach(s),r2.forEach(s),zc=l(Ae," or "),Qs=r(Ae,"A",{href:!0});var n2=a(Qs);Hc=l(n2,"UNet2DConditionModel"),n2.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 f2=a(Je);qi=r(f2,"SPAN",{});var d2=a(qi);h(ls.$$.fragment,d2),d2.forEach(s),f2.forEach(s),Vc=u(Ba),ji=r(Ba,"SPAN",{});var p2=a(ji);Uc=l(p2,"Loading models"),p2.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 u2=a(is);Rc=l(u2,"src/diffusers/models"),u2.forEach(s),Fc=l(ot," can be loaded via the "),Xs=r(ot,"A",{href:!0});var c2=a(Xs);Gc=l(c2,"ModelMixin.from_pretrained()"),c2.forEach(s),Kc=l(ot," function. The API is very similar the "),Zs=r(ot,"A",{href:!0});var h2=a(Zs);Wc=l(h2,"DiffusionPipeline.from_pretrained()"),h2.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 m2=a(xi);Qc=l(m2,"diffusers"),m2.forEach(s),Xc=l(lt," and cache them. If the latest files are available in the local cache, "),eo=r(lt,"A",{href:!0});var _2=a(eo);Zc=l(_2,"ModelMixin.from_pretrained()"),_2.forEach(s),eh=l(lt," will simply reuse the cache and "),Ai=r(lt,"STRONG",{});var v2=a(Ai);th=l(v2,"not"),v2.forEach(s),sh=l(lt," re-download the files."),lt.forEach(s),oh=u(Ra),je=r(Ra,"LI",{});var To=a(je);lh=l(To,"Load the cached weights into the "),Li=r(To,"EM",{});var g2=a(Li);ih=l(g2,"defined"),g2.forEach(s),rh=l(To," model class - one of "),to=r(To,"A",{href:!0});var w2=a(to);ah=l(w2,"the existing model classes"),w2.forEach(s),nh=l(To," - and return an instance of the class."),To.forEach(s),Ra.forEach(s),fa=u(t),B=r(t,"P",{});var it=a(B);fh=l(it,"In constrast to "),so=r(it,"A",{href:!0});var b2=a(so);dh=l(b2,"DiffusionPipeline.from_pretrained()"),b2.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 E2=a(Ii);uh=l(E2,"diffusion_pytorch_model.bin"),E2.forEach(s),ch=l(it," and "),Ti=r(it,"CODE",{});var y2=a(Ti);hh=l(y2,"config.json"),y2.forEach(s),mh=l(it," file."),it.forEach(s),da=u(t),oo=r(t,"P",{});var D2=a(oo);_h=l(D2,"Let\u2019s look at an example:"),D2.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 P2=a(Ci);gh=l(P2,'subfolder="unet"'),P2.forEach(s),wh=l(rt," argument to tell "),lo=r(rt,"A",{href:!0});var $2=a(lo);bh=l($2,"ModelMixin.from_pretrained()"),$2.forEach(s),Eh=l(rt," that the model weights are located in a "),as=r(rt,"A",{href:!0,rel:!0});var k2=a(as);yh=l(k2,"subfolder of the repository"),k2.forEach(s),Dh=l(rt,"."),rt.forEach(s),ca=u(t),pe=r(t,"P",{});var Co=a(pe);Ph=l(Co,"As explained in "),io=r(Co,"A",{href:!0});var M2=a(io);$h=l(M2,"Loading customized pipelines"),M2.forEach(s),kh=l(Co,", one can pass a loaded model to a diffusion pipeline, via "),ro=r(Co,"A",{href:!0});var S2=a(ro);Mh=l(S2,"DiffusionPipeline.from_pretrained()"),S2.forEach(s),Sh=l(Co,":"),Co.forEach(s),ha=u(t),h(ns.$$.fragment,t),ma=u(t),ue=r(t,"P",{});var Oo=a(ue);qh=l(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 q2=a(fs);Oi=r(q2,"CODE",{});var j2=a(Oi);jh=l(j2,"google/ddpm-cifar10-32"),j2.forEach(s),q2.forEach(s),xh=l(Oo,`, we don\u2019t
need to pass a `),Ni=r(Oo,"CODE",{});var x2=a(Ni);Ah=l(x2,"subfolder"),x2.forEach(s),Lh=l(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 A2=a(Xe);zi=r(A2,"SPAN",{});var L2=a(zi);h(ps.$$.fragment,L2),L2.forEach(s),A2.forEach(s),Ih=u(Fa),Hi=r(Fa,"SPAN",{});var I2=a(Hi);Th=l(I2,"Loading schedulers"),I2.forEach(s),Fa.forEach(s),ga=u(t),F=r(t,"P",{});var at=a(F);Ch=l(at,"Schedulers rely on "),ao=r(at,"A",{href:!0});var T2=a(ao);Oh=l(T2,"SchedulerMixin.from_pretrained()"),T2.forEach(s),Nh=l(at,". Schedulers are "),Vi=r(at,"STRONG",{});var C2=a(Vi);zh=l(C2,"not parameterized"),C2.forEach(s),Hh=l(at," or "),Ui=r(at,"STRONG",{});var O2=a(Ui);Vh=l(O2,"trained"),O2.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),no=r(t,"P",{});var N2=a(no);Bh=l(N2,`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:`),N2.forEach(s),ba=u(t),$=r(t,"UL",{});var T=a($);Bi=r(T,"LI",{});var z2=a(Bi);fo=r(z2,"A",{href:!0});var H2=a(fo);Rh=l(H2,"DDPMScheduler"),H2.forEach(s),z2.forEach(s),Fh=u(T),Ri=r(T,"LI",{});var V2=a(Ri);po=r(V2,"A",{href:!0});var U2=a(po);Gh=l(U2,"DDIMScheduler"),U2.forEach(s),V2.forEach(s),Kh=u(T),Fi=r(T,"LI",{});var B2=a(Fi);uo=r(B2,"A",{href:!0});var R2=a(uo);Wh=l(R2,"PNDMScheduler"),R2.forEach(s),B2.forEach(s),Yh=u(T),Gi=r(T,"LI",{});var F2=a(Gi);co=r(F2,"A",{href:!0});var G2=a(co);Jh=l(G2,"LMSDiscreteScheduler"),G2.forEach(s),F2.forEach(s),Qh=u(T),Ki=r(T,"LI",{});var K2=a(Ki);ho=r(K2,"A",{href:!0});var W2=a(ho);Xh=l(W2,"EulerDiscreteScheduler"),W2.forEach(s),K2.forEach(s),Zh=u(T),Wi=r(T,"LI",{});var Y2=a(Wi);mo=r(Y2,"A",{href:!0});var J2=a(mo);em=l(J2,"EulerAncestralDiscreteScheduler"),J2.forEach(s),Y2.forEach(s),tm=u(T),Yi=r(T,"LI",{});var Q2=a(Yi);_o=r(Q2,"A",{href:!0});var X2=a(_o);sm=l(X2,"DPMSolverMultistepScheduler"),X2.forEach(s),Q2.forEach(s),T.forEach(s),Ea=u(t),Ze=r(t,"P",{});var Ga=a(Ze);om=l(Ga,"are compatible with "),vo=r(Ga,"A",{href:!0});var Z2=a(vo);lm=l(Z2,"StableDiffusionPipeline"),Z2.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(n1)),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.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(vs,"href","/docs/diffusers/v0.12.0/en/api/models#diffusers.ModelMixin.from_pretrained"),d(gs,"href","/docs/diffusers/v0.12.0/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/v0.12.0/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.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(Es,"href","/docs/diffusers/v0.12.0/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Ce,"href","/docs/diffusers/v0.12.0/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline.__call__"),d(ys,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline"),d(Ds,"href","/docs/diffusers/v0.12.0/en/api/pipelines/latent_diffusion#diffusers.LDMTextToImagePipeline"),d(Ps,"href","/docs/diffusers/v0.12.0/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"),l1(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.12.0/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.12.0/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.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),d(Ls,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Is,"href","/docs/diffusers/v0.12.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),d(Ts,"href","/docs/diffusers/v0.12.0/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler"),d(Ns,"href","/docs/diffusers/v0.12.0/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/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Hs,"href","/docs/diffusers/v0.12.0/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/v0.12.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline"),d(Us,"href","/docs/diffusers/v0.12.0/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/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Rs,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(Fs,"href","./api/overview#diffusers-summary"),d(Gs,"href","/docs/diffusers/v0.12.0/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/v0.12.0/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/v0.12.0/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/v0.12.0/en/api/models#diffusers.UNet2DConditionModel"),d(Js,"href","/docs/diffusers/v0.12.0/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/v0.12.0/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(Xs,"href","/docs/diffusers/v0.12.0/en/api/models#diffusers.ModelMixin.from_pretrained"),d(Zs,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(eo,"href","/docs/diffusers/v0.12.0/en/api/models#diffusers.ModelMixin.from_pretrained"),d(to,"href","./api/models"),d(so,"href","/docs/diffusers/v0.12.0/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.from_pretrained"),d(lo,"href","/docs/diffusers/v0.12.0/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(io,"href","%22./using-diffusers/loading#loading-customized-pipelines%22"),d(ro,"href","/docs/diffusers/v0.12.0/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/v0.12.0/en/api/schedulers/overview#diffusers.SchedulerMixin.from_pretrained"),d(fo,"href","/docs/diffusers/v0.12.0/en/api/schedulers/ddpm#diffusers.DDPMScheduler"),d(po,"href","/docs/diffusers/v0.12.0/en/api/schedulers/ddim#diffusers.DDIMScheduler"),d(uo,"href","/docs/diffusers/v0.12.0/en/api/schedulers/pndm#diffusers.PNDMScheduler"),d(co,"href","/docs/diffusers/v0.12.0/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler"),d(ho,"href","/docs/diffusers/v0.12.0/en/api/schedulers/euler#diffusers.EulerDiscreteScheduler"),d(mo,"href","/docs/diffusers/v0.12.0/en/api/schedulers/euler_ancestral#diffusers.EulerAncestralDiscreteScheduler"),d(_o,"href","/docs/diffusers/v0.12.0/en/api/schedulers/multistep_dpm_solver#diffusers.DPMSolverMultistepScheduler"),d(vo,"href","/docs/diffusers/v0.12.0/en/api/pipelines/stable_diffusion/text2img#diffusers.StableDiffusionPipeline")},m(t,n){e(document.head,be),f(t,Zi,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,v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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,rl),e(rl,Mf),e(q,Sf),e(q,al),e(al,qf),e(q,jf),e(q,nl),e(nl,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,fl),m(St,fl,null),e(Pe,If),e(Pe,dl),e(dl,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,pl),e(pl,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,ul),e(ul,Wf),e(se,Yf),e(se,cl),e(cl,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,hl),e(hl,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,ml),m(It,ml,null),e($e,od),e($e,_l),e(_l,ld),f(t,xr,n),f(t,j,n),e(j,id),e(j,vl),e(vl,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,gl),e(gl,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,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0},p:i1,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(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 n1={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 f1(fm){return r1(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class c1 extends e1{constructor(be){super();t1(this,be,f1,a1,s1,{})}}export{c1 as default,n1 as metadata};
