import{S as Gm,i as Cm,s as xm,e as s,k as i,w as _,t as p,M as Dm,c as o,d as a,m as l,a as r,x as v,h as d,b as n,N as k,f as us,G as e,g as f,y as b,q as y,o as w,B as T,v as jm,L as Dd}from"../../../../chunks/vendor-hf-doc-builder.js";import{T as Zm}from"../../../../chunks/Tip-hf-doc-builder.js";import{D as ne}from"../../../../chunks/Docstring-hf-doc-builder.js";import{C as le}from"../../../../chunks/CodeBlock-hf-doc-builder.js";import{I as ie}from"../../../../chunks/IconCopyLink-hf-doc-builder.js";import{E as xd}from"../../../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Sm(G){let h,U,g,u,J;return u=new le({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBkaWZmdXNlcnMlMjBpbXBvcnQlMjBTdGFibGVEaWZmdXNpb25BZGFwdGVyUGlwZWxpbmUlMkMlMjBUMklBZGFwdGVyJTBBJTBBaW1hZ2UlMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmRvY3MtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZ0MmktYWRhcHRlciUyRmNvbG9yX3JlZi5wbmclMjIlMEEpJTBBJTBBY29sb3JfcGFsZXR0ZSUyMCUzRCUyMGltYWdlLnJlc2l6ZSgoOCUyQyUyMDgpKSUwQWNvbG9yX3BhbGV0dGUlMjAlM0QlMjBjb2xvcl9wYWxldHRlLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSUyQyUyMHJlc2FtcGxlJTNESW1hZ2UuUmVzYW1wbGluZy5ORUFSRVNUKSUwQSUwQWFkYXB0ZXIlMjAlM0QlMjBUMklBZGFwdGVyLmZyb21fcHJldHJhaW5lZCglMjJUZW5jZW50QVJDJTJGdDJpYWRhcHRlcl9jb2xvcl9zZDE0djElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkFkYXB0ZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXIlM0RhZGFwdGVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQSUwQXBpcGUudG8oJTIyY3VkYSUyMiklMEElMEFvdXRfaW1hZ2UlMjAlM0QlMjBwaXBlKCUwQSUyMCUyMCUyMCUyMCUyMkF0JTIwbmlnaHQlMkMlMjBnbG93aW5nJTIwY3ViZXMlMjBpbiUyMGZyb250JTIwb2YlMjB0aGUlMjBiZWFjaCUyMiUyQyUwQSUyMCUyMCUyMCUyMGltYWdlJTNEY29sb3JfcGFsZXR0ZSUyQyUwQSkuaW1hZ2VzJTVCMCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAdapterPipeline, T2IAdapter

