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u1,eo,rd,p1,g1,m1,_1,De,nd,v1,E1,ld,b1,T1,id,y1,w1,D1,Ie,sd,I1,x1,to,A1,S1,_n,G1,k1,P1,S,dd,R1,O1,fd,$1,M1,hd,C1,L1,cd,N1,j1,Fd,$e,We,ud,ao,q1,pd,H1,Yd,Me,Ze,gd,oo,B1,md,U1,Qd,ro,Wd,Ce,Je,_d,no,V1,vd,z1,Zd,Ke,F1,Ed,Y1,Q1,Jd,lo,Kd,io,W1,so,vn,Ev,Xd,Le,Xe,bd,fo,Z1,Td,J1,ef,xe,K1,ho,X1,ev,co,En,bv,tv,tf,Ne,et,yd,uo,av,wd,ov,af,tt,rv,Dd,nv,lv,of,po,rf,go,iv,mo,bn,Tv,nf;return zt=new qe({}),ra=new qe({}),za=new qe({}),Xa=new qe({}),ao=new qe({}),oo=new qe({}),ro=new uv({props:{code:`# make sure you're logged in with \`huggingface-cli login\`
from diffusers import StableDiffusionPipeline, LMSDiscreteScheduler

pipe = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
pipe = pipe.to("cuda")

prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]

image.save("astronaut_rides_horse.png")`,highlighted:`<span class="hljs-comment"># make sure you&#x27;re logged in with \`huggingface-cli login\`</span>
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline, LMSDiscreteScheduler

pipe = StableDiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
image = pipe(prompt).images[<span class="hljs-number">0</span>]

image.save(<span class="hljs-string">&quot;astronaut_rides_horse.png&quot;</span>)`}}),no=new qe({}),lo=new uv({props:{code:`import requests
from PIL import Image
from io import BytesIO

from diffusers import StableDiffusionImg2ImgPipeline

# load the pipeline
device = "cuda"
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16).to(
    device
)

# let's download an initial image
url = "https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg"

response = requests.get(url)
init_image = Image.open(BytesIO(response.content)).convert("RGB")
init_image = init_image.resize((768, 512))

prompt = "A fantasy landscape, trending on artstation"

images = pipe(prompt=prompt, image=init_image, strength=0.75, guidance_scale=7.5).images

images[0].save("fantasy_landscape.png")`,highlighted:`<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionImg2ImgPipeline

<span class="hljs-comment"># load the pipeline</span>
device = <span class="hljs-string">&quot;cuda&quot;</span>
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>, torch_dtype=torch.float16).to(
    device
)

<span class="hljs-comment"># let&#x27;s download an initial image</span>
url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg&quot;</span>

response = requests.get(url)
init_image = Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)
init_image = init_image.resize((<span class="hljs-number">768</span>, <span class="hljs-number">512</span>))

prompt = <span class="hljs-string">&quot;A fantasy landscape, trending on artstation&quot;</span>

images = pipe(prompt=prompt, image=init_image, strength=<span class="hljs-number">0.75</span>, guidance_scale=<span class="hljs-number">7.5</span>).images

images[<span class="hljs-number">0</span>].save(<span class="hljs-string">&quot;fantasy_landscape.png&quot;</span>)`}}),fo=new qe({}),uo=new qe({}),po=new uv({props:{code:`import PIL
import requests
import torch
from io import BytesIO

from diffusers import StableDiffusionInpaintPipeline


def download_image(url):
    response = requests.get(url)
    return PIL.Image.open(BytesIO(response.content)).convert("RGB")


img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png"
mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png"

init_image = download_image(img_url).resize((512, 512))
mask_image = download_image(mask_url).resize((512, 512))

pipe = StableDiffusionInpaintPipeline.from_pretrained(
    "runwayml/stable-diffusion-inpainting",
    torch_dtype=torch.float16,
)
pipe = pipe.to("cuda")

prompt = "Face of a yellow cat, high resolution, sitting on a park bench"
image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[0]`,highlighted:`<span class="hljs-keyword">import</span> PIL
<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> io <span class="hljs-keyword">import</span> BytesIO

<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionInpaintPipeline


<span class="hljs-keyword">def</span> <span class="hljs-title function_">download_image</span>(<span class="hljs-params">url</span>):
    response = requests.get(url)
    <span class="hljs-keyword">return</span> PIL.Image.<span class="hljs-built_in">open</span>(BytesIO(response.content)).convert(<span class="hljs-string">&quot;RGB&quot;</span>)


img_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png&quot;</span>
mask_url = <span class="hljs-string">&quot;https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png&quot;</span>

init_image = download_image(img_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))
mask_image = download_image(mask_url).resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>))

pipe = StableDiffusionInpaintPipeline.from_pretrained(
    <span class="hljs-string">&quot;runwayml/stable-diffusion-inpainting&quot;</span>,
    torch_dtype=torch.float16,
)
pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

prompt = <span class="hljs-string">&quot;Face of a yellow cat, high resolution, sitting on a park bench&quot;</span>
image = pipe(prompt=prompt, image=init_image, mask_image=mask_image).images[<span class="hljs-number">0</span>]`}}),{c(){Se=a("meta"),xd=d(),Ge=a("h1"),He=a("a"),wn=a("span"),k(zt.$$.fragment),Sf=d(),Dn=a("span"),Gf=l("Pipelines"),Ad=d(),To=a("p"),kf=l(`Pipelines provide a simple way to run state-of-the-art diffusion models in inference.
Most diffusion systems consist of multiple independently-trained models and highly adaptable scheduler
components - all of which are needed to have a functioning end-to-end diffusion system.`),Sd=d(),Be=a("p"),Pf=l("As an example, "),Ft=a("a"),Rf=l("Stable Diffusion"),Of=l(" has three independently trained models:"),Gd=d(),E=a("ul"),In=a("li"),yo=a("a"),$f=l("Autoencoder"),Mf=d(),xn=a("li"),wo=a("a"),Cf=l("Conditional Unet"),Lf=d(),An=a("li"),Yt=a("a"),Nf=l("CLIP text encoder"),jf=d(),Qt=a("li"),qf=l("a scheduler component, "),Do=a("a"),Hf=l("scheduler"),Bf=l(","),Uf=d(),Wt=a("li"),Vf=l("a "),Zt=a("a"),zf=l("CLIPFeatureExtractor"),Ff=l(","),Yf=d(),Jt=a("li"),Qf=l("as well as a "),Io=a("a"),Wf=l("safety checker"),Zf=l(`.
All of these components are necessary to run stable diffusion in inference even though they were trained
or created independently from each other.`),kd=d(),xo=a("p"),Jf=l(`To that end, we strive to offer all open-sourced, state-of-the-art diffusion system under a unified API.
More specifically, we strive to provide pipelines that`),Pd=d(),D=a("ul"),Sn=a("li"),Gn=a("ol"),C=a("li"),Kf=l("can load the officially published weights and yield 1-to-1 the same outputs as the original implementation according to the corresponding paper ("),kn=a("em"),Xf=l("e.g."),eh=d(),Kt=a("a"),th=l("LDMTextToImagePipeline"),ah=l(", uses the officially released weights of "),Xt=a("a"),oh=l("High-Resolution Image Synthesis with Latent Diffusion Models"),rh=l("),"),nh=d(),Pn=a("li"),Ao=a("ol"),ea=a("li"),lh=l("have a simple user interface to run the model in inference (see the "),So=a("a"),ih=l("Pipelines API"),sh=l(" section),"),dh=d(),Rn=a("li"),Go=a("ol"),ta=a("li"),fh=l("are easy to understand with code that is self-explanatory and can be read along-side the official paper (see "),ko=a("a"),hh=l("Pipelines summary"),ch=l("),"),uh=d(),On=a("li"),Po=a("ol"),aa=a("li"),ph=l("can easily be contributed by the community (see the "),Ro=a("a"),gh=l("Contribution"),mh=l(" section)."),Rd=d(),L=a("p"),$n=a("strong"),_h=l("Note"),vh=l(` that pipelines do not (and should not) offer any training functionality.
If you are looking for `),Mn=a("em"),Eh=l("official"),bh=l(" training examples, please have a look at "),oa=a("a"),Th=l("examples"),yh=l("."),Od=d(),ke=a("h2"),Ue=a("a"),Cn=a("span"),k(ra.$$.fragment),wh=d(),Ln=a("span"),Dh=l("\u{1F9E8} Diffusers Summary"),$d=d(),Oo=a("p"),Ih=l(`The following table summarizes all officially supported pipelines, their corresponding paper, and if
available a colab notebook to directly try them out.`),Md=d(),Ve=a("table"),Nn=a("thead"),N=a("tr"),jn=a("th"),xh=l("Pipeline"),Ah=d(),qn=a("th"),Sh=l("Paper"),Gh=d(),$o=a("th"),kh=l("Tasks"),Ph=d(),Mo=a("th"),Rh=l("Colab"),Oh=d(),h=a("tbody"),j=a("tr"),Hn=a("td"),Co=a("a"),$h=l("alt_diffusion"),Mh=d(),Bn=a("td"),na=a("a"),Un=a("strong"),Ch=l("AltDiffusion"),Lh=d(),Lo=a("td"),Nh=l("Image-to-Image Text-Guided Generation"),jh=d(),No=a("td"),qh=l("-"),Hh=d(),q=a("tr"),Vn=a("td"),jo=a("a"),Bh=l("audio_diffusion"),Uh=d(),zn=a("td"),la=a("a"),Fn=a("strong"),Vh=l("Audio Diffusion"),zh=d(),qo=a("td"),Fh=l("Unconditional Audio Generation"),Yh=d(),Yn=a("td"),Qh=d(),H=a("tr"),Qn=a("td"),Ho=a("a"),Wh=l("cycle_diffusion"),Zh=d(),Wn=a("td"),ia=a("a"),Zn=a("strong"),Jh=l("Cycle Diffusion"),Kh=d(),Bo=a("td"),Xh=l("Image-to-Image Text-Guided Generation"),ec=d(),Jn=a("td"),tc=d(),B=a("tr"),Kn=a("td"),Uo=a("a"),ac=l("dance_diffusion"),oc=d(),Xn=a("td"),sa=a("a"),el=a("strong"),rc=l("Dance Diffusion"),nc=d(),Vo=a("td"),lc=l("Unconditional Audio Generation"),ic=d(),tl=a("td"),sc=d(),U=a("tr"),al=a("td"),zo=a("a"),dc=l("ddpm"),fc=d(),ol=a("td"),da=a("a"),rl=a("strong"),hc=l("Denoising Diffusion Probabilistic Models"),cc=d(),Fo=a("td"),uc=l("Unconditional Image Generation"),pc=d(),nl=a("td"),gc=d(),V=a("tr"),ll=a("td"),Yo=a("a"),mc=l("ddim"),_c=d(),il=a("td"),fa=a("a"),sl=a("strong"),vc=l("Denoising Diffusion Implicit Models"),Ec=d(),Qo=a("td"),bc=l("Unconditional Image Generation"),Tc=d(),dl=a("td"),yc=d(),z=a("tr"),fl=a("td"),Wo=a("a"),wc=l("latent_diffusion"),Dc=d(),hl=a("td"),ha=a("a"),cl=a("strong"),Ic=l("High-Resolution Image Synthesis with Latent Diffusion Models"),xc=d(),Zo=a("td"),Ac=l("Text-to-Image Generation"),Sc=d(),ul=a("td"),Gc=d(),F=a("tr"),pl=a("td"),Jo=a("a"),kc=l("latent_diffusion"),Pc=d(),gl=a("td"),ca=a("a"),ml=a("strong"),Rc=l("High-Resolution Image Synthesis with Latent Diffusion Models"),Oc=d(),Ko=a("td"),$c=l("Super Resolution Image-to-Image"),Mc=d(),_l=a("td"),Cc=d(),Y=a("tr"),vl=a("td"),Xo=a("a"),Lc=l("latent_diffusion_uncond"),Nc=d(),El=a("td"),ua=a("a"),bl=a("strong"),jc=l("High-Resolution Image Synthesis with Latent Diffusion Models"),qc=d(),er=a("td"),Hc=l("Unconditional Image Generation"),Bc=d(),Tl=a("td"),Uc=d(),Q=a("tr"),yl=a("td"),tr=a("a"),Vc=l("paint_by_example"),zc=d(),wl=a("td"),pa=a("a"),Dl=a("strong"),Fc=l("Paint by Example: Exemplar-based Image Editing with Diffusion Models"),Yc=d(),ar=a("td"),Qc=l("Image-Guided Image Inpainting"),Wc=d(),Il=a("td"),Zc=d(),W=a("tr"),xl=a("td"),or=a("a"),Jc=l("pndm"),Kc=d(),Al=a("td"),ga=a("a"),Sl=a("strong"),Xc=l("Pseudo Numerical Methods for Diffusion Models on Manifolds"),eu=d(),rr=a("td"),tu=l("Unconditional Image Generation"),au=d(),Gl=a("td"),ou=d(),Z=a("tr"),kl=a("td"),nr=a("a"),ru=l("score_sde_ve"),nu=d(),Pl=a("td"),ma=a("a"),Rl=a("strong"),lu=l("Score-Based Generative Modeling through Stochastic Differential Equations"),iu=d(),lr=a("td"),su=l("Unconditional Image Generation"),du=d(),Ol=a("td"),fu=d(),J=a("tr"),$l=a("td"),ir=a("a"),hu=l("score_sde_vp"),cu=d(),Ml=a("td"),_a=a("a"),Cl=a("strong"),uu=l("Score-Based Generative Modeling through Stochastic Differential Equations"),pu=d(),sr=a("td"),gu=l("Unconditional Image Generation"),mu=d(),Ll=a("td"),_u=d(),K=a("tr"),Nl=a("td"),dr=a("a"),vu=l("semantic_stable_diffusion"),Eu=d(),jl=a("td"),va=a("a"),ql=a("strong"),bu=l("SEGA: Instructing Diffusion using Semantic Dimensions"),Tu=d(),fr=a("td"),yu=l("Text-to-Image Generation"),wu=d(),Hl=a("td"),Du=d(),X=a("tr"),Bl=a("td"),hr=a("a"),Iu=l("stable_diffusion_text2img"),xu=d(),Ul=a("td"),Ea=a("a"),Vl=a("strong"),Au=l("Stable Diffusion"),Su=d(),cr=a("td"),Gu=l("Text-to-Image Generation"),ku=d(),ur=a("td"),ba=a("a"),pr=a("img"),Pu=d(),ee=a("tr"),zl=a("td"),gr=a("a"),Ru=l("stable_diffusion_img2img"),Ou=d(),Fl=a("td"),Ta=a("a"),Yl=a("strong"),$u=l("Stable Diffusion"),Mu=d(),mr=a("td"),Cu=l("Image-to-Image Text-Guided Generation"),Lu=d(),_r=a("td"),ya=a("a"),vr=a("img"),Nu=d(),te=a("tr"),Ql=a("td"),Er=a("a"),ju=l("stable_diffusion_inpaint"),qu=d(),Wl=a("td"),wa=a("a"),Zl=a("strong"),Hu=l("Stable Diffusion"),Bu=d(),br=a("td"),Uu=l("Text-Guided Image Inpainting"),Vu=d(),Tr=a("td"),Da=a("a"),yr=a("img"),zu=d(),ae=a("tr"),Jl=a("td"),wr=a("a"),Fu=l("stable_diffusion_panorama"),Yu=d(),Kl=a("td"),Ia=a("a"),Xl=a("strong"),Qu=l("MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation"),Wu=d(),Dr=a("td"),Zu=l("Text-Guided Panorama View Generation"),Ju=d(),ei=a("td"),Ku=d(),oe=a("tr"),ti=a("td"),Ir=a("a"),Xu=l("stable_diffusion_pix2pix"),ep=d(),ai=a("td"),xa=a("a"),oi=a("strong"),tp=l("InstructPix2Pix: Learning to Follow Image Editing Instructions"),ap=d(),xr=a("td"),op=l("Text-Based Image Editing"),rp=d(),ri=a("td"),np=d(),re=a("tr"),ni=a("td"),Ar=a("a"),lp=l("stable_diffusion_pix2pix_zero"),ip=d(),li=a("td"),Aa=a("a"),ii=a("strong"),sp=l("Zero-shot Image-to-Image Translation"),dp=d(),Sr=a("td"),fp=l("Text-Based Image Editing"),hp=d(),si=a("td"),cp=d(),ne=a("tr"),di=a("td"),Gr=a("a"),up=l("stable_diffusion_attend_and_excite"),pp=d(),fi=a("td"),Sa=a("a"),hi=a("strong"),gp=l("Attend and Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models"),mp=d(),kr=a("td"),_p=l("Text-to-Image Generation"),vp=d(),ci=a("td"),Ep=d(),le=a("tr"),ui=a("td"),Pr=a("a"),bp=l("stable_diffusion_self_attention_guidance"),Tp=d(),pi=a("td"),Ga=a("a"),gi=a("strong"),yp=l("Self-Attention Guidance"),wp=d(),Rr=a("td"),Dp=l("Text-to-Image Generation"),Ip=d(),mi=a("td"),xp=d(),ie=a("tr"),_i=a("td"),Or=a("a"),Ap=l("stable_diffusion_image_variation"),Sp=d(),vi=a("td"),ka=a("a"),Ei=a("strong"),Gp=l("Stable Diffusion Image Variations"),kp=d(),$r=a("td"),Pp=l("Image-to-Image Generation"),Rp=d(),bi=a("td"),Op=d(),se=a("tr"),Ti=a("td"),Mr=a("a"),$p=l("stable_diffusion_latent_upscale"),Mp=d(),yi=a("td"),Pa=a("a"),wi=a("strong"),Cp=l("Stable Diffusion Latent Upscaler"),Lp=d(),Cr=a("td"),Np=l("Text-Guided Super Resolution Image-to-Image"),jp=d(),Di=a("td"),qp=d(),de=a("tr"),Ii=a("td"),Lr=a("a"),Hp=l("stable_diffusion_2"),Bp=d(),xi=a("td"),Ra=a("a"),Ai=a("strong"),Up=l("Stable Diffusion 2"),Vp=d(),Nr=a("td"),zp=l("Text-to-Image Generation"),Fp=d(),Si=a("td"),Yp=d(),fe=a("tr"),Gi=a("td"),jr=a("a"),Qp=l("stable_diffusion_2"),Wp=d(),ki=a("td"),Oa=a("a"),Pi=a("strong"),Zp=l("Stable Diffusion 2"),Jp=d(),qr=a("td"),Kp=l("Text-Guided Image Inpainting"),Xp=d(),Ri=a("td"),eg=d(),he=a("tr"),Oi=a("td"),Hr=a("a"),tg=l("stable_diffusion_2"),ag=d(),$i=a("td"),$a=a("a"),Mi=a("strong"),og=l("Stable Diffusion 2"),rg=d(),Br=a("td"),ng=l("Depth-to-Image Text-Guided Generation"),lg=d(),Ci=a("td"),ig=d(),ce=a("tr"),Li=a("td"),Ur=a("a"),sg=l("stable_diffusion_2"),dg=d(),Ni=a("td"),Ma=a("a"),ji=a("strong"),fg=l("Stable Diffusion 2"),hg=d(),Vr=a("td"),cg=l("Text-Guided Super Resolution Image-to-Image"),ug=d(),qi=a("td"),pg=d(),ue=a("tr"),Hi=a("td"),zr=a("a"),gg=l("stable_diffusion_safe"),mg=d(),Bi=a("td"),Ca=a("a"),Ui=a("strong"),_g=l("Safe Stable Diffusion"),vg=d(),Fr=a("td"),Eg=l("Text-Guided Generation"),bg=d(),Yr=a("td"),La=a("a"),Qr=a("img"),Tg=d(),pe=a("tr"),Vi=a("td"),Wr=a("a"),yg=l("stable_unclip"),wg=d(),zi=a("td"),Fi=a("strong"),Dg=l("Stable unCLIP"),Ig=d(),Zr=a("td"),xg=l("Text-to-Image Generation"),Ag=d(),Yi=a("td"),Sg=d(),ge=a("tr"),Qi=a("td"),Jr=a("a"),Gg=l("stable_unclip"),kg=d(),Wi=a("td"),Zi=a("strong"),Pg=l("Stable unCLIP"),Rg=d(),Kr=a("td"),Og=l("Image-to-Image Text-Guided Generation"),$g=d(),Ji=a("td"),Mg=d(),me=a("tr"),Ki=a("td"),Xr=a("a"),Cg=l("stochastic_karras_ve"),Lg=d(),Xi=a("td"),Na=a("a"),es=a("strong"),Ng=l("Elucidating the Design Space of Diffusion-Based Generative Models"),jg=d(),en=a("td"),qg=l("Unconditional Image Generation"),Hg=d(),ts=a("td"),Bg=d(),_e=a("tr"),as=a("td"),tn=a("a"),Ug=l("unclip"),Vg=d(),os=a("td"),ja=a("a"),zg=l("Hierarchical Text-Conditional Image Generation with CLIP Latents"),Fg=d(),an=a("td"),Yg=l("Text-to-Image Generation"),Qg=d(),rs=a("td"),Wg=d(),ve=a("tr"),ns=a("td"),on=a("a"),Zg=l("versatile_diffusion"),Jg=d(),ls=a("td"),qa=a("a"),Kg=l("Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),Xg=d(),rn=a("td"),em=l("Text-to-Image Generation"),tm=d(),is=a("td"),am=d(),Ee=a("tr"),ss=a("td"),nn=a("a"),om=l("versatile_diffusion"),rm=d(),ds=a("td"),Ha=a("a"),nm=l("Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),lm=d(),ln=a("td"),im=l("Image Variations Generation"),sm=d(),fs=a("td"),dm=d(),be=a("tr"),hs=a("td"),sn=a("a"),fm=l("versatile_diffusion"),hm=d(),cs=a("td"),Ba=a("a"),cm=l("Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),um=d(),dn=a("td"),pm=l("Dual Image and Text Guided Generation"),gm=d(),us=a("td"),mm=d(),Te=a("tr"),ps=a("td"),fn=a("a"),_m=l("vq_diffusion"),vm=d(),gs=a("td"),Ua=a("a"),Em=l("Vector Quantized Diffusion Model for Text-to-Image Synthesis"),bm=d(),hn=a("td"),Tm=l("Text-to-Image Generation"),ym=d(),ms=a("td"),Cd=d(),Va=a("p"),_s=a("strong"),wm=l("Note"),Dm=l(": Pipelines are simple examples of how to play around with the diffusion systems as described in the corresponding papers."),Ld=d(),ze=a("p"),Im=l("However, most of them can be adapted to use different scheduler components or even different model components. Some pipeline examples are shown in the "),cn=a("a"),xm=l("Examples"),Am=l(" below."),Nd=d(),Pe=a("h2"),Fe=a("a"),vs=a("span"),k(za.$$.fragment),Sm=d(),Es=a("span"),Gm=l("Pipelines API"),jd=d(),un=a("p"),km=l("Diffusion models often consist of multiple independently-trained models or other previously existing components."),qd=d(),we=a("p"),Pm=l(`Each model has been trained independently on a different task and the scheduler can easily be swapped out and replaced with a different one.
During inference, we however want to be able to easily load all components and use them in inference - even if one component, `),bs=a("em"),Rm=l("e.g."),Om=l(" CLIP\u2019s text encoder, originates from a different library, such as "),Fa=a("a"),$m=l("Transformers"),Mm=l(". To that end, all pipelines provide the following functionality:"),Hd=d(),I=a("ul"),g=a("li"),Ya=a("a"),Ts=a("code"),Cm=l("from_pretrained"),Lm=l(" method"),Nm=l(" that accepts a Hugging Face Hub repository id, "),ys=a("em"),jm=l("e.g."),qm=d(),Qa=a("a"),Hm=l("runwayml/stable-diffusion-v1-5"),Bm=l(" or a path to a local directory, "),ws=a("em"),Um=l("e.g."),Vm=l(`
\u201D./stable-diffusion\u201D. To correctly retrieve which models and components should be loaded, one has to provide a `),Ds=a("code"),zm=l("model_index.json"),Fm=l(" file, "),Is=a("em"),Ym=l("e.g."),Qm=d(),Wa=a("a"),Wm=l("runwayml/stable-diffusion-v1-5/model_index.json"),Zm=l(`, which defines all components that should be
loaded into the pipelines. More specifically, for each model/component one needs to define the format `),xs=a("code"),Jm=l('<name>: ["<library>", "<class name>"]'),Km=l(". "),As=a("code"),Xm=l("<name>"),e_=l(" is the attribute name given to the loaded instance of "),Ss=a("code"),t_=l("<class name>"),a_=l(" which can be found in the library or pipeline folder called "),Gs=a("code"),o_=l('"<library>"'),r_=l("."),n_=d(),_=a("li"),pn=a("a"),ks=a("code"),l_=l("save_pretrained"),i_=l(" that accepts a local path, "),Ps=a("em"),s_=l("e.g."),d_=d(),Rs=a("code"),f_=l("./stable-diffusion"),h_=l(" under which all models/components of the pipeline will be saved. For each component/model a folder is created inside the local path that is named after the given attribute name, "),Os=a("em"),c_=l("e.g."),u_=d(),$s=a("code"),p_=l("./stable_diffusion/unet"),g_=l(`.
In addition, a `),Ms=a("code"),m_=l("model_index.json"),__=l(" file is created at the root of the local path, "),Cs=a("em"),v_=l("e.g."),E_=d(),Ls=a("code"),b_=l("./stable_diffusion/model_index.json"),T_=l(` so that the complete pipeline can again be instantiated
from the local path.`),y_=d(),T=a("li"),gn=a("a"),Ns=a("code"),w_=l("to"),D_=l(" which accepts a "),js=a("code"),I_=l("string"),x_=l(" or "),qs=a("code"),A_=l("torch.device"),S_=l(" to move all models that are of type "),Hs=a("code"),G_=l("torch.nn.Module"),k_=l(" to the passed device. The behavior is fully analogous to "),Re=a("a"),P_=l("PyTorch\u2019s "),Bs=a("code"),R_=l("to"),O_=l(" method"),$_=l("."),M_=d(),b=a("li"),Us=a("code"),C_=l("__call__"),L_=l(" method to use the pipeline in inference. "),Vs=a("code"),N_=l("__call__"),j_=l(" defines inference logic of the pipeline and should ideally encompass all aspects of it, from pre-processing to forwarding tensors to the different models and schedulers, as well as post-processing. The API of the "),zs=a("code"),q_=l("__call__"),H_=l(" method can strongly vary from pipeline to pipeline. "),Fs=a("em"),B_=l("E.g."),U_=l(" a text-to-image pipeline, such as "),mn=a("a"),Ys=a("code"),V_=l("StableDiffusionPipeline"),z_=l(" should accept among other things the text prompt to generate the image. A pure image generation pipeline, such as "),Za=a("a"),F_=l("DDPMPipeline"),Y_=l(` on the other hand can be run without providing any inputs. To better understand what inputs can be adapted for
each pipeline, one should look directly into the respective pipeline.`),Bd=d(),x=a("p"),Qs=a("strong"),Q_=l("Note"),W_=l(": All pipelines have PyTorch\u2019s autograd disabled by decorating the "),Ws=a("code"),Z_=l("__call__"),J_=l(" method with a "),Ja=a("a"),Zs=a("code"),K_=l("torch.no_grad"),X_=l(` decorator because pipelines should
not be used for training. If you want to store the gradients during the forward pass, we recommend writing your own pipeline, see also our `),Ka=a("a"),e1=l("community-examples"),Ud=d(),Oe=a("h2"),Ye=a("a"),Js=a("span"),k(Xa.$$.fragment),t1=d(),Ks=a("span"),a1=l("Contribution"),Vd=d(),y=a("p"),o1=l(`We are more than happy about any contribution to the officially supported pipelines \u{1F917}. We aspire
all of our pipelines to be  `),Xs=a("strong"),r1=l("self-contained"),n1=l(", "),ed=a("strong"),l1=l("easy-to-tweak"),i1=l(", "),td=a("strong"),s1=l("beginner-friendly"),d1=l(" and for "),ad=a("strong"),f1=l("one-purpose-only"),h1=l("."),zd=d(),A=a("ul"),Qe=a("li"),od=a("strong"),c1=l("Self-contained"),u1=l(": A pipeline shall be as self-contained as possible. More specifically, this means that all functionality should be either directly defined in the pipeline file itself, should be inherited from (and only from) the "),eo=a("a"),rd=a("code"),p1=l("DiffusionPipeline"),g1=l(" class"),m1=l(" or be directly attached to the model and scheduler components of the pipeline."),_1=d(),De=a("li"),nd=a("strong"),v1=l("Easy-to-use"),E1=l(`: Pipelines should be extremely easy to use - one should be able to load the pipeline and
use it for its designated task, `),ld=a("em"),b1=l("e.g."),T1=l(` text-to-image generation, in just a couple of lines of code. Most
logic including pre-processing, an unrolled diffusion loop, and post-processing should all happen inside the `),id=a("code"),y1=l("__call__"),w1=l(" method."),D1=d(),Ie=a("li"),sd=a("strong"),I1=l("Easy-to-tweak"),x1=l(": Certain pipelines will not be able to handle all use cases and tasks that you might like them to. If you want to use a certain pipeline for a specific use case that is not yet supported, you might have to copy the pipeline file and tweak the code to your needs. We try to make the pipeline code as readable as possible so that each part \u2013from pre-processing to diffusing to post-processing\u2013 can easily be adapted. If you would like the community to benefit from your customized pipeline, we would love to see a contribution to our "),to=a("a"),A1=l("community-examples"),S1=l(". If you feel that an important pipeline should be part of the official pipelines but isn\u2019t, a contribution to the "),_n=a("a"),G1=l("official pipelines"),k1=l(" would be even better."),P1=d(),S=a("li"),dd=a("strong"),R1=l("One-purpose-only"),O1=l(": Pipelines should be used for one task and one task only. Even if two tasks are very similar from a modeling point of view, "),fd=a("em"),$1=l("e.g."),M1=l(" image2image translation and in-painting, pipelines shall be used for one task only to keep them "),hd=a("em"),C1=l("easy-to-tweak"),L1=l(" and "),cd=a("em"),N1=l("readable"),j1=l("."),Fd=d(),$e=a("h2"),We=a("a"),ud=a("span"),k(ao.$$.fragment),q1=d(),pd=a("span"),H1=l("Examples"),Yd=d(),Me=a("h3"),Ze=a("a"),gd=a("span"),k(oo.$$.fragment),B1=d(),md=a("span"),U1=l("Text-to-Image generation with Stable Diffusion"),Qd=d(),k(ro.$$.fragment),Wd=d(),Ce=a("h3"),Je=a("a"),_d=a("span"),k(no.$$.fragment),V1=d(),vd=a("span"),z1=l("Image-to-Image text-guided generation with Stable Diffusion"),Zd=d(),Ke=a("p"),F1=l("The "),Ed=a("code"),Y1=l("StableDiffusionImg2ImgPipeline"),Q1=l(" lets you pass a text prompt and an initial image to condition the generation of new images."),Jd=d(),k(lo.$$.fragment),Kd=d(),io=a("p"),W1=l("You can also run this example on colab "),so=a("a"),vn=a("img"),Xd=d(),Le=a("h3"),Xe=a("a"),bd=a("span"),k(fo.$$.fragment),Z1=d(),Td=a("span"),J1=l("Tweak prompts reusing seeds and latents"),ef=d(),xe=a("p"),K1=l("You can generate your own latents to reproduce results, or tweak your prompt on a specific result you liked. "),ho=a("a"),X1=l("This notebook"),ev=l(" shows how to do it step by step. You can also run it in Google Colab "),co=a("a"),En=a("img"),tv=l("."),tf=d(),Ne=a("h3"),et=a("a"),yd=a("span"),k(uo.$$.fragment),av=d(),wd=a("span"),ov=l("In-painting using Stable Diffusion"),af=d(),tt=a("p"),rv=l("The "),Dd=a("code"),nv=l("StableDiffusionInpaintPipeline"),lv=l(" lets you edit specific parts of an image by providing a mask and text prompt."),of=d(),k(po.$$.fragment),rf=d(),go=a("p"),iv=l("You can also run this example on colab "),mo=a("a"),bn=a("img"),this.h()},l(s){const u=KT('[data-svelte="svelte-1phssyn"]',document.head);Se=o(u,"META",{name:!0,content:!0}),u.forEach(t),xd=f(s),Ge=o(s,"H1",{class:!0});var lf=r(Ge);He=o(lf,"A",{id:!0,class:!0,href:!0});var yv=r(He);wn=o(yv,"SPAN",{});var wv=r(wn);P(zt.$$.fragment,wv),wv.forEach(t),yv.forEach(t),Sf=f(lf),Dn=o(lf,"SPAN",{});var Dv=r(Dn);Gf=i(Dv,"Pipelines"),Dv.forEach(t),lf.forEach(t),Ad=f(s),To=o(s,"P",{});var Iv=r(To);kf=i(Iv,`Pipelines provide a simple way to run state-of-the-art diffusion models in inference.
Most diffusion systems consist of multiple independently-trained models and highly adaptable scheduler
components - all of which are needed to have a functioning end-to-end diffusion system.`),Iv.forEach(t),Sd=f(s),Be=o(s,"P",{});var sf=r(Be);Pf=i(sf,"As an example, "),Ft=o(sf,"A",{href:!0,rel:!0});var xv=r(Ft);Rf=i(xv,"Stable Diffusion"),xv.forEach(t),Of=i(sf," has three independently trained models:"),sf.forEach(t),Gd=f(s),E=o(s,"UL",{});var G=r(E);In=o(G,"LI",{});var Av=r(In);yo=o(Av,"A",{href:!0});var Sv=r(yo);$f=i(Sv,"Autoencoder"),Sv.forEach(t),Av.forEach(t),Mf=f(G),xn=o(G,"LI",{});var Gv=r(xn);wo=o(Gv,"A",{href:!0});var kv=r(wo);Cf=i(kv,"Conditional Unet"),kv.forEach(t),Gv.forEach(t),Lf=f(G),An=o(G,"LI",{});var Pv=r(An);Yt=o(Pv,"A",{href:!0,rel:!0});var Rv=r(Yt);Nf=i(Rv,"CLIP text encoder"),Rv.forEach(t),Pv.forEach(t),jf=f(G),Qt=o(G,"LI",{});var df=r(Qt);qf=i(df,"a scheduler component, "),Do=o(df,"A",{href:!0});var Ov=r(Do);Hf=i(Ov,"scheduler"),Ov.forEach(t),Bf=i(df,","),df.forEach(t),Uf=f(G),Wt=o(G,"LI",{});var ff=r(Wt);Vf=i(ff,"a "),Zt=o(ff,"A",{href:!0,rel:!0});var $v=r(Zt);zf=i($v,"CLIPFeatureExtractor"),$v.forEach(t),Ff=i(ff,","),ff.forEach(t),Yf=f(G),Jt=o(G,"LI",{});var hf=r(Jt);Qf=i(hf,"as well as a "),Io=o(hf,"A",{href:!0});var Mv=r(Io);Wf=i(Mv,"safety checker"),Mv.forEach(t),Zf=i(hf,`.
All of these components are necessary to run stable diffusion in inference even though they were trained
or created independently from each other.`),hf.forEach(t),G.forEach(t),kd=f(s),xo=o(s,"P",{});var Cv=r(xo);Jf=i(Cv,`To that end, we strive to offer all open-sourced, state-of-the-art diffusion system under a unified API.
More specifically, we strive to provide pipelines that`),Cv.forEach(t),Pd=f(s),D=o(s,"UL",{});var at=r(D);Sn=o(at,"LI",{});var Lv=r(Sn);Gn=o(Lv,"OL",{});var Nv=r(Gn);C=o(Nv,"LI",{});var ot=r(C);Kf=i(ot,"can load the officially published weights and yield 1-to-1 the same outputs as the original implementation according to the corresponding paper ("),kn=o(ot,"EM",{});var jv=r(kn);Xf=i(jv,"e.g."),jv.forEach(t),eh=f(ot),Kt=o(ot,"A",{href:!0,rel:!0});var qv=r(Kt);th=i(qv,"LDMTextToImagePipeline"),qv.forEach(t),ah=i(ot,", uses the officially released weights of "),Xt=o(ot,"A",{href:!0,rel:!0});var Hv=r(Xt);oh=i(Hv,"High-Resolution Image Synthesis with Latent Diffusion Models"),Hv.forEach(t),rh=i(ot,"),"),ot.forEach(t),Nv.forEach(t),Lv.forEach(t),nh=f(at),Pn=o(at,"LI",{});var Bv=r(Pn);Ao=o(Bv,"OL",{start:!0});var Uv=r(Ao);ea=o(Uv,"LI",{});var cf=r(ea);lh=i(cf,"have a simple user interface to run the model in inference (see the "),So=o(cf,"A",{href:!0});var Vv=r(So);ih=i(Vv,"Pipelines API"),Vv.forEach(t),sh=i(cf," section),"),cf.forEach(t),Uv.forEach(t),Bv.forEach(t),dh=f(at),Rn=o(at,"LI",{});var zv=r(Rn);Go=o(zv,"OL",{start:!0});var Fv=r(Go);ta=o(Fv,"LI",{});var uf=r(ta);fh=i(uf,"are easy to understand with code that is self-explanatory and can be read along-side the official paper (see "),ko=o(uf,"A",{href:!0});var Yv=r(ko);hh=i(Yv,"Pipelines summary"),Yv.forEach(t),ch=i(uf,"),"),uf.forEach(t),Fv.forEach(t),zv.forEach(t),uh=f(at),On=o(at,"LI",{});var Qv=r(On);Po=o(Qv,"OL",{start:!0});var Wv=r(Po);aa=o(Wv,"LI",{});var pf=r(aa);ph=i(pf,"can easily be contributed by the community (see the "),Ro=o(pf,"A",{href:!0});var Zv=r(Ro);gh=i(Zv,"Contribution"),Zv.forEach(t),mh=i(pf," section)."),pf.forEach(t),Wv.forEach(t),Qv.forEach(t),at.forEach(t),Rd=f(s),L=o(s,"P",{});var _o=r(L);$n=o(_o,"STRONG",{});var Jv=r($n);_h=i(Jv,"Note"),Jv.forEach(t),vh=i(_o,` that pipelines do not (and should not) offer any training functionality.
If you are looking for `),Mn=o(_o,"EM",{});var Kv=r(Mn);Eh=i(Kv,"official"),Kv.forEach(t),bh=i(_o," training examples, please have a look at "),oa=o(_o,"A",{href:!0,rel:!0});var Xv=r(oa);Th=i(Xv,"examples"),Xv.forEach(t),yh=i(_o,"."),_o.forEach(t),Od=f(s),ke=o(s,"H2",{class:!0});var gf=r(ke);Ue=o(gf,"A",{id:!0,class:!0,href:!0});var e2=r(Ue);Cn=o(e2,"SPAN",{});var t2=r(Cn);P(ra.$$.fragment,t2),t2.forEach(t),e2.forEach(t),wh=f(gf),Ln=o(gf,"SPAN",{});var a2=r(Ln);Dh=i(a2,"\u{1F9E8} Diffusers Summary"),a2.forEach(t),gf.forEach(t),$d=f(s),Oo=o(s,"P",{});var o2=r(Oo);Ih=i(o2,`The following table summarizes all officially supported pipelines, their corresponding paper, and if
available a colab notebook to directly try them out.`),o2.forEach(t),Md=f(s),Ve=o(s,"TABLE",{});var mf=r(Ve);Nn=o(mf,"THEAD",{});var r2=r(Nn);N=o(r2,"TR",{});var rt=r(N);jn=o(rt,"TH",{});var n2=r(jn);xh=i(n2,"Pipeline"),n2.forEach(t),Ah=f(rt),qn=o(rt,"TH",{});var l2=r(qn);Sh=i(l2,"Paper"),l2.forEach(t),Gh=f(rt),$o=o(rt,"TH",{align:!0});var i2=r($o);kh=i(i2,"Tasks"),i2.forEach(t),Ph=f(rt),Mo=o(rt,"TH",{align:!0});var s2=r(Mo);Rh=i(s2,"Colab"),s2.forEach(t),rt.forEach(t),r2.forEach(t),Oh=f(mf),h=o(mf,"TBODY",{});var c=r(h);j=o(c,"TR",{});var nt=r(j);Hn=o(nt,"TD",{});var d2=r(Hn);Co=o(d2,"A",{href:!0});var f2=r(Co);$h=i(f2,"alt_diffusion"),f2.forEach(t),d2.forEach(t),Mh=f(nt),Bn=o(nt,"TD",{});var h2=r(Bn);na=o(h2,"A",{href:!0,rel:!0});var c2=r(na);Un=o(c2,"STRONG",{});var u2=r(Un);Ch=i(u2,"AltDiffusion"),u2.forEach(t),c2.forEach(t),h2.forEach(t),Lh=f(nt),Lo=o(nt,"TD",{align:!0});var p2=r(Lo);Nh=i(p2,"Image-to-Image Text-Guided Generation"),p2.forEach(t),jh=f(nt),No=o(nt,"TD",{align:!0});var g2=r(No);qh=i(g2,"-"),g2.forEach(t),nt.forEach(t),Hh=f(c),q=o(c,"TR",{});var lt=r(q);Vn=o(lt,"TD",{});var m2=r(Vn);jo=o(m2,"A",{href:!0});var _2=r(jo);Bh=i(_2,"audio_diffusion"),_2.forEach(t),m2.forEach(t),Uh=f(lt),zn=o(lt,"TD",{});var v2=r(zn);la=o(v2,"A",{href:!0,rel:!0});var E2=r(la);Fn=o(E2,"STRONG",{});var b2=r(Fn);Vh=i(b2,"Audio Diffusion"),b2.forEach(t),E2.forEach(t),v2.forEach(t),zh=f(lt),qo=o(lt,"TD",{align:!0});var T2=r(qo);Fh=i(T2,"Unconditional Audio Generation"),T2.forEach(t),Yh=f(lt),Yn=o(lt,"TD",{align:!0}),r(Yn).forEach(t),lt.forEach(t),Qh=f(c),H=o(c,"TR",{});var it=r(H);Qn=o(it,"TD",{});var y2=r(Qn);Ho=o(y2,"A",{href:!0});var w2=r(Ho);Wh=i(w2,"cycle_diffusion"),w2.forEach(t),y2.forEach(t),Zh=f(it),Wn=o(it,"TD",{});var D2=r(Wn);ia=o(D2,"A",{href:!0,rel:!0});var I2=r(ia);Zn=o(I2,"STRONG",{});var x2=r(Zn);Jh=i(x2,"Cycle Diffusion"),x2.forEach(t),I2.forEach(t),D2.forEach(t),Kh=f(it),Bo=o(it,"TD",{align:!0});var A2=r(Bo);Xh=i(A2,"Image-to-Image Text-Guided Generation"),A2.forEach(t),ec=f(it),Jn=o(it,"TD",{align:!0}),r(Jn).forEach(t),it.forEach(t),tc=f(c),B=o(c,"TR",{});var st=r(B);Kn=o(st,"TD",{});var S2=r(Kn);Uo=o(S2,"A",{href:!0});var G2=r(Uo);ac=i(G2,"dance_diffusion"),G2.forEach(t),S2.forEach(t),oc=f(st),Xn=o(st,"TD",{});var k2=r(Xn);sa=o(k2,"A",{href:!0,rel:!0});var P2=r(sa);el=o(P2,"STRONG",{});var R2=r(el);rc=i(R2,"Dance Diffusion"),R2.forEach(t),P2.forEach(t),k2.forEach(t),nc=f(st),Vo=o(st,"TD",{align:!0});var O2=r(Vo);lc=i(O2,"Unconditional Audio Generation"),O2.forEach(t),ic=f(st),tl=o(st,"TD",{align:!0}),r(tl).forEach(t),st.forEach(t),sc=f(c),U=o(c,"TR",{});var dt=r(U);al=o(dt,"TD",{});var $2=r(al);zo=o($2,"A",{href:!0});var M2=r(zo);dc=i(M2,"ddpm"),M2.forEach(t),$2.forEach(t),fc=f(dt),ol=o(dt,"TD",{});var C2=r(ol);da=o(C2,"A",{href:!0,rel:!0});var L2=r(da);rl=o(L2,"STRONG",{});var N2=r(rl);hc=i(N2,"Denoising Diffusion Probabilistic Models"),N2.forEach(t),L2.forEach(t),C2.forEach(t),cc=f(dt),Fo=o(dt,"TD",{align:!0});var j2=r(Fo);uc=i(j2,"Unconditional Image Generation"),j2.forEach(t),pc=f(dt),nl=o(dt,"TD",{align:!0}),r(nl).forEach(t),dt.forEach(t),gc=f(c),V=o(c,"TR",{});var ft=r(V);ll=o(ft,"TD",{});var q2=r(ll);Yo=o(q2,"A",{href:!0});var H2=r(Yo);mc=i(H2,"ddim"),H2.forEach(t),q2.forEach(t),_c=f(ft),il=o(ft,"TD",{});var B2=r(il);fa=o(B2,"A",{href:!0,rel:!0});var U2=r(fa);sl=o(U2,"STRONG",{});var V2=r(sl);vc=i(V2,"Denoising Diffusion Implicit Models"),V2.forEach(t),U2.forEach(t),B2.forEach(t),Ec=f(ft),Qo=o(ft,"TD",{align:!0});var z2=r(Qo);bc=i(z2,"Unconditional Image Generation"),z2.forEach(t),Tc=f(ft),dl=o(ft,"TD",{align:!0}),r(dl).forEach(t),ft.forEach(t),yc=f(c),z=o(c,"TR",{});var ht=r(z);fl=o(ht,"TD",{});var F2=r(fl);Wo=o(F2,"A",{href:!0});var Y2=r(Wo);wc=i(Y2,"latent_diffusion"),Y2.forEach(t),F2.forEach(t),Dc=f(ht),hl=o(ht,"TD",{});var Q2=r(hl);ha=o(Q2,"A",{href:!0,rel:!0});var W2=r(ha);cl=o(W2,"STRONG",{});var Z2=r(cl);Ic=i(Z2,"High-Resolution Image Synthesis with Latent Diffusion Models"),Z2.forEach(t),W2.forEach(t),Q2.forEach(t),xc=f(ht),Zo=o(ht,"TD",{align:!0});var J2=r(Zo);Ac=i(J2,"Text-to-Image Generation"),J2.forEach(t),Sc=f(ht),ul=o(ht,"TD",{align:!0}),r(ul).forEach(t),ht.forEach(t),Gc=f(c),F=o(c,"TR",{});var ct=r(F);pl=o(ct,"TD",{});var K2=r(pl);Jo=o(K2,"A",{href:!0});var X2=r(Jo);kc=i(X2,"latent_diffusion"),X2.forEach(t),K2.forEach(t),Pc=f(ct),gl=o(ct,"TD",{});var eE=r(gl);ca=o(eE,"A",{href:!0,rel:!0});var tE=r(ca);ml=o(tE,"STRONG",{});var aE=r(ml);Rc=i(aE,"High-Resolution Image Synthesis with Latent Diffusion Models"),aE.forEach(t),tE.forEach(t),eE.forEach(t),Oc=f(ct),Ko=o(ct,"TD",{align:!0});var oE=r(Ko);$c=i(oE,"Super Resolution Image-to-Image"),oE.forEach(t),Mc=f(ct),_l=o(ct,"TD",{align:!0}),r(_l).forEach(t),ct.forEach(t),Cc=f(c),Y=o(c,"TR",{});var ut=r(Y);vl=o(ut,"TD",{});var rE=r(vl);Xo=o(rE,"A",{href:!0});var nE=r(Xo);Lc=i(nE,"latent_diffusion_uncond"),nE.forEach(t),rE.forEach(t),Nc=f(ut),El=o(ut,"TD",{});var lE=r(El);ua=o(lE,"A",{href:!0,rel:!0});var iE=r(ua);bl=o(iE,"STRONG",{});var sE=r(bl);jc=i(sE,"High-Resolution Image Synthesis with Latent Diffusion Models"),sE.forEach(t),iE.forEach(t),lE.forEach(t),qc=f(ut),er=o(ut,"TD",{align:!0});var dE=r(er);Hc=i(dE,"Unconditional Image Generation"),dE.forEach(t),Bc=f(ut),Tl=o(ut,"TD",{align:!0}),r(Tl).forEach(t),ut.forEach(t),Uc=f(c),Q=o(c,"TR",{});var pt=r(Q);yl=o(pt,"TD",{});var fE=r(yl);tr=o(fE,"A",{href:!0});var hE=r(tr);Vc=i(hE,"paint_by_example"),hE.forEach(t),fE.forEach(t),zc=f(pt),wl=o(pt,"TD",{});var cE=r(wl);pa=o(cE,"A",{href:!0,rel:!0});var uE=r(pa);Dl=o(uE,"STRONG",{});var pE=r(Dl);Fc=i(pE,"Paint by Example: Exemplar-based Image Editing with Diffusion Models"),pE.forEach(t),uE.forEach(t),cE.forEach(t),Yc=f(pt),ar=o(pt,"TD",{align:!0});var gE=r(ar);Qc=i(gE,"Image-Guided Image Inpainting"),gE.forEach(t),Wc=f(pt),Il=o(pt,"TD",{align:!0}),r(Il).forEach(t),pt.forEach(t),Zc=f(c),W=o(c,"TR",{});var gt=r(W);xl=o(gt,"TD",{});var mE=r(xl);or=o(mE,"A",{href:!0});var _E=r(or);Jc=i(_E,"pndm"),_E.forEach(t),mE.forEach(t),Kc=f(gt),Al=o(gt,"TD",{});var vE=r(Al);ga=o(vE,"A",{href:!0,rel:!0});var EE=r(ga);Sl=o(EE,"STRONG",{});var bE=r(Sl);Xc=i(bE,"Pseudo Numerical Methods for Diffusion Models on Manifolds"),bE.forEach(t),EE.forEach(t),vE.forEach(t),eu=f(gt),rr=o(gt,"TD",{align:!0});var TE=r(rr);tu=i(TE,"Unconditional Image Generation"),TE.forEach(t),au=f(gt),Gl=o(gt,"TD",{align:!0}),r(Gl).forEach(t),gt.forEach(t),ou=f(c),Z=o(c,"TR",{});var mt=r(Z);kl=o(mt,"TD",{});var yE=r(kl);nr=o(yE,"A",{href:!0});var wE=r(nr);ru=i(wE,"score_sde_ve"),wE.forEach(t),yE.forEach(t),nu=f(mt),Pl=o(mt,"TD",{});var DE=r(Pl);ma=o(DE,"A",{href:!0,rel:!0});var IE=r(ma);Rl=o(IE,"STRONG",{});var xE=r(Rl);lu=i(xE,"Score-Based Generative Modeling through Stochastic Differential Equations"),xE.forEach(t),IE.forEach(t),DE.forEach(t),iu=f(mt),lr=o(mt,"TD",{align:!0});var AE=r(lr);su=i(AE,"Unconditional Image Generation"),AE.forEach(t),du=f(mt),Ol=o(mt,"TD",{align:!0}),r(Ol).forEach(t),mt.forEach(t),fu=f(c),J=o(c,"TR",{});var _t=r(J);$l=o(_t,"TD",{});var SE=r($l);ir=o(SE,"A",{href:!0});var GE=r(ir);hu=i(GE,"score_sde_vp"),GE.forEach(t),SE.forEach(t),cu=f(_t),Ml=o(_t,"TD",{});var kE=r(Ml);_a=o(kE,"A",{href:!0,rel:!0});var PE=r(_a);Cl=o(PE,"STRONG",{});var RE=r(Cl);uu=i(RE,"Score-Based Generative Modeling through Stochastic Differential Equations"),RE.forEach(t),PE.forEach(t),kE.forEach(t),pu=f(_t),sr=o(_t,"TD",{align:!0});var OE=r(sr);gu=i(OE,"Unconditional Image Generation"),OE.forEach(t),mu=f(_t),Ll=o(_t,"TD",{align:!0}),r(Ll).forEach(t),_t.forEach(t),_u=f(c),K=o(c,"TR",{});var vt=r(K);Nl=o(vt,"TD",{});var $E=r(Nl);dr=o($E,"A",{href:!0});var ME=r(dr);vu=i(ME,"semantic_stable_diffusion"),ME.forEach(t),$E.forEach(t),Eu=f(vt),jl=o(vt,"TD",{});var CE=r(jl);va=o(CE,"A",{href:!0,rel:!0});var LE=r(va);ql=o(LE,"STRONG",{});var NE=r(ql);bu=i(NE,"SEGA: Instructing Diffusion using Semantic Dimensions"),NE.forEach(t),LE.forEach(t),CE.forEach(t),Tu=f(vt),fr=o(vt,"TD",{align:!0});var jE=r(fr);yu=i(jE,"Text-to-Image Generation"),jE.forEach(t),wu=f(vt),Hl=o(vt,"TD",{align:!0}),r(Hl).forEach(t),vt.forEach(t),Du=f(c),X=o(c,"TR",{});var Et=r(X);Bl=o(Et,"TD",{});var qE=r(Bl);hr=o(qE,"A",{href:!0});var HE=r(hr);Iu=i(HE,"stable_diffusion_text2img"),HE.forEach(t),qE.forEach(t),xu=f(Et),Ul=o(Et,"TD",{});var BE=r(Ul);Ea=o(BE,"A",{href:!0,rel:!0});var UE=r(Ea);Vl=o(UE,"STRONG",{});var VE=r(Vl);Au=i(VE,"Stable Diffusion"),VE.forEach(t),UE.forEach(t),BE.forEach(t),Su=f(Et),cr=o(Et,"TD",{align:!0});var zE=r(cr);Gu=i(zE,"Text-to-Image Generation"),zE.forEach(t),ku=f(Et),ur=o(Et,"TD",{align:!0});var FE=r(ur);ba=o(FE,"A",{href:!0,rel:!0});var YE=r(ba);pr=o(YE,"IMG",{src:!0,alt:!0}),YE.forEach(t),FE.forEach(t),Et.forEach(t),Pu=f(c),ee=o(c,"TR",{});var bt=r(ee);zl=o(bt,"TD",{});var QE=r(zl);gr=o(QE,"A",{href:!0});var WE=r(gr);Ru=i(WE,"stable_diffusion_img2img"),WE.forEach(t),QE.forEach(t),Ou=f(bt),Fl=o(bt,"TD",{});var ZE=r(Fl);Ta=o(ZE,"A",{href:!0,rel:!0});var JE=r(Ta);Yl=o(JE,"STRONG",{});var KE=r(Yl);$u=i(KE,"Stable Diffusion"),KE.forEach(t),JE.forEach(t),ZE.forEach(t),Mu=f(bt),mr=o(bt,"TD",{align:!0});var XE=r(mr);Cu=i(XE,"Image-to-Image Text-Guided Generation"),XE.forEach(t),Lu=f(bt),_r=o(bt,"TD",{align:!0});var eb=r(_r);ya=o(eb,"A",{href:!0,rel:!0});var tb=r(ya);vr=o(tb,"IMG",{src:!0,alt:!0}),tb.forEach(t),eb.forEach(t),bt.forEach(t),Nu=f(c),te=o(c,"TR",{});var Tt=r(te);Ql=o(Tt,"TD",{});var ab=r(Ql);Er=o(ab,"A",{href:!0});var ob=r(Er);ju=i(ob,"stable_diffusion_inpaint"),ob.forEach(t),ab.forEach(t),qu=f(Tt),Wl=o(Tt,"TD",{});var rb=r(Wl);wa=o(rb,"A",{href:!0,rel:!0});var nb=r(wa);Zl=o(nb,"STRONG",{});var lb=r(Zl);Hu=i(lb,"Stable Diffusion"),lb.forEach(t),nb.forEach(t),rb.forEach(t),Bu=f(Tt),br=o(Tt,"TD",{align:!0});var ib=r(br);Uu=i(ib,"Text-Guided Image Inpainting"),ib.forEach(t),Vu=f(Tt),Tr=o(Tt,"TD",{align:!0});var sb=r(Tr);Da=o(sb,"A",{href:!0,rel:!0});var db=r(Da);yr=o(db,"IMG",{src:!0,alt:!0}),db.forEach(t),sb.forEach(t),Tt.forEach(t),zu=f(c),ae=o(c,"TR",{});var yt=r(ae);Jl=o(yt,"TD",{});var fb=r(Jl);wr=o(fb,"A",{href:!0});var hb=r(wr);Fu=i(hb,"stable_diffusion_panorama"),hb.forEach(t),fb.forEach(t),Yu=f(yt),Kl=o(yt,"TD",{});var cb=r(Kl);Ia=o(cb,"A",{href:!0,rel:!0});var ub=r(Ia);Xl=o(ub,"STRONG",{});var pb=r(Xl);Qu=i(pb,"MultiDiffusion: Fusing Diffusion Paths for Controlled Image Generation"),pb.forEach(t),ub.forEach(t),cb.forEach(t),Wu=f(yt),Dr=o(yt,"TD",{align:!0});var gb=r(Dr);Zu=i(gb,"Text-Guided Panorama View Generation"),gb.forEach(t),Ju=f(yt),ei=o(yt,"TD",{align:!0}),r(ei).forEach(t),yt.forEach(t),Ku=f(c),oe=o(c,"TR",{});var wt=r(oe);ti=o(wt,"TD",{});var mb=r(ti);Ir=o(mb,"A",{href:!0});var _b=r(Ir);Xu=i(_b,"stable_diffusion_pix2pix"),_b.forEach(t),mb.forEach(t),ep=f(wt),ai=o(wt,"TD",{});var vb=r(ai);xa=o(vb,"A",{href:!0,rel:!0});var Eb=r(xa);oi=o(Eb,"STRONG",{});var bb=r(oi);tp=i(bb,"InstructPix2Pix: Learning to Follow Image Editing Instructions"),bb.forEach(t),Eb.forEach(t),vb.forEach(t),ap=f(wt),xr=o(wt,"TD",{align:!0});var Tb=r(xr);op=i(Tb,"Text-Based Image Editing"),Tb.forEach(t),rp=f(wt),ri=o(wt,"TD",{align:!0}),r(ri).forEach(t),wt.forEach(t),np=f(c),re=o(c,"TR",{});var Dt=r(re);ni=o(Dt,"TD",{});var yb=r(ni);Ar=o(yb,"A",{href:!0});var wb=r(Ar);lp=i(wb,"stable_diffusion_pix2pix_zero"),wb.forEach(t),yb.forEach(t),ip=f(Dt),li=o(Dt,"TD",{});var Db=r(li);Aa=o(Db,"A",{href:!0,rel:!0});var Ib=r(Aa);ii=o(Ib,"STRONG",{});var xb=r(ii);sp=i(xb,"Zero-shot Image-to-Image Translation"),xb.forEach(t),Ib.forEach(t),Db.forEach(t),dp=f(Dt),Sr=o(Dt,"TD",{align:!0});var Ab=r(Sr);fp=i(Ab,"Text-Based Image Editing"),Ab.forEach(t),hp=f(Dt),si=o(Dt,"TD",{align:!0}),r(si).forEach(t),Dt.forEach(t),cp=f(c),ne=o(c,"TR",{});var It=r(ne);di=o(It,"TD",{});var Sb=r(di);Gr=o(Sb,"A",{href:!0});var Gb=r(Gr);up=i(Gb,"stable_diffusion_attend_and_excite"),Gb.forEach(t),Sb.forEach(t),pp=f(It),fi=o(It,"TD",{});var kb=r(fi);Sa=o(kb,"A",{href:!0,rel:!0});var Pb=r(Sa);hi=o(Pb,"STRONG",{});var Rb=r(hi);gp=i(Rb,"Attend and Excite: Attention-Based Semantic Guidance for Text-to-Image Diffusion Models"),Rb.forEach(t),Pb.forEach(t),kb.forEach(t),mp=f(It),kr=o(It,"TD",{align:!0});var Ob=r(kr);_p=i(Ob,"Text-to-Image Generation"),Ob.forEach(t),vp=f(It),ci=o(It,"TD",{align:!0}),r(ci).forEach(t),It.forEach(t),Ep=f(c),le=o(c,"TR",{});var xt=r(le);ui=o(xt,"TD",{});var $b=r(ui);Pr=o($b,"A",{href:!0});var Mb=r(Pr);bp=i(Mb,"stable_diffusion_self_attention_guidance"),Mb.forEach(t),$b.forEach(t),Tp=f(xt),pi=o(xt,"TD",{});var Cb=r(pi);Ga=o(Cb,"A",{href:!0,rel:!0});var Lb=r(Ga);gi=o(Lb,"STRONG",{});var Nb=r(gi);yp=i(Nb,"Self-Attention Guidance"),Nb.forEach(t),Lb.forEach(t),Cb.forEach(t),wp=f(xt),Rr=o(xt,"TD",{align:!0});var jb=r(Rr);Dp=i(jb,"Text-to-Image Generation"),jb.forEach(t),Ip=f(xt),mi=o(xt,"TD",{align:!0}),r(mi).forEach(t),xt.forEach(t),xp=f(c),ie=o(c,"TR",{});var At=r(ie);_i=o(At,"TD",{});var qb=r(_i);Or=o(qb,"A",{href:!0});var Hb=r(Or);Ap=i(Hb,"stable_diffusion_image_variation"),Hb.forEach(t),qb.forEach(t),Sp=f(At),vi=o(At,"TD",{});var Bb=r(vi);ka=o(Bb,"A",{href:!0,rel:!0});var Ub=r(ka);Ei=o(Ub,"STRONG",{});var Vb=r(Ei);Gp=i(Vb,"Stable Diffusion Image Variations"),Vb.forEach(t),Ub.forEach(t),Bb.forEach(t),kp=f(At),$r=o(At,"TD",{align:!0});var zb=r($r);Pp=i(zb,"Image-to-Image Generation"),zb.forEach(t),Rp=f(At),bi=o(At,"TD",{align:!0}),r(bi).forEach(t),At.forEach(t),Op=f(c),se=o(c,"TR",{});var St=r(se);Ti=o(St,"TD",{});var Fb=r(Ti);Mr=o(Fb,"A",{href:!0});var Yb=r(Mr);$p=i(Yb,"stable_diffusion_latent_upscale"),Yb.forEach(t),Fb.forEach(t),Mp=f(St),yi=o(St,"TD",{});var Qb=r(yi);Pa=o(Qb,"A",{href:!0,rel:!0});var Wb=r(Pa);wi=o(Wb,"STRONG",{});var Zb=r(wi);Cp=i(Zb,"Stable Diffusion Latent Upscaler"),Zb.forEach(t),Wb.forEach(t),Qb.forEach(t),Lp=f(St),Cr=o(St,"TD",{align:!0});var Jb=r(Cr);Np=i(Jb,"Text-Guided Super Resolution Image-to-Image"),Jb.forEach(t),jp=f(St),Di=o(St,"TD",{align:!0}),r(Di).forEach(t),St.forEach(t),qp=f(c),de=o(c,"TR",{});var Gt=r(de);Ii=o(Gt,"TD",{});var Kb=r(Ii);Lr=o(Kb,"A",{href:!0});var Xb=r(Lr);Hp=i(Xb,"stable_diffusion_2"),Xb.forEach(t),Kb.forEach(t),Bp=f(Gt),xi=o(Gt,"TD",{});var e3=r(xi);Ra=o(e3,"A",{href:!0,rel:!0});var t3=r(Ra);Ai=o(t3,"STRONG",{});var a3=r(Ai);Up=i(a3,"Stable Diffusion 2"),a3.forEach(t),t3.forEach(t),e3.forEach(t),Vp=f(Gt),Nr=o(Gt,"TD",{align:!0});var o3=r(Nr);zp=i(o3,"Text-to-Image Generation"),o3.forEach(t),Fp=f(Gt),Si=o(Gt,"TD",{align:!0}),r(Si).forEach(t),Gt.forEach(t),Yp=f(c),fe=o(c,"TR",{});var kt=r(fe);Gi=o(kt,"TD",{});var r3=r(Gi);jr=o(r3,"A",{href:!0});var n3=r(jr);Qp=i(n3,"stable_diffusion_2"),n3.forEach(t),r3.forEach(t),Wp=f(kt),ki=o(kt,"TD",{});var l3=r(ki);Oa=o(l3,"A",{href:!0,rel:!0});var i3=r(Oa);Pi=o(i3,"STRONG",{});var s3=r(Pi);Zp=i(s3,"Stable Diffusion 2"),s3.forEach(t),i3.forEach(t),l3.forEach(t),Jp=f(kt),qr=o(kt,"TD",{align:!0});var d3=r(qr);Kp=i(d3,"Text-Guided Image Inpainting"),d3.forEach(t),Xp=f(kt),Ri=o(kt,"TD",{align:!0}),r(Ri).forEach(t),kt.forEach(t),eg=f(c),he=o(c,"TR",{});var Pt=r(he);Oi=o(Pt,"TD",{});var f3=r(Oi);Hr=o(f3,"A",{href:!0});var h3=r(Hr);tg=i(h3,"stable_diffusion_2"),h3.forEach(t),f3.forEach(t),ag=f(Pt),$i=o(Pt,"TD",{});var c3=r($i);$a=o(c3,"A",{href:!0,rel:!0});var u3=r($a);Mi=o(u3,"STRONG",{});var p3=r(Mi);og=i(p3,"Stable Diffusion 2"),p3.forEach(t),u3.forEach(t),c3.forEach(t),rg=f(Pt),Br=o(Pt,"TD",{align:!0});var g3=r(Br);ng=i(g3,"Depth-to-Image Text-Guided Generation"),g3.forEach(t),lg=f(Pt),Ci=o(Pt,"TD",{align:!0}),r(Ci).forEach(t),Pt.forEach(t),ig=f(c),ce=o(c,"TR",{});var Rt=r(ce);Li=o(Rt,"TD",{});var m3=r(Li);Ur=o(m3,"A",{href:!0});var _3=r(Ur);sg=i(_3,"stable_diffusion_2"),_3.forEach(t),m3.forEach(t),dg=f(Rt),Ni=o(Rt,"TD",{});var v3=r(Ni);Ma=o(v3,"A",{href:!0,rel:!0});var E3=r(Ma);ji=o(E3,"STRONG",{});var b3=r(ji);fg=i(b3,"Stable Diffusion 2"),b3.forEach(t),E3.forEach(t),v3.forEach(t),hg=f(Rt),Vr=o(Rt,"TD",{align:!0});var T3=r(Vr);cg=i(T3,"Text-Guided Super Resolution Image-to-Image"),T3.forEach(t),ug=f(Rt),qi=o(Rt,"TD",{align:!0}),r(qi).forEach(t),Rt.forEach(t),pg=f(c),ue=o(c,"TR",{});var Ot=r(ue);Hi=o(Ot,"TD",{});var y3=r(Hi);zr=o(y3,"A",{href:!0});var w3=r(zr);gg=i(w3,"stable_diffusion_safe"),w3.forEach(t),y3.forEach(t),mg=f(Ot),Bi=o(Ot,"TD",{});var D3=r(Bi);Ca=o(D3,"A",{href:!0,rel:!0});var I3=r(Ca);Ui=o(I3,"STRONG",{});var x3=r(Ui);_g=i(x3,"Safe Stable Diffusion"),x3.forEach(t),I3.forEach(t),D3.forEach(t),vg=f(Ot),Fr=o(Ot,"TD",{align:!0});var A3=r(Fr);Eg=i(A3,"Text-Guided Generation"),A3.forEach(t),bg=f(Ot),Yr=o(Ot,"TD",{align:!0});var S3=r(Yr);La=o(S3,"A",{href:!0,rel:!0});var G3=r(La);Qr=o(G3,"IMG",{src:!0,alt:!0}),G3.forEach(t),S3.forEach(t),Ot.forEach(t),Tg=f(c),pe=o(c,"TR",{});var $t=r(pe);Vi=o($t,"TD",{});var k3=r(Vi);Wr=o(k3,"A",{href:!0});var P3=r(Wr);yg=i(P3,"stable_unclip"),P3.forEach(t),k3.forEach(t),wg=f($t),zi=o($t,"TD",{});var R3=r(zi);Fi=o(R3,"STRONG",{});var O3=r(Fi);Dg=i(O3,"Stable unCLIP"),O3.forEach(t),R3.forEach(t),Ig=f($t),Zr=o($t,"TD",{align:!0});var $3=r(Zr);xg=i($3,"Text-to-Image Generation"),$3.forEach(t),Ag=f($t),Yi=o($t,"TD",{align:!0}),r(Yi).forEach(t),$t.forEach(t),Sg=f(c),ge=o(c,"TR",{});var Mt=r(ge);Qi=o(Mt,"TD",{});var M3=r(Qi);Jr=o(M3,"A",{href:!0});var C3=r(Jr);Gg=i(C3,"stable_unclip"),C3.forEach(t),M3.forEach(t),kg=f(Mt),Wi=o(Mt,"TD",{});var L3=r(Wi);Zi=o(L3,"STRONG",{});var N3=r(Zi);Pg=i(N3,"Stable unCLIP"),N3.forEach(t),L3.forEach(t),Rg=f(Mt),Kr=o(Mt,"TD",{align:!0});var j3=r(Kr);Og=i(j3,"Image-to-Image Text-Guided Generation"),j3.forEach(t),$g=f(Mt),Ji=o(Mt,"TD",{align:!0}),r(Ji).forEach(t),Mt.forEach(t),Mg=f(c),me=o(c,"TR",{});var Ct=r(me);Ki=o(Ct,"TD",{});var q3=r(Ki);Xr=o(q3,"A",{href:!0});var H3=r(Xr);Cg=i(H3,"stochastic_karras_ve"),H3.forEach(t),q3.forEach(t),Lg=f(Ct),Xi=o(Ct,"TD",{});var B3=r(Xi);Na=o(B3,"A",{href:!0,rel:!0});var U3=r(Na);es=o(U3,"STRONG",{});var V3=r(es);Ng=i(V3,"Elucidating the Design Space of Diffusion-Based Generative Models"),V3.forEach(t),U3.forEach(t),B3.forEach(t),jg=f(Ct),en=o(Ct,"TD",{align:!0});var z3=r(en);qg=i(z3,"Unconditional Image Generation"),z3.forEach(t),Hg=f(Ct),ts=o(Ct,"TD",{align:!0}),r(ts).forEach(t),Ct.forEach(t),Bg=f(c),_e=o(c,"TR",{});var Lt=r(_e);as=o(Lt,"TD",{});var F3=r(as);tn=o(F3,"A",{href:!0});var Y3=r(tn);Ug=i(Y3,"unclip"),Y3.forEach(t),F3.forEach(t),Vg=f(Lt),os=o(Lt,"TD",{});var Q3=r(os);ja=o(Q3,"A",{href:!0,rel:!0});var W3=r(ja);zg=i(W3,"Hierarchical Text-Conditional Image Generation with CLIP Latents"),W3.forEach(t),Q3.forEach(t),Fg=f(Lt),an=o(Lt,"TD",{align:!0});var Z3=r(an);Yg=i(Z3,"Text-to-Image Generation"),Z3.forEach(t),Qg=f(Lt),rs=o(Lt,"TD",{align:!0}),r(rs).forEach(t),Lt.forEach(t),Wg=f(c),ve=o(c,"TR",{});var Nt=r(ve);ns=o(Nt,"TD",{});var J3=r(ns);on=o(J3,"A",{href:!0});var K3=r(on);Zg=i(K3,"versatile_diffusion"),K3.forEach(t),J3.forEach(t),Jg=f(Nt),ls=o(Nt,"TD",{});var X3=r(ls);qa=o(X3,"A",{href:!0,rel:!0});var e4=r(qa);Kg=i(e4,"Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),e4.forEach(t),X3.forEach(t),Xg=f(Nt),rn=o(Nt,"TD",{align:!0});var t4=r(rn);em=i(t4,"Text-to-Image Generation"),t4.forEach(t),tm=f(Nt),is=o(Nt,"TD",{align:!0}),r(is).forEach(t),Nt.forEach(t),am=f(c),Ee=o(c,"TR",{});var jt=r(Ee);ss=o(jt,"TD",{});var a4=r(ss);nn=o(a4,"A",{href:!0});var o4=r(nn);om=i(o4,"versatile_diffusion"),o4.forEach(t),a4.forEach(t),rm=f(jt),ds=o(jt,"TD",{});var r4=r(ds);Ha=o(r4,"A",{href:!0,rel:!0});var n4=r(Ha);nm=i(n4,"Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),n4.forEach(t),r4.forEach(t),lm=f(jt),ln=o(jt,"TD",{align:!0});var l4=r(ln);im=i(l4,"Image Variations Generation"),l4.forEach(t),sm=f(jt),fs=o(jt,"TD",{align:!0}),r(fs).forEach(t),jt.forEach(t),dm=f(c),be=o(c,"TR",{});var qt=r(be);hs=o(qt,"TD",{});var i4=r(hs);sn=o(i4,"A",{href:!0});var s4=r(sn);fm=i(s4,"versatile_diffusion"),s4.forEach(t),i4.forEach(t),hm=f(qt),cs=o(qt,"TD",{});var d4=r(cs);Ba=o(d4,"A",{href:!0,rel:!0});var f4=r(Ba);cm=i(f4,"Versatile Diffusion: Text, Images and Variations All in One Diffusion Model"),f4.forEach(t),d4.forEach(t),um=f(qt),dn=o(qt,"TD",{align:!0});var h4=r(dn);pm=i(h4,"Dual Image and Text Guided Generation"),h4.forEach(t),gm=f(qt),us=o(qt,"TD",{align:!0}),r(us).forEach(t),qt.forEach(t),mm=f(c),Te=o(c,"TR",{});var Ht=r(Te);ps=o(Ht,"TD",{});var c4=r(ps);fn=o(c4,"A",{href:!0});var u4=r(fn);_m=i(u4,"vq_diffusion"),u4.forEach(t),c4.forEach(t),vm=f(Ht),gs=o(Ht,"TD",{});var p4=r(gs);Ua=o(p4,"A",{href:!0,rel:!0});var g4=r(Ua);Em=i(g4,"Vector Quantized Diffusion Model for Text-to-Image Synthesis"),g4.forEach(t),p4.forEach(t),bm=f(Ht),hn=o(Ht,"TD",{align:!0});var m4=r(hn);Tm=i(m4,"Text-to-Image Generation"),m4.forEach(t),ym=f(Ht),ms=o(Ht,"TD",{align:!0}),r(ms).forEach(t),Ht.forEach(t),c.forEach(t),mf.forEach(t),Cd=f(s),Va=o(s,"P",{});var sv=r(Va);_s=o(sv,"STRONG",{});var _4=r(_s);wm=i(_4,"Note"),_4.forEach(t),Dm=i(sv,": Pipelines are simple examples of how to play around with the diffusion systems as described in the corresponding papers."),sv.forEach(t),Ld=f(s),ze=o(s,"P",{});var _f=r(ze);Im=i(_f,"However, most of them can be adapted to use different scheduler components or even different model components. Some pipeline examples are shown in the "),cn=o(_f,"A",{href:!0});var v4=r(cn);xm=i(v4,"Examples"),v4.forEach(t),Am=i(_f," below."),_f.forEach(t),Nd=f(s),Pe=o(s,"H2",{class:!0});var vf=r(Pe);Fe=o(vf,"A",{id:!0,class:!0,href:!0});var E4=r(Fe);vs=o(E4,"SPAN",{});var b4=r(vs);P(za.$$.fragment,b4),b4.forEach(t),E4.forEach(t),Sm=f(vf),Es=o(vf,"SPAN",{});var T4=r(Es);Gm=i(T4,"Pipelines API"),T4.forEach(t),vf.forEach(t),jd=f(s),un=o(s,"P",{});var y4=r(un);km=i(y4,"Diffusion models often consist of multiple independently-trained models or other previously existing components."),y4.forEach(t),qd=f(s),we=o(s,"P",{});var Tn=r(we);Pm=i(Tn,`Each model has been trained independently on a different task and the scheduler can easily be swapped out and replaced with a different one.
During inference, we however want to be able to easily load all components and use them in inference - even if one component, `),bs=o(Tn,"EM",{});var w4=r(bs);Rm=i(w4,"e.g."),w4.forEach(t),Om=i(Tn," CLIP\u2019s text encoder, originates from a different library, such as "),Fa=o(Tn,"A",{href:!0,rel:!0});var D4=r(Fa);$m=i(D4,"Transformers"),D4.forEach(t),Mm=i(Tn,". To that end, all pipelines provide the following functionality:"),Tn.forEach(t),Hd=f(s),I=o(s,"UL",{});var Bt=r(I);g=o(Bt,"LI",{});var m=r(g);Ya=o(m,"A",{href:!0});var dv=r(Ya);Ts=o(dv,"CODE",{});var I4=r(Ts);Cm=i(I4,"from_pretrained"),I4.forEach(t),Lm=i(dv," method"),dv.forEach(t),Nm=i(m," that accepts a Hugging Face Hub repository id, "),ys=o(m,"EM",{});var x4=r(ys);jm=i(x4,"e.g."),x4.forEach(t),qm=f(m),Qa=o(m,"A",{href:!0,rel:!0});var A4=r(Qa);Hm=i(A4,"runwayml/stable-diffusion-v1-5"),A4.forEach(t),Bm=i(m," or a path to a local directory, "),ws=o(m,"EM",{});var S4=r(ws);Um=i(S4,"e.g."),S4.forEach(t),Vm=i(m,`
\u201D./stable-diffusion\u201D. To correctly retrieve which models and components should be loaded, one has to provide a `),Ds=o(m,"CODE",{});var G4=r(Ds);zm=i(G4,"model_index.json"),G4.forEach(t),Fm=i(m," file, "),Is=o(m,"EM",{});var k4=r(Is);Ym=i(k4,"e.g."),k4.forEach(t),Qm=f(m),Wa=o(m,"A",{href:!0,rel:!0});var P4=r(Wa);Wm=i(P4,"runwayml/stable-diffusion-v1-5/model_index.json"),P4.forEach(t),Zm=i(m,`, which defines all components that should be
loaded into the pipelines. More specifically, for each model/component one needs to define the format `),xs=o(m,"CODE",{});var R4=r(xs);Jm=i(R4,'<name>: ["<library>", "<class name>"]'),R4.forEach(t),Km=i(m,". "),As=o(m,"CODE",{});var O4=r(As);Xm=i(O4,"<name>"),O4.forEach(t),e_=i(m," is the attribute name given to the loaded instance of "),Ss=o(m,"CODE",{});var $4=r(Ss);t_=i($4,"<class name>"),$4.forEach(t),a_=i(m," which can be found in the library or pipeline folder called "),Gs=o(m,"CODE",{});var M4=r(Gs);o_=i(M4,'"<library>"'),M4.forEach(t),r_=i(m,"."),m.forEach(t),n_=f(Bt),_=o(Bt,"LI",{});var v=r(_);pn=o(v,"A",{href:!0});var C4=r(pn);ks=o(C4,"CODE",{});var L4=r(ks);l_=i(L4,"save_pretrained"),L4.forEach(t),C4.forEach(t),i_=i(v," that accepts a local path, "),Ps=o(v,"EM",{});var N4=r(Ps);s_=i(N4,"e.g."),N4.forEach(t),d_=f(v),Rs=o(v,"CODE",{});var j4=r(Rs);f_=i(j4,"./stable-diffusion"),j4.forEach(t),h_=i(v," under which all models/components of the pipeline will be saved. For each component/model a folder is created inside the local path that is named after the given attribute name, "),Os=o(v,"EM",{});var q4=r(Os);c_=i(q4,"e.g."),q4.forEach(t),u_=f(v),$s=o(v,"CODE",{});var H4=r($s);p_=i(H4,"./stable_diffusion/unet"),H4.forEach(t),g_=i(v,`.
In addition, a `),Ms=o(v,"CODE",{});var B4=r(Ms);m_=i(B4,"model_index.json"),B4.forEach(t),__=i(v," file is created at the root of the local path, "),Cs=o(v,"EM",{});var U4=r(Cs);v_=i(U4,"e.g."),U4.forEach(t),E_=f(v),Ls=o(v,"CODE",{});var V4=r(Ls);b_=i(V4,"./stable_diffusion/model_index.json"),V4.forEach(t),T_=i(v,` so that the complete pipeline can again be instantiated
from the local path.`),v.forEach(t),y_=f(Bt),T=o(Bt,"LI",{});var ye=r(T);gn=o(ye,"A",{href:!0});var z4=r(gn);Ns=o(z4,"CODE",{});var F4=r(Ns);w_=i(F4,"to"),F4.forEach(t),z4.forEach(t),D_=i(ye," which accepts a "),js=o(ye,"CODE",{});var Y4=r(js);I_=i(Y4,"string"),Y4.forEach(t),x_=i(ye," or "),qs=o(ye,"CODE",{});var Q4=r(qs);A_=i(Q4,"torch.device"),Q4.forEach(t),S_=i(ye," to move all models that are of type "),Hs=o(ye,"CODE",{});var W4=r(Hs);G_=i(W4,"torch.nn.Module"),W4.forEach(t),k_=i(ye," to the passed device. The behavior is fully analogous to "),Re=o(ye,"A",{href:!0,rel:!0});var Ef=r(Re);P_=i(Ef,"PyTorch\u2019s "),Bs=o(Ef,"CODE",{});var Z4=r(Bs);R_=i(Z4,"to"),Z4.forEach(t),O_=i(Ef," method"),Ef.forEach(t),$_=i(ye,"."),ye.forEach(t),M_=f(Bt),b=o(Bt,"LI",{});var w=r(b);Us=o(w,"CODE",{});var J4=r(Us);C_=i(J4,"__call__"),J4.forEach(t),L_=i(w," method to use the pipeline in inference. "),Vs=o(w,"CODE",{});var K4=r(Vs);N_=i(K4,"__call__"),K4.forEach(t),j_=i(w," defines inference logic of the pipeline and should ideally encompass all aspects of it, from pre-processing to forwarding tensors to the different models and schedulers, as well as post-processing. The API of the "),zs=o(w,"CODE",{});var X4=r(zs);q_=i(X4,"__call__"),X4.forEach(t),H_=i(w," method can strongly vary from pipeline to pipeline. "),Fs=o(w,"EM",{});var eT=r(Fs);B_=i(eT,"E.g."),eT.forEach(t),U_=i(w," a text-to-image pipeline, such as "),mn=o(w,"A",{href:!0});var tT=r(mn);Ys=o(tT,"CODE",{});var aT=r(Ys);V_=i(aT,"StableDiffusionPipeline"),aT.forEach(t),tT.forEach(t),z_=i(w," should accept among other things the text prompt to generate the image. A pure image generation pipeline, such as "),Za=o(w,"A",{href:!0,rel:!0});var oT=r(Za);F_=i(oT,"DDPMPipeline"),oT.forEach(t),Y_=i(w,` on the other hand can be run without providing any inputs. To better understand what inputs can be adapted for
each pipeline, one should look directly into the respective pipeline.`),w.forEach(t),Bt.forEach(t),Bd=f(s),x=o(s,"P",{});var Ut=r(x);Qs=o(Ut,"STRONG",{});var rT=r(Qs);Q_=i(rT,"Note"),rT.forEach(t),W_=i(Ut,": All pipelines have PyTorch\u2019s autograd disabled by decorating the "),Ws=o(Ut,"CODE",{});var nT=r(Ws);Z_=i(nT,"__call__"),nT.forEach(t),J_=i(Ut," method with a "),Ja=o(Ut,"A",{href:!0,rel:!0});var lT=r(Ja);Zs=o(lT,"CODE",{});var iT=r(Zs);K_=i(iT,"torch.no_grad"),iT.forEach(t),lT.forEach(t),X_=i(Ut,` decorator because pipelines should
not be used for training. If you want to store the gradients during the forward pass, we recommend writing your own pipeline, see also our `),Ka=o(Ut,"A",{href:!0,rel:!0});var sT=r(Ka);e1=i(sT,"community-examples"),sT.forEach(t),Ut.forEach(t),Ud=f(s),Oe=o(s,"H2",{class:!0});var bf=r(Oe);Ye=o(bf,"A",{id:!0,class:!0,href:!0});var dT=r(Ye);Js=o(dT,"SPAN",{});var fT=r(Js);P(Xa.$$.fragment,fT),fT.forEach(t),dT.forEach(t),t1=f(bf),Ks=o(bf,"SPAN",{});var hT=r(Ks);a1=i(hT,"Contribution"),hT.forEach(t),bf.forEach(t),Vd=f(s),y=o(s,"P",{});var Ae=r(y);o1=i(Ae,`We are more than happy about any contribution to the officially supported pipelines \u{1F917}. We aspire
all of our pipelines to be  `),Xs=o(Ae,"STRONG",{});var cT=r(Xs);r1=i(cT,"self-contained"),cT.forEach(t),n1=i(Ae,", "),ed=o(Ae,"STRONG",{});var uT=r(ed);l1=i(uT,"easy-to-tweak"),uT.forEach(t),i1=i(Ae,", "),td=o(Ae,"STRONG",{});var pT=r(td);s1=i(pT,"beginner-friendly"),pT.forEach(t),d1=i(Ae," and for "),ad=o(Ae,"STRONG",{});var gT=r(ad);f1=i(gT,"one-purpose-only"),gT.forEach(t),h1=i(Ae,"."),Ae.forEach(t),zd=f(s),A=o(s,"UL",{});var Vt=r(A);Qe=o(Vt,"LI",{});var Id=r(Qe);od=o(Id,"STRONG",{});var mT=r(od);c1=i(mT,"Self-contained"),mT.forEach(t),u1=i(Id,": A pipeline shall be as self-contained as possible. More specifically, this means that all functionality should be either directly defined in the pipeline file itself, should be inherited from (and only from) the "),eo=o(Id,"A",{href:!0});var fv=r(eo);rd=o(fv,"CODE",{});var _T=r(rd);p1=i(_T,"DiffusionPipeline"),_T.forEach(t),g1=i(fv," class"),fv.forEach(t),m1=i(Id," or be directly attached to the model and scheduler components of the pipeline."),Id.forEach(t),_1=f(Vt),De=o(Vt,"LI",{});var vo=r(De);nd=o(vo,"STRONG",{});var vT=r(nd);v1=i(vT,"Easy-to-use"),vT.forEach(t),E1=i(vo,`: Pipelines should be extremely easy to use - one should be able to load the pipeline and
use it for its designated task, `),ld=o(vo,"EM",{});var ET=r(ld);b1=i(ET,"e.g."),ET.forEach(t),T1=i(vo,` text-to-image generation, in just a couple of lines of code. Most
logic including pre-processing, an unrolled diffusion loop, and post-processing should all happen inside the `),id=o(vo,"CODE",{});var bT=r(id);y1=i(bT,"__call__"),bT.forEach(t),w1=i(vo," method."),vo.forEach(t),D1=f(Vt),Ie=o(Vt,"LI",{});var Eo=r(Ie);sd=o(Eo,"STRONG",{});var TT=r(sd);I1=i(TT,"Easy-to-tweak"),TT.forEach(t),x1=i(Eo,": Certain pipelines will not be able to handle all use cases and tasks that you might like them to. If you want to use a certain pipeline for a specific use case that is not yet supported, you might have to copy the pipeline file and tweak the code to your needs. We try to make the pipeline code as readable as possible so that each part \u2013from pre-processing to diffusing to post-processing\u2013 can easily be adapted. If you would like the community to benefit from your customized pipeline, we would love to see a contribution to our "),to=o(Eo,"A",{href:!0,rel:!0});var yT=r(to);A1=i(yT,"community-examples"),yT.forEach(t),S1=i(Eo,". If you feel that an important pipeline should be part of the official pipelines but isn\u2019t, a contribution to the "),_n=o(Eo,"A",{href:!0});var wT=r(_n);G1=i(wT,"official pipelines"),wT.forEach(t),k1=i(Eo," would be even better."),Eo.forEach(t),P1=f(Vt),S=o(Vt,"LI",{});var je=r(S);dd=o(je,"STRONG",{});var DT=r(dd);R1=i(DT,"One-purpose-only"),DT.forEach(t),O1=i(je,": Pipelines should be used for one task and one task only. Even if two tasks are very similar from a modeling point of view, "),fd=o(je,"EM",{});var IT=r(fd);$1=i(IT,"e.g."),IT.forEach(t),M1=i(je," image2image translation and in-painting, pipelines shall be used for one task only to keep them "),hd=o(je,"EM",{});var xT=r(hd);C1=i(xT,"easy-to-tweak"),xT.forEach(t),L1=i(je," and "),cd=o(je,"EM",{});var AT=r(cd);N1=i(AT,"readable"),AT.forEach(t),j1=i(je,"."),je.forEach(t),Vt.forEach(t),Fd=f(s),$e=o(s,"H2",{class:!0});var Tf=r($e);We=o(Tf,"A",{id:!0,class:!0,href:!0});var ST=r(We);ud=o(ST,"SPAN",{});var GT=r(ud);P(ao.$$.fragment,GT),GT.forEach(t),ST.forEach(t),q1=f(Tf),pd=o(Tf,"SPAN",{});var kT=r(pd);H1=i(kT,"Examples"),kT.forEach(t),Tf.forEach(t),Yd=f(s),Me=o(s,"H3",{class:!0});var yf=r(Me);Ze=o(yf,"A",{id:!0,class:!0,href:!0});var PT=r(Ze);gd=o(PT,"SPAN",{});var RT=r(gd);P(oo.$$.fragment,RT),RT.forEach(t),PT.forEach(t),B1=f(yf),md=o(yf,"SPAN",{});var OT=r(md);U1=i(OT,"Text-to-Image generation with Stable Diffusion"),OT.forEach(t),yf.forEach(t),Qd=f(s),P(ro.$$.fragment,s),Wd=f(s),Ce=o(s,"H3",{class:!0});var wf=r(Ce);Je=o(wf,"A",{id:!0,class:!0,href:!0});var $T=r(Je);_d=o($T,"SPAN",{});var MT=r(_d);P(no.$$.fragment,MT),MT.forEach(t),$T.forEach(t),V1=f(wf),vd=o(wf,"SPAN",{});var CT=r(vd);z1=i(CT,"Image-to-Image text-guided generation with Stable Diffusion"),CT.forEach(t),wf.forEach(t),Zd=f(s),Ke=o(s,"P",{});var Df=r(Ke);F1=i(Df,"The "),Ed=o(Df,"CODE",{});var LT=r(Ed);Y1=i(LT,"StableDiffusionImg2ImgPipeline"),LT.forEach(t),Q1=i(Df," lets you pass a text prompt and an initial image to condition the generation of new images."),Df.forEach(t),Jd=f(s),P(lo.$$.fragment,s),Kd=f(s),io=o(s,"P",{});var hv=r(io);W1=i(hv,"You can also run this example on colab "),so=o(hv,"A",{href:!0,rel:!0});var NT=r(so);vn=o(NT,"IMG",{src:!0,alt:!0}),NT.forEach(t),hv.forEach(t),Xd=f(s),Le=o(s,"H3",{class:!0});var If=r(Le);Xe=o(If,"A",{id:!0,class:!0,href:!0});var jT=r(Xe);bd=o(jT,"SPAN",{});var qT=r(bd);P(fo.$$.fragment,qT),qT.forEach(t),jT.forEach(t),Z1=f(If),Td=o(If,"SPAN",{});var HT=r(Td);J1=i(HT,"Tweak prompts reusing seeds and latents"),HT.forEach(t),If.forEach(t),ef=f(s),xe=o(s,"P",{});var yn=r(xe);K1=i(yn,"You can generate your own latents to reproduce results, or tweak your prompt on a specific result you liked. "),ho=o(yn,"A",{href:!0,rel:!0});var BT=r(ho);X1=i(BT,"This notebook"),BT.forEach(t),ev=i(yn," shows how to do it step by step. You can also run it in Google Colab "),co=o(yn,"A",{href:!0,rel:!0});var UT=r(co);En=o(UT,"IMG",{src:!0,alt:!0}),UT.forEach(t),tv=i(yn,"."),yn.forEach(t),tf=f(s),Ne=o(s,"H3",{class:!0});var xf=r(Ne);et=o(xf,"A",{id:!0,class:!0,href:!0});var VT=r(et);yd=o(VT,"SPAN",{});var zT=r(yd);P(uo.$$.fragment,zT),zT.forEach(t),VT.forEach(t),av=f(xf),wd=o(xf,"SPAN",{});var FT=r(wd);ov=i(FT,"In-painting using Stable Diffusion"),FT.forEach(t),xf.forEach(t),af=f(s),tt=o(s,"P",{});var Af=r(tt);rv=i(Af,"The "),Dd=o(Af,"CODE",{});var YT=r(Dd);nv=i(YT,"StableDiffusionInpaintPipeline"),YT.forEach(t),lv=i(Af," lets you edit specific parts of an image by providing a mask and text prompt."),Af.forEach(t),of=f(s),P(po.$$.fragment,s),rf=f(s),go=o(s,"P",{});var cv=r(go);iv=i(cv,"You can also run this example on colab "),mo=o(cv,"A",{href:!0,rel:!0});var QT=r(mo);bn=o(QT,"IMG",{src:!0,alt:!0}),QT.forEach(t),cv.forEach(t),this.h()},h(){n(Se,"name","hf:doc:metadata"),n(Se,"content",JSON.stringify(ay)),n(He,"id","pipelines"),n(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"),n(He,"href","#pipelines"),n(Ge,"class","relative group"),n(Ft,"href","https://huggingface.co/blog/stable_diffusion"),n(Ft,"rel","nofollow"),n(yo,"href","./api/models#vae"),n(wo,"href","./api/models#UNet2DConditionModel"),n(Yt,"href","https://huggingface.co/docs/transformers/v4.21.2/en/model_doc/clip#transformers.CLIPTextModel"),n(Yt,"rel","nofollow"),n(Do,"href","./api/scheduler#pndm"),n(Zt,"href","https://huggingface.co/docs/transformers/v4.21.2/en/model_doc/clip#transformers.CLIPFeatureExtractor"),n(Zt,"rel","nofollow"),n(Io,"href","./stable_diffusion#safety_checker"),n(Kt,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines/latent_diffusion"),n(Kt,"rel","nofollow"),n(Xt,"href","https://arxiv.org/abs/2112.10752"),n(Xt,"rel","nofollow"),n(So,"href","#pipelines-api"),n(Ao,"start","2"),n(ko,"href","#pipelines-summary"),n(Go,"start","3"),n(Ro,"href","#contribution"),n(Po,"start","4"),n(oa,"href","https://github.com/huggingface/diffusers/tree/main/examples"),n(oa,"rel","nofollow"),n(Ue,"id","diffusers-summary"),n(Ue,"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"),n(Ue,"href","#diffusers-summary"),n(ke,"class","relative group"),n($o,"align","center"),n(Mo,"align","center"),n(Co,"href","./alt_diffusion"),n(na,"href","https://arxiv.org/abs/2211.06679"),n(na,"rel","nofollow"),n(Lo,"align","center"),n(No,"align","center"),n(jo,"href","./audio_diffusion"),n(la,"href","https://github.com/teticio/audio_diffusion.git"),n(la,"rel","nofollow"),n(qo,"align","center"),n(Yn,"align","center"),n(Ho,"href","./cycle_diffusion"),n(ia,"href","https://arxiv.org/abs/2210.05559"),n(ia,"rel","nofollow"),n(Bo,"align","center"),n(Jn,"align","center"),n(Uo,"href","./dance_diffusion"),n(sa,"href","https://github.com/williamberman/diffusers.git"),n(sa,"rel","nofollow"),n(Vo,"align","center"),n(tl,"align","center"),n(zo,"href","./ddpm"),n(da,"href","https://arxiv.org/abs/2006.11239"),n(da,"rel","nofollow"),n(Fo,"align","center"),n(nl,"align","center"),n(Yo,"href","./ddim"),n(fa,"href","https://arxiv.org/abs/2010.02502"),n(fa,"rel","nofollow"),n(Qo,"align","center"),n(dl,"align","center"),n(Wo,"href","./latent_diffusion"),n(ha,"href","https://arxiv.org/abs/2112.10752"),n(ha,"rel","nofollow"),n(Zo,"align","center"),n(ul,"align","center"),n(Jo,"href","./latent_diffusion"),n(ca,"href","https://arxiv.org/abs/2112.10752"),n(ca,"rel","nofollow"),n(Ko,"align","center"),n(_l,"align","center"),n(Xo,"href","./latent_diffusion_uncond"),n(ua,"href","https://arxiv.org/abs/2112.10752"),n(ua,"rel","nofollow"),n(er,"align","center"),n(Tl,"align","center"),n(tr,"href","./paint_by_example"),n(pa,"href","https://arxiv.org/abs/2211.13227"),n(pa,"rel","nofollow"),n(ar,"align","center"),n(Il,"align","center"),n(or,"href","./pndm"),n(ga,"href","https://arxiv.org/abs/2202.09778"),n(ga,"rel","nofollow"),n(rr,"align","center"),n(Gl,"align","center"),n(nr,"href","./score_sde_ve"),n(ma,"href","https://openreview.net/forum?id=PxTIG12RRHS"),n(ma,"rel","nofollow"),n(lr,"align","center"),n(Ol,"align","center"),n(ir,"href","./score_sde_vp"),n(_a,"href","https://openreview.net/forum?id=PxTIG12RRHS"),n(_a,"rel","nofollow"),n(sr,"align","center"),n(Ll,"align","center"),n(dr,"href","./semantic_stable_diffusion"),n(va,"href","https://arxiv.org/abs/2301.12247"),n(va,"rel","nofollow"),n(fr,"align","center"),n(Hl,"align","center"),n(hr,"href","./stable_diffusion/text2img"),n(Ea,"href","https://stability.ai/blog/stable-diffusion-public-release"),n(Ea,"rel","nofollow"),n(cr,"align","center"),bo(pr.src,gv="https://colab.research.google.com/assets/colab-badge.svg")||n(pr,"src",gv),n(pr,"alt","Open In Colab"),n(ba,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb"),n(ba,"rel","nofollow"),n(ur,"align","center"),n(gr,"href","./stable_diffusion/img2img"),n(Ta,"href","https://stability.ai/blog/stable-diffusion-public-release"),n(Ta,"rel","nofollow"),n(mr,"align","center"),bo(vr.src,mv="https://colab.research.google.com/assets/colab-badge.svg")||n(vr,"src",mv),n(vr,"alt","Open In Colab"),n(ya,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/image_2_image_using_diffusers.ipynb"),n(ya,"rel","nofollow"),n(_r,"align","center"),n(Er,"href","./stable_diffusion/inpaint"),n(wa,"href","https://stability.ai/blog/stable-diffusion-public-release"),n(wa,"rel","nofollow"),n(br,"align","center"),bo(yr.src,_v="https://colab.research.google.com/assets/colab-badge.svg")||n(yr,"src",_v),n(yr,"alt","Open In Colab"),n(Da,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb"),n(Da,"rel","nofollow"),n(Tr,"align","center"),n(wr,"href","./stable_diffusion/panorama"),n(Ia,"href","https://arxiv.org/abs/2302.08113"),n(Ia,"rel","nofollow"),n(Dr,"align","center"),n(ei,"align","center"),n(Ir,"href","./stable_diffusion/pix2pix"),n(xa,"href","https://arxiv.org/abs/2211.09800"),n(xa,"rel","nofollow"),n(xr,"align","center"),n(ri,"align","center"),n(Ar,"href","./stable_diffusion/pix2pix_zero"),n(Aa,"href","https://arxiv.org/abs/2302.03027"),n(Aa,"rel","nofollow"),n(Sr,"align","center"),n(si,"align","center"),n(Gr,"href","./stable_diffusion/attend_and_excite"),n(Sa,"href","https://arxiv.org/abs/2301.13826"),n(Sa,"rel","nofollow"),n(kr,"align","center"),n(ci,"align","center"),n(Pr,"href","./stable_diffusion/self_attention_guidance"),n(Ga,"href","https://arxiv.org/abs/2210.00939"),n(Ga,"rel","nofollow"),n(Rr,"align","center"),n(mi,"align","center"),n(Or,"href","./stable_diffusion/image_variation"),n(ka,"href","https://github.com/LambdaLabsML/lambda-diffusers#stable-diffusion-image-variations"),n(ka,"rel","nofollow"),n($r,"align","center"),n(bi,"align","center"),n(Mr,"href","./stable_diffusion/latent_upscale"),n(Pa,"href","https://twitter.com/StabilityAI/status/1590531958815064065"),n(Pa,"rel","nofollow"),n(Cr,"align","center"),n(Di,"align","center"),n(Lr,"href","./stable_diffusion_2/"),n(Ra,"href","https://stability.ai/blog/stable-diffusion-v2-release"),n(Ra,"rel","nofollow"),n(Nr,"align","center"),n(Si,"align","center"),n(jr,"href","./stable_diffusion_2"),n(Oa,"href","https://stability.ai/blog/stable-diffusion-v2-release"),n(Oa,"rel","nofollow"),n(qr,"align","center"),n(Ri,"align","center"),n(Hr,"href","./stable_diffusion_2"),n($a,"href","https://stability.ai/blog/stable-diffusion-v2-release"),n($a,"rel","nofollow"),n(Br,"align","center"),n(Ci,"align","center"),n(Ur,"href","./stable_diffusion_2"),n(Ma,"href","https://stability.ai/blog/stable-diffusion-v2-release"),n(Ma,"rel","nofollow"),n(Vr,"align","center"),n(qi,"align","center"),n(zr,"href","./stable_diffusion_safe"),n(Ca,"href","https://arxiv.org/abs/2211.05105"),n(Ca,"rel","nofollow"),n(Fr,"align","center"),bo(Qr.src,vv="https://colab.research.google.com/assets/colab-badge.svg")||n(Qr,"src",vv),n(Qr,"alt","Open In Colab"),n(La,"href","https://colab.research.google.com/github/ml-research/safe-latent-diffusion/blob/main/examples/Safe%20Latent%20Diffusion.ipynb"),n(La,"rel","nofollow"),n(Yr,"align","center"),n(Wr,"href","./stable_unclip"),n(Zr,"align","center"),n(Yi,"align","center"),n(Jr,"href","./stable_unclip"),n(Kr,"align","center"),n(Ji,"align","center"),n(Xr,"href","./stochastic_karras_ve"),n(Na,"href","https://arxiv.org/abs/2206.00364"),n(Na,"rel","nofollow"),n(en,"align","center"),n(ts,"align","center"),n(tn,"href","./unclip"),n(ja,"href","https://arxiv.org/abs/2204.06125"),n(ja,"rel","nofollow"),n(an,"align","center"),n(rs,"align","center"),n(on,"href","./versatile_diffusion"),n(qa,"href","https://arxiv.org/abs/2211.08332"),n(qa,"rel","nofollow"),n(rn,"align","center"),n(is,"align","center"),n(nn,"href","./versatile_diffusion"),n(Ha,"href","https://arxiv.org/abs/2211.08332"),n(Ha,"rel","nofollow"),n(ln,"align","center"),n(fs,"align","center"),n(sn,"href","./versatile_diffusion"),n(Ba,"href","https://arxiv.org/abs/2211.08332"),n(Ba,"rel","nofollow"),n(dn,"align","center"),n(us,"align","center"),n(fn,"href","./vq_diffusion"),n(Ua,"href","https://arxiv.org/abs/2111.14822"),n(Ua,"rel","nofollow"),n(hn,"align","center"),n(ms,"align","center"),n(cn,"href","#examples"),n(Fe,"id","pipelines-api"),n(Fe,"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"),n(Fe,"href","#pipelines-api"),n(Pe,"class","relative group"),n(Fa,"href","https://github.com/huggingface/transformers"),n(Fa,"rel","nofollow"),n(Ya,"href","../diffusion_pipeline"),n(Qa,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5"),n(Qa,"rel","nofollow"),n(Wa,"href","https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/model_index.json"),n(Wa,"rel","nofollow"),n(pn,"href","../diffusion_pipeline"),n(gn,"href","../diffusion_pipeline"),n(Re,"href","https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.to"),n(Re,"rel","nofollow"),n(mn,"href","./stable_diffusion"),n(Za,"href","https://github.com/huggingface/diffusers/tree/main/src/diffusers/pipelines/ddpm"),n(Za,"rel","nofollow"),n(Ja,"href","https://pytorch.org/docs/stable/generated/torch.no_grad.html"),n(Ja,"rel","nofollow"),n(Ka,"href","https://github.com/huggingface/diffusers/tree/main/examples/community"),n(Ka,"rel","nofollow"),n(Ye,"id","contribution"),n(Ye,"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"),n(Ye,"href","#contribution"),n(Oe,"class","relative group"),n(eo,"href",".../diffusion_pipeline"),n(to,"href","https://github.com/huggingface/diffusers/tree/main/examples/community"),n(to,"rel","nofollow"),n(_n,"href","./overview"),n(We,"id","examples"),n(We,"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"),n(We,"href","#examples"),n($e,"class","relative group"),n(Ze,"id","texttoimage-generation-with-stable-diffusion"),n(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"),n(Ze,"href","#texttoimage-generation-with-stable-diffusion"),n(Me,"class","relative group"),n(Je,"id","imagetoimage-textguided-generation-with-stable-diffusion"),n(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"),n(Je,"href","#imagetoimage-textguided-generation-with-stable-diffusion"),n(Ce,"class","relative group"),bo(vn.src,Ev="https://colab.research.google.com/assets/colab-badge.svg")||n(vn,"src",Ev),n(vn,"alt","Open In Colab"),n(so,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/image_2_image_using_diffusers.ipynb"),n(so,"rel","nofollow"),n(Xe,"id","tweak-prompts-reusing-seeds-and-latents"),n(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"),n(Xe,"href","#tweak-prompts-reusing-seeds-and-latents"),n(Le,"class","relative group"),n(ho,"href","https://github.com/pcuenca/diffusers-examples/blob/main/notebooks/stable-diffusion-seeds.ipynb"),n(ho,"rel","nofollow"),bo(En.src,bv="https://colab.research.google.com/assets/colab-badge.svg")||n(En,"src",bv),n(En,"alt","Open In Colab"),n(co,"href","https://colab.research.google.com/github/pcuenca/diffusers-examples/blob/main/notebooks/stable-diffusion-seeds.ipynb"),n(co,"rel","nofollow"),n(et,"id","inpainting-using-stable-diffusion"),n(et,"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"),n(et,"href","#inpainting-using-stable-diffusion"),n(Ne,"class","relative group"),bo(bn.src,Tv="https://colab.research.google.com/assets/colab-badge.svg")||n(bn,"src",Tv),n(bn,"alt","Open In Colab"),n(mo,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb"),n(mo,"rel","nofollow")},m(s,u){e(document.head,Se),p(s,xd,u),p(s,Ge,u),e(Ge,He),e(He,wn),R(zt,wn,null),e(Ge,Sf),e(Ge,Dn),e(Dn,Gf),p(s,Ad,u),p(s,To,u),e(To,kf),p(s,Sd,u),p(s,Be,u),e(Be,Pf),e(Be,Ft),e(Ft,Rf),e(Be,Of),p(s,Gd,u),p(s,E,u),e(E,In),e(In,yo),e(yo,$f),e(E,Mf),e(E,xn),e(xn,wo),e(wo,Cf),e(E,Lf),e(E,An),e(An,Yt),e(Yt,Nf),e(E,jf),e(E,Qt),e(Qt,qf),e(Qt,Do),e(Do,Hf),e(Qt,Bf),e(E,Uf),e(E,Wt),e(Wt,Vf),e(Wt,Zt),e(Zt,zf),e(Wt,Ff),e(E,Yf),e(E,Jt),e(Jt,Qf),e(Jt,Io),e(Io,Wf),e(Jt,Zf),p(s,kd,u),p(s,xo,u),e(xo,Jf),p(s,Pd,u),p(s,D,u),e(D,Sn),e(Sn,Gn),e(Gn,C),e(C,Kf),e(C,kn),e(kn,Xf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_),e(b,Y_),p(s,Bd,u),p(s,x,u),e(x,Qs),e(Qs,Q_),e(x,W_),e(x,Ws),e(Ws,Z_),e(x,J_),e(x,Ja),e(Ja,Zs),e(Zs,K_),e(x,X_),e(x,Ka),e(Ka,e1),p(s,Ud,u),p(s,Oe,u),e(Oe,Ye),e(Ye,Js),R(Xa,Js,null),e(Oe,t1),e(Oe,Ks),e(Ks,a1),p(s,Vd,u),p(s,y,u),e(y,o1),e(y,Xs),e(Xs,r1),e(y,n1),e(y,ed),e(ed,l1),e(y,i1),e(y,td),e(td,s1),e(y,d1),e(y,ad),e(ad,f1),e(y,h1),p(s,zd,u),p(s,A,u),e(A,Qe),e(Qe,od),e(od,c1),e(Qe,u1),e(Qe,eo),e(eo,rd),e(rd,p1),e(eo,g1),e(Qe,m1),e(A,_1),e(A,De),e(De,nd),e(nd,v1),e(De,E1),e(De,ld),e(ld,b1),e(De,T1),e(De,id),e(id,y1),e(De,w1),e(A,D1),e(A,Ie),e(Ie,sd),e(sd,I1),e(Ie,x1),e(Ie,to),e(to,A1),e(Ie,S1),e(Ie,_n),e(_n,G1),e(Ie,k1),e(A,P1),e(A,S),e(S,dd),e(dd,R1),e(S,O1),e(S,fd),e(fd,$1),e(S,M1),e(S,hd),e(hd,C1),e(S,L1),e(S,cd),e(cd,N1),e(S,j1),p(s,Fd,u),p(s,$e,u),e($e,We),e(We,ud),R(ao,ud,null),e($e,q1),e($e,pd),e(pd,H1),p(s,Yd,u),p(s,Me,u),e(Me,Ze),e(Ze,gd),R(oo,gd,null),e(Me,B1),e(Me,md),e(md,U1),p(s,Qd,u),R(ro,s,u),p(s,Wd,u),p(s,Ce,u),e(Ce,Je),e(Je,_d),R(no,_d,null),e(Ce,V1),e(Ce,vd),e(vd,z1),p(s,Zd,u),p(s,Ke,u),e(Ke,F1),e(Ke,Ed),e(Ed,Y1),e(Ke,Q1),p(s,Jd,u),R(lo,s,u),p(s,Kd,u),p(s,io,u),e(io,W1),e(io,so),e(so,vn),p(s,Xd,u),p(s,Le,u),e(Le,Xe),e(Xe,bd),R(fo,bd,null),e(Le,Z1),e(Le,Td),e(Td,J1),p(s,ef,u),p(s,xe,u),e(xe,K1),e(xe,ho),e(ho,X1),e(xe,ev),e(xe,co),e(co,En),e(xe,tv),p(s,tf,u),p(s,Ne,u),e(Ne,et),e(et,yd),R(uo,yd,null),e(Ne,av),e(Ne,wd),e(wd,ov),p(s,af,u),p(s,tt,u),e(tt,rv),e(tt,Dd),e(Dd,nv),e(tt,lv),p(s,of,u),R(po,s,u),p(s,rf,u),p(s,go,u),e(go,iv),e(go,mo),e(mo,bn),nf=!0},p:XT,i(s){nf||(O(zt.$$.fragment,s),O(ra.$$.fragment,s),O(za.$$.fragment,s),O(Xa.$$.fragment,s),O(ao.$$.fragment,s),O(oo.$$.fragment,s),O(ro.$$.fragment,s),O(no.$$.fragment,s),O(lo.$$.fragment,s),O(fo.$$.fragment,s),O(uo.$$.fragment,s),O(po.$$.fragment,s),nf=!0)},o(s){$(zt.$$.fragment,s),$(ra.$$.fragment,s),$(za.$$.fragment,s),$(Xa.$$.fragment,s),$(ao.$$.fragment,s),$(oo.$$.fragment,s),$(ro.$$.fragment,s),$(no.$$.fragment,s),$(lo.$$.fragment,s),$(fo.$$.fragment,s),$(uo.$$.fragment,s),$(po.$$.fragment,s),nf=!1},d(s){t(Se),s&&t(xd),s&&t(Ge),M(zt),s&&t(Ad),s&&t(To),s&&t(Sd),s&&t(Be),s&&t(Gd),s&&t(E),s&&t(kd),s&&t(xo),s&&t(Pd),s&&t(D),s&&t(Rd),s&&t(L),s&&t(Od),s&&t(ke),M(ra),s&&t($d),s&&t(Oo),s&&t(Md),s&&t(Ve),s&&t(Cd),s&&t(Va),s&&t(Ld),s&&t(ze),s&&t(Nd),s&&t(Pe),M(za),s&&t(jd),s&&t(un),s&&t(qd),s&&t(we),s&&t(Hd),s&&t(I),s&&t(Bd),s&&t(x),s&&t(Ud),s&&t(Oe),M(Xa),s&&t(Vd),s&&t(y),s&&t(zd),s&&t(A),s&&t(Fd),s&&t($e),M(ao),s&&t(Yd),s&&t(Me),M(oo),s&&t(Qd),M(ro,s),s&&t(Wd),s&&t(Ce),M(no),s&&t(Zd),s&&t(Ke),s&&t(Jd),M(lo,s),s&&t(Kd),s&&t(io),s&&t(Xd),s&&t(Le),M(fo),s&&t(ef),s&&t(xe),s&&t(tf),s&&t(Ne),M(uo),s&&t(af),s&&t(tt),s&&t(of),M(po,s),s&&t(rf),s&&t(go)}}}const ay={local:"pipelines",sections:[{local:"diffusers-summary",title:"\u{1F9E8} Diffusers Summary"},{local:"pipelines-api",title:"Pipelines API"},{local:"contribution",title:"Contribution"},{local:"examples",sections:[{local:"texttoimage-generation-with-stable-diffusion",title:"Text-to-Image generation with Stable Diffusion"},{local:"imagetoimage-textguided-generation-with-stable-diffusion",title:"Image-to-Image text-guided generation with Stable Diffusion"},{local:"tweak-prompts-reusing-seeds-and-latents",title:"Tweak prompts reusing seeds and latents"},{local:"inpainting-using-stable-diffusion",title:"In-painting using Stable Diffusion"}],title:"Examples"}],title:"Pipelines"};function oy(pv){return ey(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class iy extends WT{constructor(Se){super();ZT(this,Se,oy,ty,JT,{})}}export{iy as default,ay as metadata};