<span class="hljs-meta">&gt;&gt;&gt; </span>image = load_image(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>color_palette = image.resize((<span class="hljs-number">8</span>, <span class="hljs-number">8</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>color_palette = color_palette.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>), resample=Image.Resampling.NEAREST)

<span class="hljs-meta">&gt;&gt;&gt; </span>adapter = T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_color_sd14v1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionAdapterPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
<span class="hljs-meta">... </span>    adapter=adapter,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>out_image = pipe(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;At night, glowing cubes in front of the beach&quot;</span>,
<span class="hljs-meta">... </span>    image=color_palette,
<span class="hljs-meta">... </span>).images[<span class="hljs-number">0</span>]`}}),{c(){h=s("p"),U=p("Examples:"),g=i(),_(u.$$.fragment)},l(m){h=o(m,"P",{});var M=r(h);U=d(M,"Examples:"),M.forEach(a),g=l(m),v(u.$$.fragment,m)},m(m,M){f(m,h,M),e(h,U),f(m,g,M),b(u,m,M),J=!0},p:Dd,i(m){J||(y(u.$$.fragment,m),J=!0)},o(m){w(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),T(u,m)}}}function Rm(G){let h,U,g,u,J;return{c(){h=s("p"),U=p("\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=s("code"),u=p("scaled_dot_product_attention"),J=p(` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`)},l(m){h=o(m,"P",{});var M=r(h);U=d(M,"\u26A0\uFE0F Don\u2019t enable attention slicing if you\u2019re already using "),g=o(M,"CODE",{});var pe=r(g);u=d(pe,"scaled_dot_product_attention"),pe.forEach(a),J=d(M,` (SDPA) from PyTorch
2.0 or xFormers. These attention computations are already very memory efficient so you won\u2019t need to enable
this function. If you enable attention slicing with SDPA or xFormers, it can lead to serious slow downs!`),M.forEach(a)},m(m,M){f(m,h,M),e(h,U),e(h,g),e(g,u),e(h,J)},d(m){m&&a(h)}}}function Pm(G){let h,U,g,u,J;return u=new le({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUlMEElMEFwaXBlJTIwJTNEJTIwU3RhYmxlRGlmZnVzaW9uUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnJ1bndheW1sJTJGc3RhYmxlLWRpZmZ1c2lvbi12MS01JTIyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBJTIwJTIwJTIwJTIwdXNlX3NhZmV0ZW5zb3JzJTNEVHJ1ZSUyQyUwQSklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJhJTIwcGhvdG8lMjBvZiUyMGFuJTIwYXN0cm9uYXV0JTIwcmlkaW5nJTIwYSUyMGhvcnNlJTIwb24lMjBtYXJzJTIyJTBBcGlwZS5lbmFibGVfYXR0ZW50aW9uX3NsaWNpbmcoKSUwQWltYWdlJTIwJTNEJTIwcGlwZShwcm9tcHQpLmltYWdlcyU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionPipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = StableDiffusionPipeline.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>,
<span class="hljs-meta">... </span>    torch_dtype=torch.float16,
<span class="hljs-meta">... </span>    use_safetensors=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;a photo of an astronaut riding a horse on mars&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_attention_slicing()
<span class="hljs-meta">&gt;&gt;&gt; </span>image = pipe(prompt).images[<span class="hljs-number">0</span>]`}}),{c(){h=s("p"),U=p("Examples:"),g=i(),_(u.$$.fragment)},l(m){h=o(m,"P",{});var M=r(h);U=d(M,"Examples:"),M.forEach(a),g=l(m),v(u.$$.fragment,m)},m(m,M){f(m,h,M),e(h,U),f(m,g,M),b(u,m,M),J=!0},p:Dd,i(m){J||(y(u.$$.fragment,m),J=!0)},o(m){w(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),T(u,m)}}}function Wm(G){let h,U;return{c(){h=s("p"),U=p(`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`)},l(g){h=o(g,"P",{});var u=r(h);U=d(u,`\u26A0\uFE0F When memory efficient attention and sliced attention are both enabled, memory efficient attention takes
precedent.`),u.forEach(a)},m(g,u){f(g,h,u),e(h,U)},d(g){g&&a(h)}}}function Bm(G){let h,U,g,u,J;return u=new le({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwRGlmZnVzaW9uUGlwZWxpbmUlMEFmcm9tJTIweGZvcm1lcnMub3BzJTIwaW1wb3J0JTIwTWVtb3J5RWZmaWNpZW50QXR0ZW50aW9uRmxhc2hBdHRlbnRpb25PcCUwQSUwQXBpcGUlMjAlM0QlMjBEaWZmdXNpb25QaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTIyc3RhYmlsaXR5YWklMkZzdGFibGUtZGlmZnVzaW9uLTItMSUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guZmxvYXQxNiklMEFwaXBlJTIwJTNEJTIwcGlwZS50byglMjJjdWRhJTIyKSUwQXBpcGUuZW5hYmxlX3hmb3JtZXJzX21lbW9yeV9lZmZpY2llbnRfYXR0ZW50aW9uKGF0dGVudGlvbl9vcCUzRE1lbW9yeUVmZmljaWVudEF0dGVudGlvbkZsYXNoQXR0ZW50aW9uT3ApJTBBJTIzJTIwV29ya2Fyb3VuZCUyMGZvciUyMG5vdCUyMGFjY2VwdGluZyUyMGF0dGVudGlvbiUyMHNoYXBlJTIwdXNpbmclMjBWQUUlMjBmb3IlMjBGbGFzaCUyMEF0dGVudGlvbiUwQXBpcGUudmFlLmVuYWJsZV94Zm9ybWVyc19tZW1vcnlfZWZmaWNpZW50X2F0dGVudGlvbihhdHRlbnRpb25fb3AlM0ROb25lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> DiffusionPipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = DiffusionPipeline.from_pretrained(<span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, torch_dtype=torch.float16)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe = pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Workaround for not accepting attention shape using VAE for Flash Attention</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pipe.vae.enable_xformers_memory_efficient_attention(attention_op=<span class="hljs-literal">None</span>)`}}),{c(){h=s("p"),U=p("Examples:"),g=i(),_(u.$$.fragment)},l(m){h=o(m,"P",{});var M=r(h);U=d(M,"Examples:"),M.forEach(a),g=l(m),v(u.$$.fragment,m)},m(m,M){f(m,h,M),e(h,U),f(m,g,M),b(u,m,M),J=!0},p:Dd,i(m){J||(y(u.$$.fragment,m),J=!0)},o(m){w(u.$$.fragment,m),J=!1},d(m){m&&a(h),m&&a(g),T(u,m)}}}function Nm(G){let h,U,g,u,J,m,M,pe,En,Qo,H,de,gs,it,An,_s,Un,Xo,lt,pt,Jn,In,Yo,_a,$n,zo,va,kn,Lo,ba,vs,Zn,Ho,ce,Gn,dt,Cn,xn,qo,q,fe,bs,ct,Dn,ys,jn,Oo,me,ws,O,Ts,Sn,Rn,Ms,Pn,Wn,ya,Bn,Nn,Es,K,As,ft,Fn,Vn,Us,Js,Qn,Xn,wa,Yn,Ko,ee,he,Is,mt,zn,$s,Ln,er,ue,Hn,ks,qn,On,tr,ge,ht,Kn,Zs,ei,ti,ai,D,si,Gs,oi,ri,Cs,ni,ii,Ta,li,pi,ar,_e,di,ut,ci,fi,sr,gt,or,Ma,Ea,jd,rr,Aa,mi,nr,_t,ir,Ua,hi,lr,Ja,Ia,Sd,pr,$a,ui,dr,vt,cr,ka,gi,fr,bt,mr,Za,Ga,Rd,hr,te,ve,xs,yt,_i,Ds,vi,ur,be,bi,wt,yi,wi,gr,ae,ye,js,Tt,Ti,Ss,Mi,_r,we,Rs,j,Ps,Ei,Ai,Ws,Ui,Ji,Bs,Ii,$i,Ns,ki,Zi,A,S,Te,Mt,Gi,Ci,xi,Fs,Di,ji,Vs,Si,Ri,Qs,Ca,Me,Pd,Pi,Xs,xa,Da,Wd,Wi,R,Ee,Et,Bi,Ni,Fi,Ys,Vi,Qi,zs,Xi,Yi,Ls,ja,Ae,Bd,zi,Hs,Sa,Ra,Nd,Li,P,Ue,At,Hi,qi,Oi,Ut,Ki,Jt,el,tl,al,qs,sl,ol,Os,Pa,Je,Fd,rl,Ks,Wa,Ba,Vd,nl,W,Ie,It,il,ll,pl,eo,dl,cl,to,fl,ml,ao,Na,Fa,Qd,hl,so,Va,Qa,Xd,ul,B,$e,$t,gl,_l,vl,oo,bl,yl,kt,wl,Zt,Tl,Ml,El,ro,Xa,Ya,Yd,Al,no,za,La,zd,Ul,N,ke,Gt,Jl,Il,$l,io,kl,Zl,Ct,Gl,xt,Cl,xl,Dl,lo,Ha,qa,Ld,jl,po,Oa,Ka,Hd,Sl,F,Dt,jt,Rl,Pl,co,Wl,Bl,St,Nl,Rt,Fl,Vl,Ql,fo,es,ts,qd,Xl,mo,as,ss,Od,Yl,V,ho,Pt,zl,Ll,vr,Hl,br,ql,yr,Ol,Q,uo,Wt,Kl,ep,wr,tp,Tr,ap,Mr,sp,X,go,Bt,op,rp,Er,np,Ar,ip,Ur,lp,Y,_o,Nt,pp,dp,Jr,cp,Ir,fp,$r,kr,se,Ze,vo,Ft,mp,bo,hp,Zr,Vt,yo,up,gp,Gr,os,_p,Cr,Qt,xr,rs,vp,Dr,Ge,ns,Kd,bp,is,ec,jr,Xt,wo,yp,wp,Sr,Yt,To,Tp,Mp,Rr,zt,Pr,ls,ps,tc,Wr,oe,Ce,Mo,Lt,Ep,Eo,Ap,Br,xe,Up,Ht,Jp,Ip,Nr,re,De,Ao,qt,$p,Uo,kp,Fr,E,Ot,Zp,ds,Gp,Kt,Cp,xp,ea,Dp,cs,jp,Sp,Rp,z,ta,Pp,Jo,Wp,Bp,je,Np,C,aa,Fp,Io,Vp,Qp,Se,Xp,Re,Yp,Pe,sa,zp,oa,Lp,$o,Hp,qp,Op,We,ra,Kp,ko,ed,td,Be,na,ad,ia,sd,Zo,od,rd,nd,x,la,id,pa,ld,da,pd,dd,cd,Ne,fd,Fe,md,Ve,ca,hd,fa,ud,ma,gd,_d,vd,Qe,ha,bd,Z,yd,Go,wd,Td,Co,Md,Ed,xo,Ad,Ud,Do,Jd,Id,Vr;return m=new ie({}),it=new ie({}),ct=new ie({}),mt=new ie({}),gt=new le({props:{code:"ZnJvbSUyMGRpZmZ1c2Vycy51dGlscyUyMGltcG9ydCUyMGxvYWRfaW1hZ2UlMEElMEFpbWFnZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnQyaS1hZGFwdGVyJTJGY29sb3JfcmVmLnBuZyUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

image = load_image(<span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png&quot;</span>)`}}),_t=new le({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBJTBBY29sb3JfcGFsZXR0ZSUyMCUzRCUyMGltYWdlLnJlc2l6ZSgoOCUyQyUyMDgpKSUwQWNvbG9yX3BhbGV0dGUlMjAlM0QlMjBjb2xvcl9wYWxldHRlLnJlc2l6ZSgoNTEyJTJDJTIwNTEyKSUyQyUyMHJlc2FtcGxlJTNESW1hZ2UuUmVzYW1wbGluZy5ORUFSRVNUKQ==",highlighted:`<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image

color_palette = image.resize((<span class="hljs-number">8</span>, <span class="hljs-number">8</span>))
color_palette = color_palette.resize((<span class="hljs-number">512</span>, <span class="hljs-number">512</span>), resample=Image.Resampling.NEAREST)`}}),vt=new le({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwZGlmZnVzZXJzJTIwaW1wb3J0JTIwU3RhYmxlRGlmZnVzaW9uQWRhcHRlclBpcGVsaW5lJTJDJTIwVDJJQWRhcHRlciUwQSUwQWFkYXB0ZXIlMjAlM0QlMjBUMklBZGFwdGVyLmZyb21fcHJldHJhaW5lZCglMjJUZW5jZW50QVJDJTJGdDJpYWRhcHRlcl9jb2xvcl9zZDE0djElMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYpJTBBcGlwZSUyMCUzRCUyMFN0YWJsZURpZmZ1c2lvbkFkYXB0ZXJQaXBlbGluZS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyQ29tcFZpcyUyRnN0YWJsZS1kaWZmdXNpb24tdjEtNCUyMiUyQyUwQSUyMCUyMCUyMCUyMGFkYXB0ZXIlM0RhZGFwdGVyJTJDJTBBJTIwJTIwJTIwJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5mbG9hdDE2JTJDJTBBKSUwQXBpcGUudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAdapterPipeline, T2IAdapter

adapter = T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_color_sd14v1&quot;</span>, torch_dtype=torch.float16)
pipe = StableDiffusionAdapterPipeline.from_pretrained(
    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
    adapter=adapter,
    torch_dtype=torch.float16,
)
pipe.to(<span class="hljs-string">&quot;cuda&quot;</span>)`}}),bt=new le({props:{code:"JTIzJTIwZml4JTIwdGhlJTIwcmFuZG9tJTIwc2VlZCUyQyUyMHNvJTIweW91JTIwd2lsbCUyMGdldCUyMHRoZSUyMHNhbWUlMjByZXN1bHQlMjBhcyUyMHRoZSUyMGV4YW1wbGUlMEFnZW5lcmF0b3IlMjAlM0QlMjB0b3JjaC5tYW51YWxfc2VlZCg3KSUwQSUwQW91dF9pbWFnZSUyMCUzRCUyMHBpcGUoJTBBJTIwJTIwJTIwJTIwJTIyQXQlMjBuaWdodCUyQyUyMGdsb3dpbmclMjBjdWJlcyUyMGluJTIwZnJvbnQlMjBvZiUyMHRoZSUyMGJlYWNoJTIyJTJDJTBBJTIwJTIwJTIwJTIwaW1hZ2UlM0Rjb2xvcl9wYWxldHRlJTJDJTBBJTIwJTIwJTIwJTIwZ2VuZXJhdG9yJTNEZ2VuZXJhdG9yJTJDJTBBKS5pbWFnZXMlNUIwJTVE",highlighted:`<span class="hljs-comment"># fix the random seed, so you will get the same result as the example</span>
generator = torch.manual_seed(<span class="hljs-number">7</span>)

out_image = pipe(
    <span class="hljs-string">&quot;At night, glowing cubes in front of the beach&quot;</span>,
    image=color_palette,
    generator=generator,
).images[<span class="hljs-number">0</span>]`}}),yt=new ie({}),Tt=new ie({}),Ft=new ie({}),Qt=new le({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwZGlmZnVzZXJzLnV0aWxzJTIwaW1wb3J0JTIwbG9hZF9pbWFnZSUwQSUwQWNvbmRfa2V5cG9zZSUyMCUzRCUyMGxvYWRfaW1hZ2UoJTBBJTIwJTIwJTIwJTIwJTIyaHR0cHMlM0ElMkYlMkZodWdnaW5nZmFjZS5jbyUyRmRhdGFzZXRzJTJGZGlmZnVzZXJzJTJGZG9jcy1pbWFnZXMlMkZyZXNvbHZlJTJGbWFpbiUyRnQyaS1hZGFwdGVyJTJGa2V5cG9zZV9zYW1wbGVfaW5wdXQucG5nJTIyJTBBKSUwQWNvbmRfZGVwdGglMjAlM0QlMjBsb2FkX2ltYWdlKCUwQSUyMCUyMCUyMCUyMCUyMmh0dHBzJTNBJTJGJTJGaHVnZ2luZ2ZhY2UuY28lMkZkYXRhc2V0cyUyRmRpZmZ1c2VycyUyRmRvY3MtaW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZ0MmktYWRhcHRlciUyRmRlcHRoX3NhbXBsZV9pbnB1dC5wbmclMjIlMEEpJTBBY29uZCUyMCUzRCUyMCU1QiU1QmNvbmRfa2V5cG9zZSUyQyUyMGNvbmRfZGVwdGglNUQlNUQlMEElMEFwcm9tcHQlMjAlM0QlMjAlNUIlMjJBJTIwbWFuJTIwd2Fsa2luZyUyMGluJTIwYW4lMjBvZmZpY2UlMjByb29tJTIwd2l0aCUyMGElMjBuaWNlJTIwdmlldyUyMiU1RA==",highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> diffusers.utils <span class="hljs-keyword">import</span> load_image

cond_keypose = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png&quot;</span>
)
cond_depth = load_image(
    <span class="hljs-string">&quot;https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png&quot;</span>
)
cond = [[cond_keypose, cond_depth]]

prompt = [<span class="hljs-string">&quot;A man walking in an office room with a nice view&quot;</span>]`}}),zt=new le({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMFN0YWJsZURpZmZ1c2lvbkFkYXB0ZXJQaXBlbGluZSUyQyUyME11bHRpQWRhcHRlciUwQSUwQWFkYXB0ZXJzJTIwJTNEJTIwTXVsdGlBZGFwdGVyKCUwQSUyMCUyMCUyMCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFQySUFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlRlbmNlbnRBUkMlMkZ0MmlhZGFwdGVyX2tleXBvc2Vfc2QxNHYxJTIyKSUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMFQySUFkYXB0ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMlRlbmNlbnRBUkMlMkZ0MmlhZGFwdGVyX2RlcHRoX3NkMTR2MSUyMiklMkMlMEElMjAlMjAlMjAlMjAlNUQlMEEpJTBBYWRhcHRlcnMlMjAlM0QlMjBhZGFwdGVycy50byh0b3JjaC5mbG9hdDE2KSUwQSUwQXBpcGUlMjAlM0QlMjBTdGFibGVEaWZmdXNpb25BZGFwdGVyUGlwZWxpbmUuZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMkNvbXBWaXMlMkZzdGFibGUtZGlmZnVzaW9uLXYxLTQlMjIlMkMlMEElMjAlMjAlMjAlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmZsb2F0MTYlMkMlMEElMjAlMjAlMjAlMjBhZGFwdGVyJTNEYWRhcHRlcnMlMkMlMEEpJTBBJTBBaW1hZ2VzJTIwJTNEJTIwcGlwZShwcm9tcHQlMkMlMjBjb25kJTJDJTIwYWRhcHRlcl9jb25kaXRpb25pbmdfc2NhbGUlM0QlNUIwLjglMkMlMjAwLjglNUQp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> StableDiffusionAdapterPipeline, MultiAdapter

adapters = MultiAdapter(
    [
        T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_keypose_sd14v1&quot;</span>),
        T2IAdapter.from_pretrained(<span class="hljs-string">&quot;TencentARC/t2iadapter_depth_sd14v1&quot;</span>),
    ]
)
adapters = adapters.to(torch.float16)

pipe = StableDiffusionAdapterPipeline.from_pretrained(
    <span class="hljs-string">&quot;CompVis/stable-diffusion-v1-4&quot;</span>,
    torch_dtype=torch.float16,
    adapter=adapters,
)

images = pipe(prompt, cond, adapter_conditioning_scale=[<span class="hljs-number">0.8</span>, <span class="hljs-number">0.8</span>])`}}),Lt=new ie({}),qt=new ie({}),Ot=new ne({props:{name:"class diffusers.StableDiffusionAdapterPipeline",anchor:"diffusers.StableDiffusionAdapterPipeline",parameters:[{name:"vae",val:": AutoencoderKL"},{name:"text_encoder",val:": CLIPTextModel"},{name:"tokenizer",val:": CLIPTokenizer"},{name:"unet",val:": UNet2DConditionModel"},{name:"adapter",val:": typing.Union[diffusers.models.adapter.T2IAdapter, diffusers.models.adapter.MultiAdapter, typing.List[diffusers.models.adapter.T2IAdapter]]"},{name:"scheduler",val:": KarrasDiffusionSchedulers"},{name:"safety_checker",val:": StableDiffusionSafetyChecker"},{name:"feature_extractor",val:": CLIPFeatureExtractor"},{name:"adapter_weights",val:": typing.Optional[typing.List[float]] = None"},{name:"requires_safety_checker",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.adapter",description:`<strong>adapter</strong> (<code>T2IAdapter</code> or <code>MultiAdapter</code> or <code>List[T2IAdapter]</code>) &#x2014;
Provides additional conditioning to the unet during the denoising process. If you set multiple Adapter as a
list, the outputs from each Adapter are added together to create one combined additional conditioning.`,name:"adapter"},{anchor:"diffusers.StableDiffusionAdapterPipeline.adapter_weights",description:`<strong>adapter_weights</strong> (<code>List[float]</code>, <em>optional</em>, defaults to None) &#x2014;
List of floats representing the weight which will be multiply to each adapter&#x2019;s output before adding them
together.`,name:"adapter_weights"},{anchor:"diffusers.StableDiffusionAdapterPipeline.vae",description:`<strong>vae</strong> (<a href="/docs/diffusers/main/en/api/models/autoencoderkl#diffusers.AutoencoderKL">AutoencoderKL</a>) &#x2014;
Variational Auto-Encoder (VAE) Model to encode and decode images to and from latent representations.`,name:"vae"},{anchor:"diffusers.StableDiffusionAdapterPipeline.text_encoder",description:`<strong>text_encoder</strong> (<code>CLIPTextModel</code>) &#x2014;
Frozen text-encoder. Stable Diffusion uses the text portion of
<a href="https://huggingface.co/docs/transformers/model_doc/clip#transformers.CLIPTextModel" rel="nofollow">CLIP</a>, specifically
the <a href="https://huggingface.co/openai/clip-vit-large-patch14" rel="nofollow">clip-vit-large-patch14</a> variant.`,name:"text_encoder"},{anchor:"diffusers.StableDiffusionAdapterPipeline.tokenizer",description:`<strong>tokenizer</strong> (<code>CLIPTokenizer</code>) &#x2014;
Tokenizer of class
<a href="https://huggingface.co/docs/transformers/v4.21.0/en/model_doc/clip#transformers.CLIPTokenizer" rel="nofollow">CLIPTokenizer</a>.`,name:"tokenizer"},{anchor:"diffusers.StableDiffusionAdapterPipeline.unet",description:'<strong>unet</strong> (<a href="/docs/diffusers/main/en/api/models/unet2d-cond#diffusers.UNet2DConditionModel">UNet2DConditionModel</a>) &#x2014; Conditional U-Net architecture to denoise the encoded image latents.',name:"unet"},{anchor:"diffusers.StableDiffusionAdapterPipeline.scheduler",description:`<strong>scheduler</strong> (<a href="/docs/diffusers/main/en/api/schedulers/overview#diffusers.SchedulerMixin">SchedulerMixin</a>) &#x2014;
A scheduler to be used in combination with <code>unet</code> to denoise the encoded image latents. Can be one of
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">DDIMScheduler</a>, <a href="/docs/diffusers/main/en/api/schedulers/lms_discrete#diffusers.LMSDiscreteScheduler">LMSDiscreteScheduler</a>, or <a href="/docs/diffusers/main/en/api/schedulers/pndm#diffusers.PNDMScheduler">PNDMScheduler</a>.`,name:"scheduler"},{anchor:"diffusers.StableDiffusionAdapterPipeline.safety_checker",description:`<strong>safety_checker</strong> (<code>StableDiffusionSafetyChecker</code>) &#x2014;
Classification module that estimates whether generated images could be considered offensive or harmful.
Please, refer to the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="nofollow">model card</a> for details.`,name:"safety_checker"},{anchor:"diffusers.StableDiffusionAdapterPipeline.feature_extractor",description:`<strong>feature_extractor</strong> (<code>CLIPFeatureExtractor</code>) &#x2014;
Model that extracts features from generated images to be used as inputs for the <code>safety_checker</code>.`,name:"feature_extractor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L119"}}),ta=new ne({props:{name:"__call__",anchor:"diffusers.StableDiffusionAdapterPipeline.__call__",parameters:[{name:"prompt",val:": typing.Union[str, typing.List[str]] = None"},{name:"image",val:": typing.Union[torch.Tensor, PIL.Image.Image, typing.List[PIL.Image.Image]] = None"},{name:"height",val:": typing.Optional[int] = None"},{name:"width",val:": typing.Optional[int] = None"},{name:"num_inference_steps",val:": int = 50"},{name:"guidance_scale",val:": float = 7.5"},{name:"negative_prompt",val:": typing.Union[str, typing.List[str], NoneType] = None"},{name:"num_images_per_prompt",val:": typing.Optional[int] = 1"},{name:"eta",val:": float = 0.0"},{name:"generator",val:": typing.Union[torch._C.Generator, typing.List[torch._C.Generator], NoneType] = None"},{name:"latents",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"negative_prompt_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_type",val:": typing.Optional[str] = 'pil'"},{name:"return_dict",val:": bool = True"},{name:"callback",val:": typing.Union[typing.Callable[[int, int, torch.FloatTensor], NoneType], NoneType] = None"},{name:"callback_steps",val:": int = 1"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"adapter_conditioning_scale",val:": typing.Union[float, typing.List[float]] = 1.0"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.prompt",description:`<strong>prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts to guide the image generation. If not defined, one has to pass <code>prompt_embeds</code>.
instead.`,name:"prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.image",description:`<strong>image</strong> (<code>torch.FloatTensor</code>, <code>PIL.Image.Image</code>, <code>List[torch.FloatTensor]</code> or <code>List[PIL.Image.Image]</code> or <code>List[List[PIL.Image.Image]]</code>) &#x2014;
The Adapter input condition. Adapter uses this input condition to generate guidance to Unet. If the
type is specified as <code>Torch.FloatTensor</code>, it is passed to Adapter as is. PIL.Image.Image\` can also be
accepted as an image. The control image is automatically resized to fit the output image.`,name:"image"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.height",description:`<strong>height</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The height in pixels of the generated image.`,name:"height"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.width",description:`<strong>width</strong> (<code>int</code>, <em>optional</em>, defaults to self.unet.config.sample_size * self.vae_scale_factor) &#x2014;
The width in pixels of the generated image.`,name:"width"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.num_inference_steps",description:`<strong>num_inference_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 50) &#x2014;
The number of denoising steps. More denoising steps usually lead to a higher quality image at the
expense of slower inference.`,name:"num_inference_steps"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.guidance_scale",description:`<strong>guidance_scale</strong> (<code>float</code>, <em>optional</em>, defaults to 7.5) &#x2014;
Guidance scale as defined in <a href="https://arxiv.org/abs/2207.12598" rel="nofollow">Classifier-Free Diffusion Guidance</a>.
<code>guidance_scale</code> is defined as <code>w</code> of equation 2. of <a href="https://arxiv.org/pdf/2205.11487.pdf" rel="nofollow">Imagen
Paper</a>. Guidance scale is enabled by setting <code>guidance_scale &gt; 1</code>. Higher guidance scale encourages to generate images that are closely linked to the text <code>prompt</code>,
usually at the expense of lower image quality.`,name:"guidance_scale"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.negative_prompt",description:`<strong>negative_prompt</strong> (<code>str</code> or <code>List[str]</code>, <em>optional</em>) &#x2014;
The prompt or prompts not to guide the image generation. If not defined, one has to pass
<code>negative_prompt_embeds</code>. instead. If not defined, one has to pass <code>negative_prompt_embeds</code>. instead.
Ignored when not using guidance (i.e., ignored if <code>guidance_scale</code> is less than <code>1</code>).`,name:"negative_prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.num_images_per_prompt",description:`<strong>num_images_per_prompt</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of images to generate per prompt.`,name:"num_images_per_prompt"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.eta",description:`<strong>eta</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
Corresponds to parameter eta (&#x3B7;) in the DDIM paper: <a href="https://arxiv.org/abs/2010.02502" rel="nofollow">https://arxiv.org/abs/2010.02502</a>. Only applies to
<a href="/docs/diffusers/main/en/api/schedulers/ddim#diffusers.DDIMScheduler">schedulers.DDIMScheduler</a>, will be ignored for others.`,name:"eta"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.generator",description:`<strong>generator</strong> (<code>torch.Generator</code> or <code>List[torch.Generator]</code>, <em>optional</em>) &#x2014;
One or a list of <a href="https://pytorch.org/docs/stable/generated/torch.Generator.html" rel="nofollow">torch generator(s)</a>
to make generation deterministic.`,name:"generator"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated noisy latents, sampled from a Gaussian distribution, to be used as inputs for image
generation. Can be used to tweak the same generation with different prompts. If not provided, a latents
tensor will ge generated by sampling using the supplied random <code>generator</code>.`,name:"latents"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.prompt_embeds",description:`<strong>prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt weighting. If not
provided, text embeddings will be generated from <code>prompt</code> input argument.`,name:"prompt_embeds"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.negative_prompt_embeds",description:`<strong>negative_prompt_embeds</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) &#x2014;
Pre-generated negative text embeddings. Can be used to easily tweak text inputs, <em>e.g.</em> prompt
weighting. If not provided, negative_prompt_embeds will be generated from <code>negative_prompt</code> input
argument.`,name:"negative_prompt_embeds"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.output_type",description:`<strong>output_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pil&quot;</code>) &#x2014;
The output format of the generate image. Choose between
<a href="https://pillow.readthedocs.io/en/stable/" rel="nofollow">PIL</a>: <code>PIL.Image.Image</code> or <code>np.array</code>.`,name:"output_type"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> instead
of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.callback",description:`<strong>callback</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
A function that will be called every <code>callback_steps</code> steps during inference. The function will be
called with the following arguments: <code>callback(step: int, timestep: int, latents: torch.FloatTensor)</code>.`,name:"callback"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.callback_steps",description:`<strong>callback_steps</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The frequency at which the <code>callback</code> function will be called. If not specified, the callback will be
called at every step.`,name:"callback_steps"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttnProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.adapter_conditioning_scale",description:`<strong>adapter_conditioning_scale</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The outputs of the adapter are multiplied by <code>adapter_conditioning_scale</code> before they are added to the
residual in the original unet. If multiple adapters are specified in init, you can set the
corresponding scale as a list.`,name:"adapter_conditioning_scale"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L560",returnDescription:`
<p><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> if <code>return_dict</code> is True, otherwise a
<code>tuple. When returning a tuple, the first element is a list with the generated images, and the second element is a list of </code>bool<code>s denoting whether the corresponding generated image likely represents "not-safe-for-work" (nsfw) content, according to the </code>safety_checker\`.</p>
`,returnType:`
<p><code>~pipelines.stable_diffusion.StableDiffusionAdapterPipelineOutput</code> or <code>tuple</code></p>
`}}),je=new xd({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.__call__.example",$$slots:{default:[Sm]},$$scope:{ctx:G}}}),aa=new ne({props:{name:"enable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing",parameters:[{name:"slice_size",val:": typing.Union[str, int, NoneType] = 'auto'"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code>, <em>optional</em>, defaults to <code>&quot;auto&quot;</code>) &#x2014;
When <code>&quot;auto&quot;</code>, halves the input to the attention heads, so attention will be computed in two steps. If
<code>&quot;max&quot;</code>, maximum amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1694"}}),Se=new Zm({props:{warning:!0,$$slots:{default:[Rm]},$$scope:{ctx:G}}}),Re=new xd({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_attention_slicing.example",$$slots:{default:[Pm]},$$scope:{ctx:G}}}),sa=new ne({props:{name:"disable_attention_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_attention_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1734"}}),ra=new ne({props:{name:"enable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L204"}}),na=new ne({props:{name:"disable_vae_slicing",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_vae_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L212"}}),la=new ne({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1633"}}),Ne=new Zm({props:{warning:!0,$$slots:{default:[Wm]},$$scope:{ctx:G}}}),Fe=new xd({props:{anchor:"diffusers.StableDiffusionAdapterPipeline.enable_xformers_memory_efficient_attention.example",$$slots:{default:[Bm]},$$scope:{ctx:G}}}),ca=new ne({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.StableDiffusionAdapterPipeline.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pipeline_utils.py#L1668"}}),ha=new ne({props:{name:"enable_model_cpu_offload",anchor:"diffusers.StableDiffusionAdapterPipeline.enable_model_cpu_offload",parameters:[{name:"gpu_id",val:" = 0"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/t2i_adapter/pipeline_stable_diffusion_adapter.py#L219"}}),{c(){h=s("meta"),U=i(),g=s("h1"),u=s("a"),J=s("span"),_(m.$$.fragment),M=i(),pe=s("span"),En=p("Text-to-Image Generation with Adapter Conditioning"),Qo=i(),H=s("h2"),de=s("a"),gs=s("span"),_(it.$$.fragment),An=i(),_s=s("span"),Un=p("Overview"),Xo=i(),lt=s("p"),pt=s("a"),Jn=p("T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models"),In=p(" by Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, Xiaohu Qie."),Yo=i(),_a=s("p"),$n=p("Using the pretrained models we can provide control images (for example, a depth map) to control Stable Diffusion text-to-image generation so that it follows the structure of the depth image and fills in the details."),zo=i(),va=s("p"),kn=p("The abstract of the paper is the following:"),Lo=i(),ba=s("p"),vs=s("em"),Zn=p("The incredible generative ability of large-scale text-to-image (T2I) models has demonstrated strong power of learning complex structures and meaningful semantics. However, relying solely on text prompts cannot fully take advantage of the knowledge learned by the model, especially when flexible and accurate structure control is needed. In this paper, we aim to \u201Cdig out\u201D the capabilities that T2I models have implicitly learned, and then explicitly use them to control the generation more granularly. Specifically, we propose to learn simple and small T2I-Adapters to align internal knowledge in T2I models with external control signals, while freezing the original large T2I models. In this way, we can train various adapters according to different conditions, and achieve rich control and editing effects. Further, the proposed T2I-Adapters have attractive properties of practical value, such as composability and generalization ability. Extensive experiments demonstrate that our T2I-Adapter has promising generation quality and a wide range of applications."),Ho=i(),ce=s("p"),Gn=p("This model was contributed by the community contributor "),dt=s("a"),Cn=p("HimariO"),xn=p(" \u2764\uFE0F ."),qo=i(),q=s("h2"),fe=s("a"),bs=s("span"),_(ct.$$.fragment),Dn=i(),ys=s("span"),jn=p("Available Pipelines:"),Oo=i(),me=s("table"),ws=s("thead"),O=s("tr"),Ts=s("th"),Sn=p("Pipeline"),Rn=i(),Ms=s("th"),Pn=p("Tasks"),Wn=i(),ya=s("th"),Bn=p("Demo"),Nn=i(),Es=s("tbody"),K=s("tr"),As=s("td"),ft=s("a"),Fn=p("StableDiffusionAdapterPipeline"),Vn=i(),Us=s("td"),Js=s("em"),Qn=p("Text-to-Image Generation with T2I-Adapter Conditioning"),Xn=i(),wa=s("td"),Yn=p("-"),Ko=i(),ee=s("h2"),he=s("a"),Is=s("span"),_(mt.$$.fragment),zn=i(),$s=s("span"),Ln=p("Usage example"),er=i(),ue=s("p"),Hn=p("In the following we give a simple example of how to use a "),ks=s("em"),qn=p("T2IAdapter"),On=p(` checkpoint with Diffusers for inference.
All adapters use the same pipeline.`),tr=i(),ge=s("ol"),ht=s("li"),Kn=p("Images are first converted into the appropriate "),Zs=s("em"),ei=p("control image"),ti=p(" format."),ai=i(),D=s("li"),si=p("The "),Gs=s("em"),oi=p("control image"),ri=p(" and "),Cs=s("em"),ni=p("prompt"),ii=p(" are passed to the "),Ta=s("a"),li=p("StableDiffusionAdapterPipeline"),pi=p("."),ar=i(),_e=s("p"),di=p("Let\u2019s have a look at a simple example using the "),ut=s("a"),ci=p("Color Adapter"),fi=p("."),sr=i(),_(gt.$$.fragment),or=i(),Ma=s("p"),Ea=s("img"),rr=i(),Aa=s("p"),mi=p("Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size."),nr=i(),_(_t.$$.fragment),ir=i(),Ua=s("p"),hi=p("Let\u2019s take a look at the processed image."),lr=i(),Ja=s("p"),Ia=s("img"),pr=i(),$a=s("p"),ui=p("Next, create the adapter pipeline"),dr=i(),_(vt.$$.fragment),cr=i(),ka=s("p"),gi=p("Finally, pass the prompt and control image to the pipeline"),fr=i(),_(bt.$$.fragment),mr=i(),Za=s("p"),Ga=s("img"),hr=i(),te=s("h2"),ve=s("a"),xs=s("span"),_(yt.$$.fragment),_i=i(),Ds=s("span"),vi=p("Available checkpoints"),ur=i(),be=s("p"),bi=p("Non-diffusers checkpoints can be found under "),wt=s("a"),yi=p("TencentARC/T2I-Adapter"),wi=p("."),gr=i(),ae=s("h3"),ye=s("a"),js=s("span"),_(Tt.$$.fragment),Ti=i(),Ss=s("span"),Mi=p("T2I-Adapter with Stable Diffusion 1.4"),_r=i(),we=s("table"),Rs=s("thead"),j=s("tr"),Ps=s("th"),Ei=p("Model Name"),Ai=i(),Ws=s("th"),Ui=p("Control Image Overview"),Ji=i(),Bs=s("th"),Ii=p("Control Image Example"),$i=i(),Ns=s("th"),ki=p("Generated Image Example"),Zi=i(),A=s("tbody"),S=s("tr"),Te=s("td"),Mt=s("a"),Gi=p("TencentARC/t2iadapter_color_sd14v1"),Ci=s("br"),xi=i(),Fs=s("em"),Di=p("Trained with spatial color palette"),ji=i(),Vs=s("td"),Si=p("A image with 8x8 color palette."),Ri=i(),Qs=s("td"),Ca=s("a"),Me=s("img"),Pi=i(),Xs=s("td"),xa=s("a"),Da=s("img"),Wi=i(),R=s("tr"),Ee=s("td"),Et=s("a"),Bi=p("TencentARC/t2iadapter_canny_sd14v1"),Ni=s("br"),Fi=i(),Ys=s("em"),Vi=p("Trained with canny edge detection"),Qi=i(),zs=s("td"),Xi=p("A monochrome image with white edges on a black background."),Yi=i(),Ls=s("td"),ja=s("a"),Ae=s("img"),zi=i(),Hs=s("td"),Sa=s("a"),Ra=s("img"),Li=i(),P=s("tr"),Ue=s("td"),At=s("a"),Hi=p("TencentARC/t2iadapter_sketch_sd14v1"),qi=s("br"),Oi=i(),Ut=s("em"),Ki=p("Trained with "),Jt=s("a"),el=p("PidiNet"),tl=p(" edge detection"),al=i(),qs=s("td"),sl=p("A hand-drawn monochrome image with white outlines on a black background."),ol=i(),Os=s("td"),Pa=s("a"),Je=s("img"),rl=i(),Ks=s("td"),Wa=s("a"),Ba=s("img"),nl=i(),W=s("tr"),Ie=s("td"),It=s("a"),il=p("TencentARC/t2iadapter_depth_sd14v1"),ll=s("br"),pl=i(),eo=s("em"),dl=p("Trained with Midas depth estimation"),cl=i(),to=s("td"),fl=p("A grayscale image with black representing deep areas and white representing shallow areas."),ml=i(),ao=s("td"),Na=s("a"),Fa=s("img"),hl=i(),so=s("td"),Va=s("a"),Qa=s("img"),ul=i(),B=s("tr"),$e=s("td"),$t=s("a"),gl=p("TencentARC/t2iadapter_openpose_sd14v1"),_l=s("br"),vl=i(),oo=s("em"),bl=p("Trained with OpenPose bone image"),yl=i(),kt=s("td"),wl=p("A "),Zt=s("a"),Tl=p("OpenPose bone"),Ml=p(" image."),El=i(),ro=s("td"),Xa=s("a"),Ya=s("img"),Al=i(),no=s("td"),za=s("a"),La=s("img"),Ul=i(),N=s("tr"),ke=s("td"),Gt=s("a"),Jl=p("TencentARC/t2iadapter_keypose_sd14v1"),Il=s("br"),$l=i(),io=s("em"),kl=p("Trained with mmpose skeleton image"),Zl=i(),Ct=s("td"),Gl=p("A "),xt=s("a"),Cl=p("mmpose skeleton"),xl=p(" image."),Dl=i(),lo=s("td"),Ha=s("a"),qa=s("img"),jl=i(),po=s("td"),Oa=s("a"),Ka=s("img"),Sl=i(),F=s("tr"),Dt=s("td"),jt=s("a"),Rl=p("TencentARC/t2iadapter_seg_sd14v1"),Pl=s("br"),co=s("em"),Wl=p("Trained with semantic segmentation"),Bl=i(),St=s("td"),Nl=p("An "),Rt=s("a"),Fl=p("custom"),Vl=p(" segmentation protocol image."),Ql=i(),fo=s("td"),es=s("a"),ts=s("img"),Xl=i(),mo=s("td"),as=s("a"),ss=s("img"),Yl=i(),V=s("tr"),ho=s("td"),Pt=s("a"),zl=p("TencentARC/t2iadapter_canny_sd15v2"),Ll=i(),vr=s("td"),Hl=i(),br=s("td"),ql=i(),yr=s("td"),Ol=i(),Q=s("tr"),uo=s("td"),Wt=s("a"),Kl=p("TencentARC/t2iadapter_depth_sd15v2"),ep=i(),wr=s("td"),tp=i(),Tr=s("td"),ap=i(),Mr=s("td"),sp=i(),X=s("tr"),go=s("td"),Bt=s("a"),op=p("TencentARC/t2iadapter_sketch_sd15v2"),rp=i(),Er=s("td"),np=i(),Ar=s("td"),ip=i(),Ur=s("td"),lp=i(),Y=s("tr"),_o=s("td"),Nt=s("a"),pp=p("TencentARC/t2iadapter_zoedepth_sd15v1"),dp=i(),Jr=s("td"),cp=i(),Ir=s("td"),fp=i(),$r=s("td"),kr=i(),se=s("h2"),Ze=s("a"),vo=s("span"),_(Ft.$$.fragment),mp=i(),bo=s("span"),hp=p("Combining multiple adapters"),Zr=i(),Vt=s("p"),yo=s("code"),up=p("MultiAdapter"),gp=p(" can be used for applying multiple conditionings at once."),Gr=i(),os=s("p"),_p=p("Here we use the keypose adapter for the character posture and the depth adapter for creating the scene."),Cr=i(),_(Qt.$$.fragment),xr=i(),rs=s("p"),vp=p("The two control images look as such:"),Dr=i(),Ge=s("p"),ns=s("img"),bp=i(),is=s("img"),jr=i(),Xt=s("p"),wo=s("code"),yp=p("MultiAdapter"),wp=p(" combines keypose and depth adapters."),Sr=i(),Yt=s("p"),To=s("code"),Tp=p("adapter_conditioning_scale"),Mp=p(" balances the relative influence of the different adapters."),Rr=i(),_(zt.$$.fragment),Pr=i(),ls=s("p"),ps=s("img"),Wr=i(),oe=s("h2"),Ce=s("a"),Mo=s("span"),_(Lt.$$.fragment),Ep=i(),Eo=s("span"),Ap=p("T2I Adapter vs ControlNet"),Br=i(),xe=s("p"),Up=p("T2I-Adapter is similar to "),Ht=s("a"),Jp=p("ControlNet"),Ip=p(`.
T2i-Adapter uses a smaller auxiliary network which is only run once for the entire diffusion process.
However, T2I-Adapter performs slightly worse than ControlNet.`),Nr=i(),re=s("h2"),De=s("a"),Ao=s("span"),_(qt.$$.fragment),$p=i(),Uo=s("span"),kp=p("StableDiffusionAdapterPipeline"),Fr=i(),E=s("div"),_(Ot.$$.fragment),Zp=i(),ds=s("p"),Gp=p(`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),Kt=s("a"),Cp=p("https://arxiv.org/abs/2302.08453"),xp=i(),ea=s("p"),Dp=p("This model inherits from "),cs=s("a"),jp=p("DiffusionPipeline"),Sp=p(`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),Rp=i(),z=s("div"),_(ta.$$.fragment),Pp=i(),Jo=s("p"),Wp=p("Function invoked when calling the pipeline for generation."),Bp=i(),_(je.$$.fragment),Np=i(),C=s("div"),_(aa.$$.fragment),Fp=i(),Io=s("p"),Vp=p(`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),Qp=i(),_(Se.$$.fragment),Xp=i(),_(Re.$$.fragment),Yp=i(),Pe=s("div"),_(sa.$$.fragment),zp=i(),oa=s("p"),Lp=p("Disable sliced attention computation. If "),$o=s("code"),Hp=p("enable_attention_slicing"),qp=p(` was previously called, attention is
computed in one step.`),Op=i(),We=s("div"),_(ra.$$.fragment),Kp=i(),ko=s("p"),ed=p(`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),td=i(),Be=s("div"),_(na.$$.fragment),ad=i(),ia=s("p"),sd=p("Disable sliced VAE decoding. If "),Zo=s("code"),od=p("enable_vae_slicing"),rd=p(` was previously enabled, this method will go back to
computing decoding in one step.`),nd=i(),x=s("div"),_(la.$$.fragment),id=i(),pa=s("p"),ld=p("Enable memory efficient attention from "),da=s("a"),pd=p("xFormers"),dd=p(`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),cd=i(),_(Ne.$$.fragment),fd=i(),_(Fe.$$.fragment),md=i(),Ve=s("div"),_(ca.$$.fragment),hd=i(),fa=s("p"),ud=p("Disable memory efficient attention from "),ma=s("a"),gd=p("xFormers"),_d=p("."),vd=i(),Qe=s("div"),_(ha.$$.fragment),bd=i(),Z=s("p"),yd=p(`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Go=s("code"),wd=p("enable_sequential_cpu_offload"),Td=p(", this method moves one whole model at a time to the GPU when its "),Co=s("code"),Md=p("forward"),Ed=p(`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),xo=s("code"),Ad=p("enable_sequential_cpu_offload"),Ud=p(", but performance is much better due to the iterative execution of the "),Do=s("code"),Jd=p("unet"),Id=p("."),this.h()},l(t){const c=Dm('[data-svelte="svelte-1phssyn"]',document.head);h=o(c,"META",{name:!0,content:!0}),c.forEach(a),U=l(t),g=o(t,"H1",{class:!0});var ua=r(g);u=o(ua,"A",{id:!0,class:!0,href:!0});var jo=r(u);J=o(jo,"SPAN",{});var So=r(J);v(m.$$.fragment,So),So.forEach(a),jo.forEach(a),M=l(ua),pe=o(ua,"SPAN",{});var Ro=r(pe);En=d(Ro,"Text-to-Image Generation with Adapter Conditioning"),Ro.forEach(a),ua.forEach(a),Qo=l(t),H=o(t,"H2",{class:!0});var ga=r(H);de=o(ga,"A",{id:!0,class:!0,href:!0});var ac=r(de);gs=o(ac,"SPAN",{});var sc=r(gs);v(it.$$.fragment,sc),sc.forEach(a),ac.forEach(a),An=l(ga),_s=o(ga,"SPAN",{});var oc=r(_s);Un=d(oc,"Overview"),oc.forEach(a),ga.forEach(a),Xo=l(t),lt=o(t,"P",{});var $d=r(lt);pt=o($d,"A",{href:!0,rel:!0});var rc=r(pt);Jn=d(rc,"T2I-Adapter: Learning Adapters to Dig out More Controllable Ability for Text-to-Image Diffusion Models"),rc.forEach(a),In=d($d," by Chong Mou, Xintao Wang, Liangbin Xie, Jian Zhang, Zhongang Qi, Ying Shan, Xiaohu Qie."),$d.forEach(a),Yo=l(t),_a=o(t,"P",{});var nc=r(_a);$n=d(nc,"Using the pretrained models we can provide control images (for example, a depth map) to control Stable Diffusion text-to-image generation so that it follows the structure of the depth image and fills in the details."),nc.forEach(a),zo=l(t),va=o(t,"P",{});var ic=r(va);kn=d(ic,"The abstract of the paper is the following:"),ic.forEach(a),Lo=l(t),ba=o(t,"P",{});var lc=r(ba);vs=o(lc,"EM",{});var pc=r(vs);Zn=d(pc,"The incredible generative ability of large-scale text-to-image (T2I) models has demonstrated strong power of learning complex structures and meaningful semantics. However, relying solely on text prompts cannot fully take advantage of the knowledge learned by the model, especially when flexible and accurate structure control is needed. In this paper, we aim to \u201Cdig out\u201D the capabilities that T2I models have implicitly learned, and then explicitly use them to control the generation more granularly. Specifically, we propose to learn simple and small T2I-Adapters to align internal knowledge in T2I models with external control signals, while freezing the original large T2I models. In this way, we can train various adapters according to different conditions, and achieve rich control and editing effects. Further, the proposed T2I-Adapters have attractive properties of practical value, such as composability and generalization ability. Extensive experiments demonstrate that our T2I-Adapter has promising generation quality and a wide range of applications."),pc.forEach(a),lc.forEach(a),Ho=l(t),ce=o(t,"P",{});var Qr=r(ce);Gn=d(Qr,"This model was contributed by the community contributor "),dt=o(Qr,"A",{href:!0,rel:!0});var dc=r(dt);Cn=d(dc,"HimariO"),dc.forEach(a),xn=d(Qr," \u2764\uFE0F ."),Qr.forEach(a),qo=l(t),q=o(t,"H2",{class:!0});var Xr=r(q);fe=o(Xr,"A",{id:!0,class:!0,href:!0});var cc=r(fe);bs=o(cc,"SPAN",{});var fc=r(bs);v(ct.$$.fragment,fc),fc.forEach(a),cc.forEach(a),Dn=l(Xr),ys=o(Xr,"SPAN",{});var mc=r(ys);jn=d(mc,"Available Pipelines:"),mc.forEach(a),Xr.forEach(a),Oo=l(t),me=o(t,"TABLE",{});var Yr=r(me);ws=o(Yr,"THEAD",{});var hc=r(ws);O=o(hc,"TR",{});var fs=r(O);Ts=o(fs,"TH",{});var uc=r(Ts);Sn=d(uc,"Pipeline"),uc.forEach(a),Rn=l(fs),Ms=o(fs,"TH",{});var gc=r(Ms);Pn=d(gc,"Tasks"),gc.forEach(a),Wn=l(fs),ya=o(fs,"TH",{align:!0});var _c=r(ya);Bn=d(_c,"Demo"),_c.forEach(a),fs.forEach(a),hc.forEach(a),Nn=l(Yr),Es=o(Yr,"TBODY",{});var vc=r(Es);K=o(vc,"TR",{});var ms=r(K);As=o(ms,"TD",{});var bc=r(As);ft=o(bc,"A",{href:!0,rel:!0});var yc=r(ft);Fn=d(yc,"StableDiffusionAdapterPipeline"),yc.forEach(a),bc.forEach(a),Vn=l(ms),Us=o(ms,"TD",{});var wc=r(Us);Js=o(wc,"EM",{});var Tc=r(Js);Qn=d(Tc,"Text-to-Image Generation with T2I-Adapter Conditioning"),Tc.forEach(a),wc.forEach(a),Xn=l(ms),wa=o(ms,"TD",{align:!0});var Mc=r(wa);Yn=d(Mc,"-"),Mc.forEach(a),ms.forEach(a),vc.forEach(a),Yr.forEach(a),Ko=l(t),ee=o(t,"H2",{class:!0});var zr=r(ee);he=o(zr,"A",{id:!0,class:!0,href:!0});var Ec=r(he);Is=o(Ec,"SPAN",{});var Ac=r(Is);v(mt.$$.fragment,Ac),Ac.forEach(a),Ec.forEach(a),zn=l(zr),$s=o(zr,"SPAN",{});var Uc=r($s);Ln=d(Uc,"Usage example"),Uc.forEach(a),zr.forEach(a),er=l(t),ue=o(t,"P",{});var Lr=r(ue);Hn=d(Lr,"In the following we give a simple example of how to use a "),ks=o(Lr,"EM",{});var Jc=r(ks);qn=d(Jc,"T2IAdapter"),Jc.forEach(a),On=d(Lr,` checkpoint with Diffusers for inference.
All adapters use the same pipeline.`),Lr.forEach(a),tr=l(t),ge=o(t,"OL",{});var Hr=r(ge);ht=o(Hr,"LI",{});var qr=r(ht);Kn=d(qr,"Images are first converted into the appropriate "),Zs=o(qr,"EM",{});var Ic=r(Zs);ei=d(Ic,"control image"),Ic.forEach(a),ti=d(qr," format."),qr.forEach(a),ai=l(Hr),D=o(Hr,"LI",{});var Xe=r(D);si=d(Xe,"The "),Gs=o(Xe,"EM",{});var $c=r(Gs);oi=d($c,"control image"),$c.forEach(a),ri=d(Xe," and "),Cs=o(Xe,"EM",{});var kc=r(Cs);ni=d(kc,"prompt"),kc.forEach(a),ii=d(Xe," are passed to the "),Ta=o(Xe,"A",{href:!0});var Zc=r(Ta);li=d(Zc,"StableDiffusionAdapterPipeline"),Zc.forEach(a),pi=d(Xe,"."),Xe.forEach(a),Hr.forEach(a),ar=l(t),_e=o(t,"P",{});var Or=r(_e);di=d(Or,"Let\u2019s have a look at a simple example using the "),ut=o(Or,"A",{href:!0,rel:!0});var Gc=r(ut);ci=d(Gc,"Color Adapter"),Gc.forEach(a),fi=d(Or,"."),Or.forEach(a),sr=l(t),v(gt.$$.fragment,t),or=l(t),Ma=o(t,"P",{});var Cc=r(Ma);Ea=o(Cc,"IMG",{src:!0,alt:!0}),Cc.forEach(a),rr=l(t),Aa=o(t,"P",{});var xc=r(Aa);mi=d(xc,"Then we can create our color palette by simply resizing it to 8 by 8 pixels and then scaling it back to original size."),xc.forEach(a),nr=l(t),v(_t.$$.fragment,t),ir=l(t),Ua=o(t,"P",{});var Dc=r(Ua);hi=d(Dc,"Let\u2019s take a look at the processed image."),Dc.forEach(a),lr=l(t),Ja=o(t,"P",{});var jc=r(Ja);Ia=o(jc,"IMG",{src:!0,alt:!0}),jc.forEach(a),pr=l(t),$a=o(t,"P",{});var Sc=r($a);ui=d(Sc,"Next, create the adapter pipeline"),Sc.forEach(a),dr=l(t),v(vt.$$.fragment,t),cr=l(t),ka=o(t,"P",{});var Rc=r(ka);gi=d(Rc,"Finally, pass the prompt and control image to the pipeline"),Rc.forEach(a),fr=l(t),v(bt.$$.fragment,t),mr=l(t),Za=o(t,"P",{});var Pc=r(Za);Ga=o(Pc,"IMG",{src:!0,alt:!0}),Pc.forEach(a),hr=l(t),te=o(t,"H2",{class:!0});var Kr=r(te);ve=o(Kr,"A",{id:!0,class:!0,href:!0});var Wc=r(ve);xs=o(Wc,"SPAN",{});var Bc=r(xs);v(yt.$$.fragment,Bc),Bc.forEach(a),Wc.forEach(a),_i=l(Kr),Ds=o(Kr,"SPAN",{});var Nc=r(Ds);vi=d(Nc,"Available checkpoints"),Nc.forEach(a),Kr.forEach(a),ur=l(t),be=o(t,"P",{});var en=r(be);bi=d(en,"Non-diffusers checkpoints can be found under "),wt=o(en,"A",{href:!0,rel:!0});var Fc=r(wt);yi=d(Fc,"TencentARC/T2I-Adapter"),Fc.forEach(a),wi=d(en,"."),en.forEach(a),gr=l(t),ae=o(t,"H3",{class:!0});var tn=r(ae);ye=o(tn,"A",{id:!0,class:!0,href:!0});var Vc=r(ye);js=o(Vc,"SPAN",{});var Qc=r(js);v(Tt.$$.fragment,Qc),Qc.forEach(a),Vc.forEach(a),Ti=l(tn),Ss=o(tn,"SPAN",{});var Xc=r(Ss);Mi=d(Xc,"T2I-Adapter with Stable Diffusion 1.4"),Xc.forEach(a),tn.forEach(a),_r=l(t),we=o(t,"TABLE",{});var an=r(we);Rs=o(an,"THEAD",{});var Yc=r(Rs);j=o(Yc,"TR",{});var Ye=r(j);Ps=o(Ye,"TH",{});var zc=r(Ps);Ei=d(zc,"Model Name"),zc.forEach(a),Ai=l(Ye),Ws=o(Ye,"TH",{});var Lc=r(Ws);Ui=d(Lc,"Control Image Overview"),Lc.forEach(a),Ji=l(Ye),Bs=o(Ye,"TH",{});var Hc=r(Bs);Ii=d(Hc,"Control Image Example"),Hc.forEach(a),$i=l(Ye),Ns=o(Ye,"TH",{});var qc=r(Ns);ki=d(qc,"Generated Image Example"),qc.forEach(a),Ye.forEach(a),Yc.forEach(a),Zi=l(an),A=o(an,"TBODY",{});var I=r(A);S=o(I,"TR",{});var ze=r(S);Te=o(ze,"TD",{});var Po=r(Te);Mt=o(Po,"A",{href:!0,rel:!0});var Oc=r(Mt);Gi=d(Oc,"TencentARC/t2iadapter_color_sd14v1"),Oc.forEach(a),Ci=o(Po,"BR",{}),xi=l(Po),Fs=o(Po,"EM",{});var Kc=r(Fs);Di=d(Kc,"Trained with spatial color palette"),Kc.forEach(a),Po.forEach(a),ji=l(ze),Vs=o(ze,"TD",{});var ef=r(Vs);Si=d(ef,"A image with 8x8 color palette."),ef.forEach(a),Ri=l(ze),Qs=o(ze,"TD",{});var tf=r(Qs);Ca=o(tf,"A",{href:!0});var af=r(Ca);Me=o(af,"IMG",{width:!0,style:!0,src:!0}),af.forEach(a),tf.forEach(a),Pi=l(ze),Xs=o(ze,"TD",{});var sf=r(Xs);xa=o(sf,"A",{href:!0});var of=r(xa);Da=o(of,"IMG",{width:!0,src:!0}),of.forEach(a),sf.forEach(a),ze.forEach(a),Wi=l(I),R=o(I,"TR",{});var Le=r(R);Ee=o(Le,"TD",{});var Wo=r(Ee);Et=o(Wo,"A",{href:!0,rel:!0});var rf=r(Et);Bi=d(rf,"TencentARC/t2iadapter_canny_sd14v1"),rf.forEach(a),Ni=o(Wo,"BR",{}),Fi=l(Wo),Ys=o(Wo,"EM",{});var nf=r(Ys);Vi=d(nf,"Trained with canny edge detection"),nf.forEach(a),Wo.forEach(a),Qi=l(Le),zs=o(Le,"TD",{});var lf=r(zs);Xi=d(lf,"A monochrome image with white edges on a black background."),lf.forEach(a),Yi=l(Le),Ls=o(Le,"TD",{});var pf=r(Ls);ja=o(pf,"A",{href:!0});var df=r(ja);Ae=o(df,"IMG",{width:!0,style:!0,src:!0}),df.forEach(a),pf.forEach(a),zi=l(Le),Hs=o(Le,"TD",{});var cf=r(Hs);Sa=o(cf,"A",{href:!0});var ff=r(Sa);Ra=o(ff,"IMG",{width:!0,src:!0}),ff.forEach(a),cf.forEach(a),Le.forEach(a),Li=l(I),P=o(I,"TR",{});var He=r(P);Ue=o(He,"TD",{});var Bo=r(Ue);At=o(Bo,"A",{href:!0,rel:!0});var mf=r(At);Hi=d(mf,"TencentARC/t2iadapter_sketch_sd14v1"),mf.forEach(a),qi=o(Bo,"BR",{}),Oi=l(Bo),Ut=o(Bo,"EM",{});var sn=r(Ut);Ki=d(sn,"Trained with "),Jt=o(sn,"A",{href:!0,rel:!0});var hf=r(Jt);el=d(hf,"PidiNet"),hf.forEach(a),tl=d(sn," edge detection"),sn.forEach(a),Bo.forEach(a),al=l(He),qs=o(He,"TD",{});var uf=r(qs);sl=d(uf,"A hand-drawn monochrome image with white outlines on a black background."),uf.forEach(a),ol=l(He),Os=o(He,"TD",{});var gf=r(Os);Pa=o(gf,"A",{href:!0});var _f=r(Pa);Je=o(_f,"IMG",{width:!0,style:!0,src:!0}),_f.forEach(a),gf.forEach(a),rl=l(He),Ks=o(He,"TD",{});var vf=r(Ks);Wa=o(vf,"A",{href:!0});var bf=r(Wa);Ba=o(bf,"IMG",{width:!0,src:!0}),bf.forEach(a),vf.forEach(a),He.forEach(a),nl=l(I),W=o(I,"TR",{});var qe=r(W);Ie=o(qe,"TD",{});var No=r(Ie);It=o(No,"A",{href:!0,rel:!0});var yf=r(It);il=d(yf,"TencentARC/t2iadapter_depth_sd14v1"),yf.forEach(a),ll=o(No,"BR",{}),pl=l(No),eo=o(No,"EM",{});var wf=r(eo);dl=d(wf,"Trained with Midas depth estimation"),wf.forEach(a),No.forEach(a),cl=l(qe),to=o(qe,"TD",{});var Tf=r(to);fl=d(Tf,"A grayscale image with black representing deep areas and white representing shallow areas."),Tf.forEach(a),ml=l(qe),ao=o(qe,"TD",{});var Mf=r(ao);Na=o(Mf,"A",{href:!0});var Ef=r(Na);Fa=o(Ef,"IMG",{width:!0,src:!0}),Ef.forEach(a),Mf.forEach(a),hl=l(qe),so=o(qe,"TD",{});var Af=r(so);Va=o(Af,"A",{href:!0});var Uf=r(Va);Qa=o(Uf,"IMG",{width:!0,src:!0}),Uf.forEach(a),Af.forEach(a),qe.forEach(a),ul=l(I),B=o(I,"TR",{});var Oe=r(B);$e=o(Oe,"TD",{});var Fo=r($e);$t=o(Fo,"A",{href:!0,rel:!0});var Jf=r($t);gl=d(Jf,"TencentARC/t2iadapter_openpose_sd14v1"),Jf.forEach(a),_l=o(Fo,"BR",{}),vl=l(Fo),oo=o(Fo,"EM",{});var If=r(oo);bl=d(If,"Trained with OpenPose bone image"),If.forEach(a),Fo.forEach(a),yl=l(Oe),kt=o(Oe,"TD",{});var on=r(kt);wl=d(on,"A "),Zt=o(on,"A",{href:!0,rel:!0});var $f=r(Zt);Tl=d($f,"OpenPose bone"),$f.forEach(a),Ml=d(on," image."),on.forEach(a),El=l(Oe),ro=o(Oe,"TD",{});var kf=r(ro);Xa=o(kf,"A",{href:!0});var Zf=r(Xa);Ya=o(Zf,"IMG",{width:!0,src:!0}),Zf.forEach(a),kf.forEach(a),Al=l(Oe),no=o(Oe,"TD",{});var Gf=r(no);za=o(Gf,"A",{href:!0});var Cf=r(za);La=o(Cf,"IMG",{width:!0,src:!0}),Cf.forEach(a),Gf.forEach(a),Oe.forEach(a),Ul=l(I),N=o(I,"TR",{});var Ke=r(N);ke=o(Ke,"TD",{});var Vo=r(ke);Gt=o(Vo,"A",{href:!0,rel:!0});var xf=r(Gt);Jl=d(xf,"TencentARC/t2iadapter_keypose_sd14v1"),xf.forEach(a),Il=o(Vo,"BR",{}),$l=l(Vo),io=o(Vo,"EM",{});var Df=r(io);kl=d(Df,"Trained with mmpose skeleton image"),Df.forEach(a),Vo.forEach(a),Zl=l(Ke),Ct=o(Ke,"TD",{});var rn=r(Ct);Gl=d(rn,"A "),xt=o(rn,"A",{href:!0,rel:!0});var jf=r(xt);Cl=d(jf,"mmpose skeleton"),jf.forEach(a),xl=d(rn," image."),rn.forEach(a),Dl=l(Ke),lo=o(Ke,"TD",{});var Sf=r(lo);Ha=o(Sf,"A",{href:!0});var Rf=r(Ha);qa=o(Rf,"IMG",{width:!0,src:!0}),Rf.forEach(a),Sf.forEach(a),jl=l(Ke),po=o(Ke,"TD",{});var Pf=r(po);Oa=o(Pf,"A",{href:!0});var Wf=r(Oa);Ka=o(Wf,"IMG",{width:!0,src:!0}),Wf.forEach(a),Pf.forEach(a),Ke.forEach(a),Sl=l(I),F=o(I,"TR",{});var et=r(F);Dt=o(et,"TD",{});var nn=r(Dt);jt=o(nn,"A",{href:!0,rel:!0});var Bf=r(jt);Rl=d(Bf,"TencentARC/t2iadapter_seg_sd14v1"),Bf.forEach(a),Pl=o(nn,"BR",{}),co=o(nn,"EM",{});var Nf=r(co);Wl=d(Nf,"Trained with semantic segmentation"),Nf.forEach(a),nn.forEach(a),Bl=l(et),St=o(et,"TD",{});var ln=r(St);Nl=d(ln,"An "),Rt=o(ln,"A",{href:!0,rel:!0});var Ff=r(Rt);Fl=d(Ff,"custom"),Ff.forEach(a),Vl=d(ln," segmentation protocol image."),ln.forEach(a),Ql=l(et),fo=o(et,"TD",{});var Vf=r(fo);es=o(Vf,"A",{href:!0});var Qf=r(es);ts=o(Qf,"IMG",{width:!0,src:!0}),Qf.forEach(a),Vf.forEach(a),Xl=l(et),mo=o(et,"TD",{});var Xf=r(mo);as=o(Xf,"A",{href:!0});var Yf=r(as);ss=o(Yf,"IMG",{width:!0,src:!0}),Yf.forEach(a),Xf.forEach(a),et.forEach(a),Yl=l(I),V=o(I,"TR",{});var tt=r(V);ho=o(tt,"TD",{});var zf=r(ho);Pt=o(zf,"A",{href:!0,rel:!0});var Lf=r(Pt);zl=d(Lf,"TencentARC/t2iadapter_canny_sd15v2"),Lf.forEach(a),zf.forEach(a),Ll=l(tt),vr=o(tt,"TD",{}),r(vr).forEach(a),Hl=l(tt),br=o(tt,"TD",{}),r(br).forEach(a),ql=l(tt),yr=o(tt,"TD",{}),r(yr).forEach(a),tt.forEach(a),Ol=l(I),Q=o(I,"TR",{});var at=r(Q);uo=o(at,"TD",{});var Hf=r(uo);Wt=o(Hf,"A",{href:!0,rel:!0});var qf=r(Wt);Kl=d(qf,"TencentARC/t2iadapter_depth_sd15v2"),qf.forEach(a),Hf.forEach(a),ep=l(at),wr=o(at,"TD",{}),r(wr).forEach(a),tp=l(at),Tr=o(at,"TD",{}),r(Tr).forEach(a),ap=l(at),Mr=o(at,"TD",{}),r(Mr).forEach(a),at.forEach(a),sp=l(I),X=o(I,"TR",{});var st=r(X);go=o(st,"TD",{});var Of=r(go);Bt=o(Of,"A",{href:!0,rel:!0});var Kf=r(Bt);op=d(Kf,"TencentARC/t2iadapter_sketch_sd15v2"),Kf.forEach(a),Of.forEach(a),rp=l(st),Er=o(st,"TD",{}),r(Er).forEach(a),np=l(st),Ar=o(st,"TD",{}),r(Ar).forEach(a),ip=l(st),Ur=o(st,"TD",{}),r(Ur).forEach(a),st.forEach(a),lp=l(I),Y=o(I,"TR",{});var ot=r(Y);_o=o(ot,"TD",{});var em=r(_o);Nt=o(em,"A",{href:!0,rel:!0});var tm=r(Nt);pp=d(tm,"TencentARC/t2iadapter_zoedepth_sd15v1"),tm.forEach(a),em.forEach(a),dp=l(ot),Jr=o(ot,"TD",{}),r(Jr).forEach(a),cp=l(ot),Ir=o(ot,"TD",{}),r(Ir).forEach(a),fp=l(ot),$r=o(ot,"TD",{}),r($r).forEach(a),ot.forEach(a),I.forEach(a),an.forEach(a),kr=l(t),se=o(t,"H2",{class:!0});var pn=r(se);Ze=o(pn,"A",{id:!0,class:!0,href:!0});var am=r(Ze);vo=o(am,"SPAN",{});var sm=r(vo);v(Ft.$$.fragment,sm),sm.forEach(a),am.forEach(a),mp=l(pn),bo=o(pn,"SPAN",{});var om=r(bo);hp=d(om,"Combining multiple adapters"),om.forEach(a),pn.forEach(a),Zr=l(t),Vt=o(t,"P",{});var kd=r(Vt);yo=o(kd,"CODE",{});var rm=r(yo);up=d(rm,"MultiAdapter"),rm.forEach(a),gp=d(kd," can be used for applying multiple conditionings at once."),kd.forEach(a),Gr=l(t),os=o(t,"P",{});var nm=r(os);_p=d(nm,"Here we use the keypose adapter for the character posture and the depth adapter for creating the scene."),nm.forEach(a),Cr=l(t),v(Qt.$$.fragment,t),xr=l(t),rs=o(t,"P",{});var im=r(rs);vp=d(im,"The two control images look as such:"),im.forEach(a),Dr=l(t),Ge=o(t,"P",{});var dn=r(Ge);ns=o(dn,"IMG",{src:!0,alt:!0}),bp=l(dn),is=o(dn,"IMG",{src:!0,alt:!0}),dn.forEach(a),jr=l(t),Xt=o(t,"P",{});var Zd=r(Xt);wo=o(Zd,"CODE",{});var lm=r(wo);yp=d(lm,"MultiAdapter"),lm.forEach(a),wp=d(Zd," combines keypose and depth adapters."),Zd.forEach(a),Sr=l(t),Yt=o(t,"P",{});var Gd=r(Yt);To=o(Gd,"CODE",{});var pm=r(To);Tp=d(pm,"adapter_conditioning_scale"),pm.forEach(a),Mp=d(Gd," balances the relative influence of the different adapters."),Gd.forEach(a),Rr=l(t),v(zt.$$.fragment,t),Pr=l(t),ls=o(t,"P",{});var dm=r(ls);ps=o(dm,"IMG",{src:!0,alt:!0}),dm.forEach(a),Wr=l(t),oe=o(t,"H2",{class:!0});var cn=r(oe);Ce=o(cn,"A",{id:!0,class:!0,href:!0});var cm=r(Ce);Mo=o(cm,"SPAN",{});var fm=r(Mo);v(Lt.$$.fragment,fm),fm.forEach(a),cm.forEach(a),Ep=l(cn),Eo=o(cn,"SPAN",{});var mm=r(Eo);Ap=d(mm,"T2I Adapter vs ControlNet"),mm.forEach(a),cn.forEach(a),Br=l(t),xe=o(t,"P",{});var fn=r(xe);Up=d(fn,"T2I-Adapter is similar to "),Ht=o(fn,"A",{href:!0,rel:!0});var hm=r(Ht);Jp=d(hm,"ControlNet"),hm.forEach(a),Ip=d(fn,`.
T2i-Adapter uses a smaller auxiliary network which is only run once for the entire diffusion process.
However, T2I-Adapter performs slightly worse than ControlNet.`),fn.forEach(a),Nr=l(t),re=o(t,"H2",{class:!0});var mn=r(re);De=o(mn,"A",{id:!0,class:!0,href:!0});var um=r(De);Ao=o(um,"SPAN",{});var gm=r(Ao);v(qt.$$.fragment,gm),gm.forEach(a),um.forEach(a),$p=l(mn),Uo=o(mn,"SPAN",{});var _m=r(Uo);kp=d(_m,"StableDiffusionAdapterPipeline"),_m.forEach(a),mn.forEach(a),Fr=l(t),E=o(t,"DIV",{class:!0});var $=r(E);v(Ot.$$.fragment,$),Zp=l($),ds=o($,"P",{});var Cd=r(ds);Gp=d(Cd,`Pipeline for text-to-image generation using Stable Diffusion augmented with T2I-Adapter
`),Kt=o(Cd,"A",{href:!0,rel:!0});var vm=r(Kt);Cp=d(vm,"https://arxiv.org/abs/2302.08453"),vm.forEach(a),Cd.forEach(a),xp=l($),ea=o($,"P",{});var hn=r(ea);Dp=d(hn,"This model inherits from "),cs=o(hn,"A",{href:!0});var bm=r(cs);jp=d(bm,"DiffusionPipeline"),bm.forEach(a),Sp=d(hn,`. Check the superclass documentation for the generic methods the
library implements for all the pipelines (such as downloading or saving, running on a particular device, etc.)`),hn.forEach(a),Rp=l($),z=o($,"DIV",{class:!0});var hs=r(z);v(ta.$$.fragment,hs),Pp=l(hs),Jo=o(hs,"P",{});var ym=r(Jo);Wp=d(ym,"Function invoked when calling the pipeline for generation."),ym.forEach(a),Bp=l(hs),v(je.$$.fragment,hs),hs.forEach(a),Np=l($),C=o($,"DIV",{class:!0});var rt=r(C);v(aa.$$.fragment,rt),Fp=l(rt),Io=o(rt,"P",{});var wm=r(Io);Vp=d(wm,`Enable sliced attention computation. When this option is enabled, the attention module splits the input tensor
in slices to compute attention in several steps. For more than one attention head, the computation is performed
sequentially over each head. This is useful to save some memory in exchange for a small speed decrease.`),wm.forEach(a),Qp=l(rt),v(Se.$$.fragment,rt),Xp=l(rt),v(Re.$$.fragment,rt),rt.forEach(a),Yp=l($),Pe=o($,"DIV",{class:!0});var un=r(Pe);v(sa.$$.fragment,un),zp=l(un),oa=o(un,"P",{});var gn=r(oa);Lp=d(gn,"Disable sliced attention computation. If "),$o=o(gn,"CODE",{});var Tm=r($o);Hp=d(Tm,"enable_attention_slicing"),Tm.forEach(a),qp=d(gn,` was previously called, attention is
computed in one step.`),gn.forEach(a),un.forEach(a),Op=l($),We=o($,"DIV",{class:!0});var _n=r(We);v(ra.$$.fragment,_n),Kp=l(_n),ko=o(_n,"P",{});var Mm=r(ko);ed=d(Mm,`Enable sliced VAE decoding. When this option is enabled, the VAE will split the input tensor in slices to
compute decoding in several steps. This is useful to save some memory and allow larger batch sizes.`),Mm.forEach(a),_n.forEach(a),td=l($),Be=o($,"DIV",{class:!0});var vn=r(Be);v(na.$$.fragment,vn),ad=l(vn),ia=o(vn,"P",{});var bn=r(ia);sd=d(bn,"Disable sliced VAE decoding. If "),Zo=o(bn,"CODE",{});var Em=r(Zo);od=d(Em,"enable_vae_slicing"),Em.forEach(a),rd=d(bn,` was previously enabled, this method will go back to
computing decoding in one step.`),bn.forEach(a),vn.forEach(a),nd=l($),x=o($,"DIV",{class:!0});var nt=r(x);v(la.$$.fragment,nt),id=l(nt),pa=o(nt,"P",{});var yn=r(pa);ld=d(yn,"Enable memory efficient attention from "),da=o(yn,"A",{href:!0,rel:!0});var Am=r(da);pd=d(Am,"xFormers"),Am.forEach(a),dd=d(yn,`. When this
option is enabled, you should observe lower GPU memory usage and a potential speed up during inference. Speed
up during training is not guaranteed.`),yn.forEach(a),cd=l(nt),v(Ne.$$.fragment,nt),fd=l(nt),v(Fe.$$.fragment,nt),nt.forEach(a),md=l($),Ve=o($,"DIV",{class:!0});var wn=r(Ve);v(ca.$$.fragment,wn),hd=l(wn),fa=o(wn,"P",{});var Tn=r(fa);ud=d(Tn,"Disable memory efficient attention from "),ma=o(Tn,"A",{href:!0,rel:!0});var Um=r(ma);gd=d(Um,"xFormers"),Um.forEach(a),_d=d(Tn,"."),Tn.forEach(a),wn.forEach(a),vd=l($),Qe=o($,"DIV",{class:!0});var Mn=r(Qe);v(ha.$$.fragment,Mn),bd=l(Mn),Z=o(Mn,"P",{});var L=r(Z);yd=d(L,`Offloads all models to CPU using accelerate, reducing memory usage with a low impact on performance. Compared
to `),Go=o(L,"CODE",{});var Jm=r(Go);wd=d(Jm,"enable_sequential_cpu_offload"),Jm.forEach(a),Td=d(L,", this method moves one whole model at a time to the GPU when its "),Co=o(L,"CODE",{});var Im=r(Co);Md=d(Im,"forward"),Im.forEach(a),Ed=d(L,`
method is called, and the model remains in GPU until the next model runs. Memory savings are lower than with
`),xo=o(L,"CODE",{});var $m=r(xo);Ad=d($m,"enable_sequential_cpu_offload"),$m.forEach(a),Ud=d(L,", but performance is much better due to the iterative execution of the "),Do=o(L,"CODE",{});var km=r(Do);Jd=d(km,"unet"),km.forEach(a),Id=d(L,"."),L.forEach(a),Mn.forEach(a),$.forEach(a),this.h()},h(){n(h,"name","hf:doc:metadata"),n(h,"content",JSON.stringify(Fm)),n(u,"id","texttoimage-generation-with-adapter-conditioning"),n(u,"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(u,"href","#texttoimage-generation-with-adapter-conditioning"),n(g,"class","relative group"),n(de,"id","overview"),n(de,"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(de,"href","#overview"),n(H,"class","relative group"),n(pt,"href","https://arxiv.org/abs/2302.08453"),n(pt,"rel","nofollow"),n(dt,"href","https://github.com/HimariO"),n(dt,"rel","nofollow"),n(fe,"id","available-pipelines"),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","#available-pipelines"),n(q,"class","relative group"),n(ya,"align","center"),n(ft,"href","https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_adapter.py"),n(ft,"rel","nofollow"),n(wa,"align","center"),n(he,"id","usage-example"),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","#usage-example"),n(ee,"class","relative group"),n(Ta,"href","/docs/diffusers/main/en/api/pipelines/stable_diffusion/adapter#diffusers.StableDiffusionAdapterPipeline"),n(ut,"href","https://huggingface.co/TencentARC/t2iadapter_color_sd14v1"),n(ut,"rel","nofollow"),k(Ea.src,jd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_ref.png")||n(Ea,"src",jd),n(Ea,"alt","img"),k(Ia.src,Sd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_palette.png")||n(Ia,"src",Sd),n(Ia,"alt","img"),k(Ga.src,Rd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_output.png")||n(Ga,"src",Rd),n(Ga,"alt","img"),n(ve,"id","available-checkpoints"),n(ve,"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(ve,"href","#available-checkpoints"),n(te,"class","relative group"),n(wt,"href","https://huggingface.co/TencentARC/T2I-Adapter/tree/main/models"),n(wt,"rel","nofollow"),n(ye,"id","t2iadapter-with-stable-diffusion-14"),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","#t2iadapter-with-stable-diffusion-14"),n(ae,"class","relative group"),n(Mt,"href","https://huggingface.co/TencentARC/t2iadapter_color_sd14v1"),n(Mt,"rel","nofollow"),n(Me,"width","64"),us(Me,"margin","0"),us(Me,"padding","0"),k(Me.src,Pd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png")||n(Me,"src",Pd),n(Ca,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_input.png"),n(Da,"width","64"),k(Da.src,Wd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png")||n(Da,"src",Wd),n(xa,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/color_sample_output.png"),n(Et,"href","https://huggingface.co/TencentARC/t2iadapter_canny_sd14v1"),n(Et,"rel","nofollow"),n(Ae,"width","64"),us(Ae,"margin","0"),us(Ae,"padding","0"),k(Ae.src,Bd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png")||n(Ae,"src",Bd),n(ja,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_input.png"),n(Ra,"width","64"),k(Ra.src,Nd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png")||n(Ra,"src",Nd),n(Sa,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/canny_sample_output.png"),n(At,"href","https://huggingface.co/TencentARC/t2iadapter_sketch_sd14v1"),n(At,"rel","nofollow"),n(Jt,"href","https://github.com/zhuoinoulu/pidinet"),n(Jt,"rel","nofollow"),n(Je,"width","64"),us(Je,"margin","0"),us(Je,"padding","0"),k(Je.src,Fd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png")||n(Je,"src",Fd),n(Pa,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_input.png"),n(Ba,"width","64"),k(Ba.src,Vd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png")||n(Ba,"src",Vd),n(Wa,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/sketch_sample_output.png"),n(It,"href","https://huggingface.co/TencentARC/t2iadapter_depth_sd14v1"),n(It,"rel","nofollow"),n(Fa,"width","64"),k(Fa.src,Qd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png")||n(Fa,"src",Qd),n(Na,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png"),n(Qa,"width","64"),k(Qa.src,Xd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png")||n(Qa,"src",Xd),n(Va,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_output.png"),n($t,"href","https://huggingface.co/TencentARC/t2iadapter_openpose_sd14v1"),n($t,"rel","nofollow"),n(Zt,"href","https://github.com/CMU-Perceptual-Computing-Lab/openpose"),n(Zt,"rel","nofollow"),n(Ya,"width","64"),k(Ya.src,Yd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png")||n(Ya,"src",Yd),n(Xa,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_input.png"),n(La,"width","64"),k(La.src,zd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png")||n(La,"src",zd),n(za,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/openpose_sample_output.png"),n(Gt,"href","https://huggingface.co/TencentARC/t2iadapter_keypose_sd14v1"),n(Gt,"rel","nofollow"),n(xt,"href","https://github.com/open-mmlab/mmpose"),n(xt,"rel","nofollow"),n(qa,"width","64"),k(qa.src,Ld="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png")||n(qa,"src",Ld),n(Ha,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png"),n(Ka,"width","64"),k(Ka.src,Hd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png")||n(Ka,"src",Hd),n(Oa,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_output.png"),n(jt,"href","https://huggingface.co/TencentARC/t2iadapter_seg_sd14v1"),n(jt,"rel","nofollow"),n(Rt,"href","https://github.com/TencentARC/T2I-Adapter/discussions/25"),n(Rt,"rel","nofollow"),n(ts,"width","64"),k(ts.src,qd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png")||n(ts,"src",qd),n(es,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_input.png"),n(ss,"width","64"),k(ss.src,Od="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png")||n(ss,"src",Od),n(as,"href","https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/seg_sample_output.png"),n(Pt,"href","https://huggingface.co/TencentARC/t2iadapter_canny_sd15v2"),n(Pt,"rel","nofollow"),n(Wt,"href","https://huggingface.co/TencentARC/t2iadapter_depth_sd15v2"),n(Wt,"rel","nofollow"),n(Bt,"href","https://huggingface.co/TencentARC/t2iadapter_sketch_sd15v2"),n(Bt,"rel","nofollow"),n(Nt,"href","https://huggingface.co/TencentARC/t2iadapter_zoedepth_sd15v1"),n(Nt,"rel","nofollow"),n(Ze,"id","combining-multiple-adapters"),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","#combining-multiple-adapters"),n(se,"class","relative group"),k(ns.src,Kd="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_sample_input.png")||n(ns,"src",Kd),n(ns,"alt","img"),k(is.src,ec="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/depth_sample_input.png")||n(is,"src",ec),n(is,"alt","img"),k(ps.src,tc="https://huggingface.co/datasets/diffusers/docs-images/resolve/main/t2i-adapter/keypose_depth_sample_output.png")||n(ps,"src",tc),n(ps,"alt","img"),n(Ce,"id","t2i-adapter-vs-controlnet"),n(Ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),n(Ce,"href","#t2i-adapter-vs-controlnet"),n(oe,"class","relative group"),n(Ht,"href","https://huggingface.co/docs/diffusers/main/en/api/pipelines/controlnet"),n(Ht,"rel","nofollow"),n(De,"id","diffusers.StableDiffusionAdapterPipeline"),n(De,"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(De,"href","#diffusers.StableDiffusionAdapterPipeline"),n(re,"class","relative group"),n(Kt,"href","https://arxiv.org/abs/2302.08453"),n(Kt,"rel","nofollow"),n(cs,"href","/docs/diffusers/main/en/api/pipelines/overview#diffusers.DiffusionPipeline"),n(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(da,"href","https://facebookresearch.github.io/xformers/"),n(da,"rel","nofollow"),n(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(ma,"href","https://facebookresearch.github.io/xformers/"),n(ma,"rel","nofollow"),n(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(Qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),n(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,c){e(document.head,h),f(t,U,c),f(t,g,c),e(g,u),e(u,J),b(m,J,null),e(g,M),e(g,pe),e(pe,En),f(t,Qo,c),f(t,H,c),e(H,de),e(de,gs),b(it,gs,null),e(H,An),e(H,_s),e(_s,Un),f(t,Xo,c),f(t,lt,c),e(lt,pt),e(pt,Jn),e(lt,In),f(t,Yo,c),f(t,_a,c),e(_a,$n),f(t,zo,c),f(t,va,c),e(va,kn),f(t,Lo,c),f(t,ba,c),e(ba,vs),e(vs,Zn),f(t,Ho,c),f(t,ce,c),e(ce,Gn),e(ce,dt),e(dt,Cn),e(ce,xn),f(t,qo,c),f(t,q,c),e(q,fe),e(fe,bs),b(ct,bs,null),e(q,Dn),e(q,ys),e(ys,jn),f(t,Oo,c),f(t,me,c),e(me,ws),e(ws,O),e(O,Ts),e(Ts,Sn),e(O,Rn),e(O,Ms),e(Ms,Pn),e(O,Wn),e(O,ya),e(ya,Bn),e(me,Nn),e(me,Es),e(Es,K),e(K,As),e(As,ft),e(ft,Fn),e(K,Vn),e(K,Us),e(Us,Js),e(Js,Qn),e(K,Xn),e(K,wa),e(wa,Yn),f(t,Ko,c),f(t,ee,c),e(ee,he),e(he,Is),b(mt,Is,null),e(ee,zn),e(ee,$s),e($s,Ln),f(t,er,c),f(t,ue,c),e(ue,Hn),e(ue,ks),e(ks,qn),e(ue,On),f(t,tr,c),f(t,ge,c),e(ge,ht),e(ht,Kn),e(ht,Zs),e(Zs,ei),e(ht,ti),e(ge,ai),e(ge,D),e(D,si),e(D,Gs),e(Gs,oi),e(D,ri),e(D,Cs),e(Cs,ni),e(D,ii),e(D,Ta),e(Ta,li),e(D,pi),f(t,ar,c),f(t,_e,c),e(_e,di),e(_e,ut),e(ut,ci),e(_e,fi),f(t,sr,c),b(gt,t,c),f(t,or,c),f(t,Ma,c),e(Ma,Ea),f(t,rr,c),f(t,Aa,c),e(Aa,mi),f(t,nr,c),b(_t,t,c),f(t,ir,c),f(t,Ua,c),e(Ua,hi),f(t,lr,c),f(t,Ja,c),e(Ja,Ia),f(t,pr,c),f(t,$a,c),e($a,ui),f(t,dr,c),b(vt,t,c),f(t,cr,c),f(t,ka,c),e(ka,gi),f(t,fr,c),b(bt,t,c),f(t,mr,c),f(t,Za,c),e(Za,Ga),f(t,hr,c),f(t,te,c),e(te,ve),e(ve,xs),b(yt,xs,null),e(te,_i),e(te,Ds),e(Ds,vi),f(t,ur,c),f(t,be,c),e(be,bi),e(be,wt),e(wt,yi),e(be,wi),f(t,gr,c),f(t,ae,c),e(ae,ye),e(ye,js),b(Tt,js,null),e(ae,Ti),e(ae,Ss),e(Ss,Mi),f(t,_r,c),f(t,we,c),e(we,Rs),e(Rs,j),e(j,Ps),e(Ps,Ei),e(j,Ai),e(j,Ws),e(Ws,Ui),e(j,Ji),e(j,Bs),e(Bs,Ii),e(j,$i),e(j,Ns),e(Ns,ki),e(we,Zi),e(we,A),e(A,S),e(S,Te),e(Te,Mt),e(Mt,Gi),e(Te,Ci),e(Te,xi),e(Te,Fs),e(Fs,Di),e(S,ji),e(S,Vs),e(Vs,Si),e(S,Ri),e(S,Qs),e(Qs,Ca),e(Ca,Me),e(S,Pi),e(S,Xs),e(Xs,xa),e(xa,Da),e(A,Wi),e(A,R),e(R,Ee),e(Ee,Et),e(Et,Bi),e(Ee,Ni),e(Ee,Fi),e(Ee,Ys),e(Ys,Vi),e(R,Qi),e(R,zs),e(zs,Xi),e(R,Yi),e(R,Ls),e(Ls,ja),e(ja,Ae),e(R,zi),e(R,Hs),e(Hs,Sa),e(Sa,Ra),e(A,Li),e(A,P),e(P,Ue),e(Ue,At),e(At,Hi),e(Ue,qi),e(Ue,Oi),e(Ue,Ut),e(Ut,Ki),e(Ut,Jt),e(Jt,el),e(Ut,tl),e(P,al),e(P,qs),e(qs,sl),e(P,ol),e(P,Os),e(Os,Pa),e(Pa,Je),e(P,rl),e(P,Ks),e(Ks,Wa),e(Wa,Ba),e(A,nl),e(A,W),e(W,Ie),e(Ie,It),e(It,il),e(Ie,ll),e(Ie,pl),e(Ie,eo),e(eo,dl),e(W,cl),e(W,to),e(to,fl),e(W,ml),e(W,ao),e(ao,Na),e(Na,Fa),e(W,hl),e(W,so),e(so,Va),e(Va,Qa),e(A,ul),e(A,B),e(B,$e),e($e,$t),e($t,gl),e($e,_l),e($e,vl),e($e,oo),e(oo,bl),e(B,yl),e(B,kt),e(kt,wl),e(kt,Zt),e(Zt,Tl),e(kt,Ml),e(B,El),e(B,ro),e(ro,Xa),e(Xa,Ya),e(B,Al),e(B,no),e(no,za),e(za,La),e(A,Ul),e(A,N),e(N,ke),e(ke,Gt),e(Gt,Jl),e(ke,Il),e(ke,$l),e(ke,io),e(io,kl),e(N,Zl),e(N,Ct),e(Ct,Gl),e(Ct,xt),e(xt,Cl),e(Ct,xl),e(N,Dl),e(N,lo),e(lo,Ha),e(Ha,qa),e(N,jl),e(N,po),e(po,Oa),e(Oa,Ka),e(A,Sl),e(A,F),e(F,Dt),e(Dt,jt),e(jt,Rl),e(Dt,Pl),e(Dt,co),e(co,Wl),e(F,Bl),e(F,St),e(St,Nl),e(St,Rt),e(Rt,Fl),e(St,Vl),e(F,Ql),e(F,fo),e(fo,es),e(es,ts),e(F,Xl),e(F,mo),e(mo,as),e(as,ss),e(A,Yl),e(A,V),e(V,ho),e(ho,Pt),e(Pt,zl),e(V,Ll),e(V,vr),e(V,Hl),e(V,br),e(V,ql),e(V,yr),e(A,Ol),e(A,Q),e(Q,uo),e(uo,Wt),e(Wt,Kl),e(Q,ep),e(Q,wr),e(Q,tp),e(Q,Tr),e(Q,ap),e(Q,Mr),e(A,sp),e(A,X),e(X,go),e(go,Bt),e(Bt,op),e(X,rp),e(X,Er),e(X,np),e(X,Ar),e(X,ip),e(X,Ur),e(A,lp),e(A,Y),e(Y,_o),e(_o,Nt),e(Nt,pp),e(Y,dp),e(Y,Jr),e(Y,cp),e(Y,Ir),e(Y,fp),e(Y,$r),f(t,kr,c),f(t,se,c),e(se,Ze),e(Ze,vo),b(Ft,vo,null),e(se,mp),e(se,bo),e(bo,hp),f(t,Zr,c),f(t,Vt,c),e(Vt,yo),e(yo,up),e(Vt,gp),f(t,Gr,c),f(t,os,c),e(os,_p),f(t,Cr,c),b(Qt,t,c),f(t,xr,c),f(t,rs,c),e(rs,vp),f(t,Dr,c),f(t,Ge,c),e(Ge,ns),e(Ge,bp),e(Ge,is),f(t,jr,c),f(t,Xt,c),e(Xt,wo),e(wo,yp),e(Xt,wp),f(t,Sr,c),f(t,Yt,c),e(Yt,To),e(To,Tp),e(Yt,Mp),f(t,Rr,c),b(zt,t,c),f(t,Pr,c),f(t,ls,c),e(ls,ps),f(t,Wr,c),f(t,oe,c),e(oe,Ce),e(Ce,Mo),b(Lt,Mo,null),e(oe,Ep),e(oe,Eo),e(Eo,Ap),f(t,Br,c),f(t,xe,c),e(xe,Up),e(xe,Ht),e(Ht,Jp),e(xe,Ip),f(t,Nr,c),f(t,re,c),e(re,De),e(De,Ao),b(qt,Ao,null),e(re,$p),e(re,Uo),e(Uo,kp),f(t,Fr,c),f(t,E,c),b(Ot,E,null),e(E,Zp),e(E,ds),e(ds,Gp),e(ds,Kt),e(Kt,Cp),e(E,xp),e(E,ea),e(ea,Dp),e(ea,cs),e(cs,jp),e(ea,Sp),e(E,Rp),e(E,z),b(ta,z,null),e(z,Pp),e(z,Jo),e(Jo,Wp),e(z,Bp),b(je,z,null),e(E,Np),e(E,C),b(aa,C,null),e(C,Fp),e(C,Io),e(Io,Vp),e(C,Qp),b(Se,C,null),e(C,Xp),b(Re,C,null),e(E,Yp),e(E,Pe),b(sa,Pe,null),e(Pe,zp),e(Pe,oa),e(oa,Lp),e(oa,$o),e($o,Hp),e(oa,qp),e(E,Op),e(E,We),b(ra,We,null),e(We,Kp),e(We,ko),e(ko,ed),e(E,td),e(E,Be),b(na,Be,null),e(Be,ad),e(Be,ia),e(ia,sd),e(ia,Zo),e(Zo,od),e(ia,rd),e(E,nd),e(E,x),b(la,x,null),e(x,id),e(x,pa),e(pa,ld),e(pa,da),e(da,pd),e(pa,dd),e(x,cd),b(Ne,x,null),e(x,fd),b(Fe,x,null),e(E,md),e(E,Ve),b(ca,Ve,null),e(Ve,hd),e(Ve,fa),e(fa,ud),e(fa,ma),e(ma,gd),e(fa,_d),e(E,vd),e(E,Qe),b(ha,Qe,null),e(Qe,bd),e(Qe,Z),e(Z,yd),e(Z,Go),e(Go,wd),e(Z,Td),e(Z,Co),e(Co,Md),e(Z,Ed),e(Z,xo),e(xo,Ad),e(Z,Ud),e(Z,Do),e(Do,Jd),e(Z,Id),Vr=!0},p(t,[c]){const ua={};c&2&&(ua.$$scope={dirty:c,ctx:t}),je.$set(ua);const jo={};c&2&&(jo.$$scope={dirty:c,ctx:t}),Se.$set(jo);const So={};c&2&&(So.$$scope={dirty:c,ctx:t}),Re.$set(So);const Ro={};c&2&&(Ro.$$scope={dirty:c,ctx:t}),Ne.$set(Ro);const ga={};c&2&&(ga.$$scope={dirty:c,ctx:t}),Fe.$set(ga)},i(t){Vr||(y(m.$$.fragment,t),y(it.$$.fragment,t),y(ct.$$.fragment,t),y(mt.$$.fragment,t),y(gt.$$.fragment,t),y(_t.$$.fragment,t),y(vt.$$.fragment,t),y(bt.$$.fragment,t),y(yt.$$.fragment,t),y(Tt.$$.fragment,t),y(Ft.$$.fragment,t),y(Qt.$$.fragment,t),y(zt.$$.fragment,t),y(Lt.$$.fragment,t),y(qt.$$.fragment,t),y(Ot.$$.fragment,t),y(ta.$$.fragment,t),y(je.$$.fragment,t),y(aa.$$.fragment,t),y(Se.$$.fragment,t),y(Re.$$.fragment,t),y(sa.$$.fragment,t),y(ra.$$.fragment,t),y(na.$$.fragment,t),y(la.$$.fragment,t),y(Ne.$$.fragment,t),y(Fe.$$.fragment,t),y(ca.$$.fragment,t),y(ha.$$.fragment,t),Vr=!0)},o(t){w(m.$$.fragment,t),w(it.$$.fragment,t),w(ct.$$.fragment,t),w(mt.$$.fragment,t),w(gt.$$.fragment,t),w(_t.$$.fragment,t),w(vt.$$.fragment,t),w(bt.$$.fragment,t),w(yt.$$.fragment,t),w(Tt.$$.fragment,t),w(Ft.$$.fragment,t),w(Qt.$$.fragment,t),w(zt.$$.fragment,t),w(Lt.$$.fragment,t),w(qt.$$.fragment,t),w(Ot.$$.fragment,t),w(ta.$$.fragment,t),w(je.$$.fragment,t),w(aa.$$.fragment,t),w(Se.$$.fragment,t),w(Re.$$.fragment,t),w(sa.$$.fragment,t),w(ra.$$.fragment,t),w(na.$$.fragment,t),w(la.$$.fragment,t),w(Ne.$$.fragment,t),w(Fe.$$.fragment,t),w(ca.$$.fragment,t),w(ha.$$.fragment,t),Vr=!1},d(t){a(h),t&&a(U),t&&a(g),T(m),t&&a(Qo),t&&a(H),T(it),t&&a(Xo),t&&a(lt),t&&a(Yo),t&&a(_a),t&&a(zo),t&&a(va),t&&a(Lo),t&&a(ba),t&&a(Ho),t&&a(ce),t&&a(qo),t&&a(q),T(ct),t&&a(Oo),t&&a(me),t&&a(Ko),t&&a(ee),T(mt),t&&a(er),t&&a(ue),t&&a(tr),t&&a(ge),t&&a(ar),t&&a(_e),t&&a(sr),T(gt,t),t&&a(or),t&&a(Ma),t&&a(rr),t&&a(Aa),t&&a(nr),T(_t,t),t&&a(ir),t&&a(Ua),t&&a(lr),t&&a(Ja),t&&a(pr),t&&a($a),t&&a(dr),T(vt,t),t&&a(cr),t&&a(ka),t&&a(fr),T(bt,t),t&&a(mr),t&&a(Za),t&&a(hr),t&&a(te),T(yt),t&&a(ur),t&&a(be),t&&a(gr),t&&a(ae),T(Tt),t&&a(_r),t&&a(we),t&&a(kr),t&&a(se),T(Ft),t&&a(Zr),t&&a(Vt),t&&a(Gr),t&&a(os),t&&a(Cr),T(Qt,t),t&&a(xr),t&&a(rs),t&&a(Dr),t&&a(Ge),t&&a(jr),t&&a(Xt),t&&a(Sr),t&&a(Yt),t&&a(Rr),T(zt,t),t&&a(Pr),t&&a(ls),t&&a(Wr),t&&a(oe),T(Lt),t&&a(Br),t&&a(xe),t&&a(Nr),t&&a(re),T(qt),t&&a(Fr),t&&a(E),T(Ot),T(ta),T(je),T(aa),T(Se),T(Re),T(sa),T(ra),T(na),T(la),T(Ne),T(Fe),T(ca),T(ha)}}}const Fm={local:"texttoimage-generation-with-adapter-conditioning",sections:[{local:"overview",title:"Overview"},{local:"available-pipelines",title:"Available Pipelines:"},{local:"usage-example",title:"Usage example"},{local:"available-checkpoints",sections:[{local:"t2iadapter-with-stable-diffusion-14",title:"T2I-Adapter with Stable Diffusion 1.4"}],title:"Available checkpoints"},{local:"combining-multiple-adapters",title:"Combining multiple adapters"},{local:"t2i-adapter-vs-controlnet",title:"T2I Adapter vs ControlNet"},{local:"diffusers.StableDiffusionAdapterPipeline",title:"StableDiffusionAdapterPipeline"}],title:"Text-to-Image Generation with Adapter Conditioning"};function Vm(G){return jm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class qm extends Gm{constructor(h){super();Cm(this,h,Vm,Nm,xm,{})}}export{qm as default,Fm as metadata};
