import{S as G0,i as J0,s as Z0,e as n,k as i,w as p,t as l,M as ey,c as s,d as t,m as d,a as r,x as u,h as c,b as a,G as e,g as f,y as h,q as _,o as g,B as b,v as oy,L as Rd}from"../../chunks/vendor-hf-doc-builder.js";import{T as Y0}from"../../chunks/Tip-hf-doc-builder.js";import{D as y}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Yd}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as M}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qd}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function ty(I){let x,T,D,$,k;return $=new Yd({props:{code:`import torch
from diffusers import UNet2DConditionModel
from xformers.ops import MemoryEfficientAttentionFlashAttentionOp

model = UNet2DConditionModel.from_pretrained(
    "stabilityai/stable-diffusion-2-1", subfolder="unet", torch_dtype=torch.float16
)
model = model.to("cuda")
model.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)`,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> UNet2DConditionModel
<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>model = UNet2DConditionModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = model.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)`}}),{c(){x=n("p"),T=l("Examples:"),D=i(),p($.$$.fragment)},l(v){x=s(v,"P",{});var w=r(x);T=c(w,"Examples:"),w.forEach(t),D=d(v),u($.$$.fragment,v)},m(v,w){f(v,x,w),e(x,T),f(v,D,w),h($,v,w),k=!0},p:Rd,i(v){k||(_($.$$.fragment,v),k=!0)},o(v){g($.$$.fragment,v),k=!1},d(v){v&&t(x),v&&t(D),b($,v)}}}function ny(I){let x,T,D,$,k,v,w,ne;return{c(){x=n("p"),T=l("It is required to be logged in ("),D=n("code"),$=l("huggingface-cli login"),k=l(") when you want to use private or "),v=n("a"),w=l(`gated
models`),ne=l("."),this.h()},l(Ee){x=s(Ee,"P",{});var R=r(x);T=c(R,"It is required to be logged in ("),D=s(R,"CODE",{});var Y=r(D);$=c(Y,"huggingface-cli login"),Y.forEach(t),k=c(R,") when you want to use private or "),v=s(R,"A",{href:!0,rel:!0});var pr=r(v);w=c(pr,`gated
models`),pr.forEach(t),ne=c(R,"."),R.forEach(t),this.h()},h(){a(v,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),a(v,"rel","nofollow")},m(Ee,R){f(Ee,x,R),e(x,T),e(x,D),e(D,$),e(x,k),e(x,v),e(v,w),e(x,ne)},d(Ee){Ee&&t(x)}}}function sy(I){let x,T,D,$,k;return{c(){x=n("p"),T=l("Activate the special "),D=n("a"),$=l("\u201Coffline-mode\u201D"),k=l(` to use
this method in a firewalled environment.`),this.h()},l(v){x=s(v,"P",{});var w=r(x);T=c(w,"Activate the special "),D=s(w,"A",{href:!0,rel:!0});var ne=r(D);$=c(ne,"\u201Coffline-mode\u201D"),ne.forEach(t),k=c(w,` to use
this method in a firewalled environment.`),w.forEach(t),this.h()},h(){a(D,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),a(D,"rel","nofollow")},m(v,w){f(v,x,w),e(x,T),e(x,D),e(D,$),e(x,k)},d(v){v&&t(x)}}}function ry(I){let x,T,D,$,k;return $=new Yd({props:{code:`from diffusers import FlaxUNet2DConditionModel

# Download model and configuration from huggingface.co and cache.
model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
# Model was saved using *save_pretrained('./test/saved_model/')* (for example purposes, not runnable).
model, params = FlaxUNet2DConditionModel.from_pretrained("./test/saved_model/")`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co and cache.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Model was saved using *save_pretrained(&#x27;./test/saved_model/&#x27;)* (for example purposes, not runnable).</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;./test/saved_model/&quot;</span>)`}}),{c(){x=n("p"),T=l("Examples:"),D=i(),p($.$$.fragment)},l(v){x=s(v,"P",{});var w=r(x);T=c(w,"Examples:"),w.forEach(t),D=d(v),u($.$$.fragment,v)},m(v,w){f(v,x,w),e(x,T),f(v,D,w),h($,v,w),k=!0},p:Rd,i(v){k||(_($.$$.fragment,v),k=!0)},o(v){g($.$$.fragment,v),k=!1},d(v){v&&t(x),v&&t(D),b($,v)}}}function ay(I){let x,T,D,$,k;return $=new Yd({props:{code:`from diffusers import FlaxUNet2DConditionModel

# load model
model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
# By default, the model parameters will be in fp32 precision, to cast these to bfloat16 precision
params = model.to_bf16(params)
# If you don't want to cast certain parameters (for example layer norm bias and scale)
# then pass the mask as follows
from flax import traverse_util

model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
flat_params = traverse_util.flatten_dict(params)
mask = {
    path: (path[-2] != ("LayerNorm", "bias") and path[-2:] != ("LayerNorm", "scale"))
    for path in flat_params
}
mask = traverse_util.unflatten_dict(mask)
params = model.to_bf16(params, mask)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model parameters will be in fp32 precision, to cast these to bfloat16 precision</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_bf16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util

<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span>    path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_bf16(params, mask)`}}),{c(){x=n("p"),T=l("Examples:"),D=i(),p($.$$.fragment)},l(v){x=s(v,"P",{});var w=r(x);T=c(w,"Examples:"),w.forEach(t),D=d(v),u($.$$.fragment,v)},m(v,w){f(v,x,w),e(x,T),f(v,D,w),h($,v,w),k=!0},p:Rd,i(v){k||(_($.$$.fragment,v),k=!0)},o(v){g($.$$.fragment,v),k=!1},d(v){v&&t(x),v&&t(D),b($,v)}}}function iy(I){let x,T,D,$,k;return $=new Yd({props:{code:`from diffusers import FlaxUNet2DConditionModel

# load model
model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
# By default, the model params will be in fp32, to cast these to float16
params = model.to_fp16(params)
# If you want don't want to cast certain parameters (for example layer norm bias and scale)
# then pass the mask as follows
from flax import traverse_util

model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
flat_params = traverse_util.flatten_dict(params)
mask = {
    path: (path[-2] != ("LayerNorm", "bias") and path[-2:] != ("LayerNorm", "scale"))
    for path in flat_params
}
mask = traverse_util.unflatten_dict(mask)
params = model.to_fp16(params, mask)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># load model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to cast these to float16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># If you want don&#x27;t want to cast certain parameters (for example layer norm bias and scale)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># then pass the mask as follows</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> flax <span class="hljs-keyword">import</span> traverse_util

<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>flat_params = traverse_util.flatten_dict(params)
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = {
<span class="hljs-meta">... </span>    path: (path[-<span class="hljs-number">2</span>] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;bias&quot;</span>) <span class="hljs-keyword">and</span> path[-<span class="hljs-number">2</span>:] != (<span class="hljs-string">&quot;LayerNorm&quot;</span>, <span class="hljs-string">&quot;scale&quot;</span>))
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> path <span class="hljs-keyword">in</span> flat_params
<span class="hljs-meta">... </span>}
<span class="hljs-meta">&gt;&gt;&gt; </span>mask = traverse_util.unflatten_dict(mask)
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp16(params, mask)`}}),{c(){x=n("p"),T=l("Examples:"),D=i(),p($.$$.fragment)},l(v){x=s(v,"P",{});var w=r(x);T=c(w,"Examples:"),w.forEach(t),D=d(v),u($.$$.fragment,v)},m(v,w){f(v,x,w),e(x,T),f(v,D,w),h($,v,w),k=!0},p:Rd,i(v){k||(_($.$$.fragment,v),k=!0)},o(v){g($.$$.fragment,v),k=!1},d(v){v&&t(x),v&&t(D),b($,v)}}}function dy(I){let x,T,D,$,k;return $=new Yd({props:{code:`from diffusers import FlaxUNet2DConditionModel

# Download model and configuration from huggingface.co
model, params = FlaxUNet2DConditionModel.from_pretrained("runwayml/stable-diffusion-v1-5")
# By default, the model params will be in fp32, to illustrate the use of this method,
# we'll first cast to fp16 and back to fp32
params = model.to_f16(params)
# now cast back to fp32
params = model.to_fp32(params)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> FlaxUNet2DConditionModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Download model and configuration from huggingface.co</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model, params = FlaxUNet2DConditionModel.from_pretrained(<span class="hljs-string">&quot;runwayml/stable-diffusion-v1-5&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># By default, the model params will be in fp32, to illustrate the use of this method,</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># we&#x27;ll first cast to fp16 and back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_f16(params)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># now cast back to fp32</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>params = model.to_fp32(params)`}}),{c(){x=n("p"),T=l("Examples:"),D=i(),p($.$$.fragment)},l(v){x=s(v,"P",{});var w=r(x);T=c(w,"Examples:"),w.forEach(t),D=d(v),u($.$$.fragment,v)},m(v,w){f(v,x,w),e(x,T),f(v,D,w),h($,v,w),k=!0},p:Rd,i(v){k||(_($.$$.fragment,v),k=!0)},o(v){g($.$$.fragment,v),k=!1},d(v){v&&t(x),v&&t(D),b($,v)}}}function ly(I){let x,T,D,$,k,v,w,ne,Ee,R,Y,pr,Gr,km,Tm,Jr,Mm,Nm,Gd,Ue,ho,Zr,Dt,Am,ea,Em,Jd,N,kt,Um,oa,Cm,Fm,ur,hr,Pm,Om,qm,ta,he,na,Lm,jm,sa,Im,zm,_r,Vm,Bm,Sm,_e,Tt,Km,ra,Wm,Xm,aa,Hm,Qm,_o,Mt,Rm,ia,Ym,Gm,ge,Nt,Jm,da,Zm,ef,la,of,tf,K,At,nf,ca,sf,rf,ma,af,df,fa,lf,cf,go,mf,O,Et,ff,pa,pf,uf,Ce,hf,ua,_f,gf,ha,bf,vf,yf,Ut,xf,_a,$f,wf,Df,Ct,kf,ga,Tf,Mf,Nf,bo,Af,vo,Ef,yo,Ft,Uf,ba,Cf,Ff,xo,Pt,Pf,Ot,Of,va,qf,Lf,Zd,Fe,$o,ya,qt,jf,xa,If,el,Lt,jt,ol,Pe,wo,$a,It,zf,wa,Vf,tl,G,zt,Bf,Da,Sf,Kf,Vt,Wf,gr,Xf,Hf,Qf,br,Bt,nl,Oe,Do,ka,St,Rf,Ta,Yf,sl,Kt,Wt,rl,qe,ko,Ma,Xt,Gf,Na,Jf,al,J,Ht,Zf,Aa,ep,op,Qt,tp,vr,np,sp,rp,yr,Rt,il,Le,To,Ea,Yt,ap,Ua,ip,dl,Gt,Jt,ll,je,Mo,Ca,Zt,dp,Fa,lp,cl,F,en,cp,Pa,mp,fp,on,pp,xr,up,hp,_p,$r,tn,gp,be,nn,bp,Oa,vp,yp,qa,xp,$p,wr,sn,wp,No,rn,Dp,La,kp,ml,Ie,Ao,ja,an,Tp,Ia,Mp,fl,dn,ln,pl,ze,Eo,za,cn,Np,Va,Ap,ul,P,mn,Ep,Ba,Up,Cp,fn,Fp,Dr,Pp,Op,qp,kr,pn,Lp,ve,un,jp,Sa,Ip,zp,Ka,Vp,Bp,Tr,hn,Sp,Uo,_n,Kp,Wa,Wp,hl,Ve,Co,Xa,gn,Xp,Ha,Hp,_l,Be,bn,Qp,Qa,Rp,gl,Se,Fo,Ra,vn,Yp,Ya,Gp,bl,Ke,yn,Jp,Ga,Zp,vl,We,Po,Ja,xn,eu,Za,ou,yl,Z,$n,tu,ei,nu,su,wn,ru,Mr,au,iu,du,Nr,Dn,xl,Xe,Oo,oi,kn,lu,ti,cu,$l,He,Tn,mu,ni,fu,wl,Qe,qo,si,Mn,pu,ri,uu,Dl,A,Nn,hu,ai,_u,gu,An,bu,Ar,vu,yu,xu,Lo,En,$u,Un,wu,ii,Du,ku,Tu,jo,Cn,Mu,Fn,Nu,di,Au,Eu,Uu,Io,Pn,Cu,li,Fu,Pu,zo,On,Ou,ci,qu,Lu,Er,qn,ju,Vo,Ln,Iu,mi,zu,Vu,Bo,jn,Bu,fi,Su,kl,Re,So,pi,In,Ku,ui,Wu,Tl,q,zn,Xu,hi,Hu,Qu,_i,Ru,Yu,Vn,Gu,gi,Ju,Zu,eh,bi,oh,th,Ur,Bn,Ml,Ye,Ko,vi,Sn,nh,yi,sh,Nl,Kn,Wn,Al,Ge,Wo,xi,Xn,rh,$i,ah,El,le,Hn,ih,wi,dh,lh,Cr,Qn,Ul,Je,Xo,Di,Rn,ch,ki,mh,Cl,Yn,Gn,Fl,Ze,Ho,Ti,Jn,fh,Mi,ph,Pl,V,Zn,uh,Ni,hh,_h,es,gh,Fr,bh,vh,yh,Pr,xh,os,$h,wh,Or,ts,Ol,eo,Qo,Ai,ns,Dh,Ei,kh,ql,ss,rs,Ll,oo,Ro,Ui,as,Th,Ci,Mh,jl,is,ds,Il,to,Yo,Fi,ls,Nh,Pi,Ah,zl,B,cs,Eh,Go,ms,Uh,Oi,Ch,Fh,ye,fs,Ph,qi,Oh,qh,Li,Lh,jh,qr,ps,Ih,Jo,us,zh,ji,Vh,Vl,no,Zo,Ii,hs,Bh,zi,Sh,Bl,U,_s,Kh,Vi,Wh,Xh,Lr,jr,Hh,Qh,Rh,W,gs,Yh,Bi,Gh,Jh,bs,Zh,Si,e_,o_,t_,vs,n_,Ki,s_,r_,a_,et,i_,ot,ys,d_,xs,l_,Wi,c_,m_,f_,se,$s,p_,ee,u_,Xi,h_,__,Hi,g_,b_,Qi,v_,y_,Ri,x_,$_,w_,Yi,D_,k_,tt,T_,re,ws,M_,oe,N_,Gi,A_,E_,Ji,U_,C_,Zi,F_,P_,ed,O_,q_,L_,od,j_,I_,nt,z_,xe,Ds,V_,te,B_,td,S_,K_,nd,W_,X_,sd,H_,Q_,rd,R_,Y_,G_,st,Sl,so,rt,ad,ks,J_,id,Z_,Kl,ro,Ts,eg,at,Ms,og,dd,tg,Wl,ao,it,ld,Ns,ng,cd,sg,Xl,L,As,rg,md,ag,ig,Es,dg,Ir,lg,cg,mg,Us,fg,Cs,pg,ug,hg,fd,_g,gg,ce,pd,Fs,bg,vg,ud,Ps,yg,xg,hd,Os,$g,wg,_d,qs,Dg,Hl,io,dt,gd,Ls,kg,bd,Tg,Ql,me,js,Mg,vd,Ng,Ag,lt,Is,Eg,yd,Ug,Rl,lo,ct,xd,zs,Cg,$d,Fg,Yl,fe,Vs,Pg,wd,Og,qg,mt,Bs,Lg,Dd,jg,Gl,co,ft,kd,Ss,Ig,Td,zg,Jl,S,Ks,Vg,Md,Bg,Sg,Ws,Kg,Xs,Wg,Xg,Hg,Nd,Qg,Rg,pe,Ad,Hs,Yg,Gg,Ed,Qs,Jg,Zg,Ud,Rs,eb,ob,Cd,Ys,tb,Zl,mo,pt,Fd,Gs,nb,Pd,sb,ec,fo,Js,rb,ut,Zs,ab,Od,ib,oc,po,ht,qd,er,db,Ld,lb,tc,j,or,cb,tr,mb,nr,fb,pb,ub,sr,hb,zr,_b,gb,bb,rr,vb,ar,yb,xb,$b,jd,wb,Db,ue,Id,ir,kb,Tb,zd,dr,Mb,Nb,Vd,lr,Ab,Eb,Bd,cr,Ub,nc;return v=new M({}),Dt=new M({}),kt=new y({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_utils.py#L146"}}),Tt=new y({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_utils.py#L202"}}),Mt=new y({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_utils.py#L261"}}),Nt=new y({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_utils.py#L191"}}),At=new y({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.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/v0.16.0/src/diffusers/models/modeling_utils.py#L229"}}),go=new Qd({props:{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.example",$$slots:{default:[ty]},$$scope:{ctx:I}}}),Et=new y({props:{name:"from_pretrained",anchor:"diffusers.ModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike, NoneType]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ModelMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <code>~ModelMixin.save_config</code>, e.g.,
<code>./my_model_directory/</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.ModelMixin.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.ModelMixin.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model under this dtype. If <code>&quot;auto&quot;</code> is passed the dtype
will be automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.ModelMixin.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.ModelMixin.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.ModelMixin.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.ModelMixin.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.ModelMixin.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.ModelMixin.from_pretrained.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.ModelMixin.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.ModelMixin.from_pretrained.from_flax",description:`<strong>from_flax</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a Flax checkpoint save file.`,name:"from_flax"},{anchor:"diffusers.ModelMixin.from_pretrained.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.ModelMixin.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"},{anchor:"diffusers.ModelMixin.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be refined to each
parameter/buffer name, once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>To have Accelerate compute the most optimized <code>device_map</code> automatically, set <code>device_map=&quot;auto&quot;</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.ModelMixin.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading by not initializing the weights and only loading the pre-trained weights. This
also tries to not use more than 1x model size in CPU memory (including peak memory) while loading the
model. This is only supported when torch version &gt;= 1.9.0. If you are using an older version of torch,
setting this argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.ModelMixin.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified load weights from <code>variant</code> filename, <em>e.g.</em> pytorch_model.<variant>.bin. <code>variant</code> is
ignored when using <code>from_flax</code>.</variant>`,name:"variant"},{anchor:"diffusers.ModelMixin.from_pretrained.use_safetensors",description:`<strong>use_safetensors</strong> (<code>bool</code>, <em>optional</em> ) &#x2014;
If set to <code>True</code>, the pipeline will forcibly load the models from <code>safetensors</code> weights. If set to
<code>None</code> (the default). The pipeline will load using <code>safetensors</code> if safetensors weights are available
<em>and</em> if <code>safetensors</code> is installed. If the to <code>False</code> the pipeline will <em>not</em> use <code>safetensors</code>.`,name:"use_safetensors"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_utils.py#L327"}}),bo=new Y0({props:{$$slots:{default:[ny]},$$scope:{ctx:I}}}),vo=new Y0({props:{$$slots:{default:[sy]},$$scope:{ctx:I}}}),Ft=new y({props:{name:"num_parameters",anchor:"diffusers.ModelMixin.num_parameters",parameters:[{name:"only_trainable",val:": bool = False"},{name:"exclude_embeddings",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.ModelMixin.num_parameters.only_trainable",description:`<strong>only_trainable</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of trainable parameters`,name:"only_trainable"},{anchor:"diffusers.ModelMixin.num_parameters.exclude_embeddings",description:`<strong>exclude_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return only the number of non-embeddings parameters`,name:"exclude_embeddings"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_utils.py#L773",returnDescription:`
<p>The number of parameters.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Pt=new y({props:{name:"save_pretrained",anchor:"diffusers.ModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"is_main_process",val:": bool = True"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"},{name:"variant",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.ModelMixin.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful when in distributed training like
TPUs and need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on
the main process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.ModelMixin.save_pretrained.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful on distributed training like TPUs when one
need to replace <code>torch.save</code> by another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.ModelMixin.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way (that uses <code>pickle</code>).`,name:"safe_serialization"},{anchor:"diffusers.ModelMixin.save_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified, weights are saved in the format pytorch_model.<variant>.bin.</variant>`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_utils.py#L267"}}),qt=new M({}),jt=new y({props:{name:"class diffusers.models.unet_2d.UNet2DOutput",anchor:"diffusers.models.unet_2d.UNet2DOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.unet_2d.UNet2DOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Hidden states output. Output of last layer of model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d.py#L28"}}),It=new M({}),zt=new y({props:{name:"class diffusers.UNet2DModel",anchor:"diffusers.UNet2DModel",parameters:[{name:"sample_size",val:": typing.Union[int, typing.Tuple[int, int], NoneType] = None"},{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"center_input_sample",val:": bool = False"},{name:"time_embedding_type",val:": str = 'positional'"},{name:"freq_shift",val:": int = 0"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownBlock2D', 'AttnDownBlock2D', 'AttnDownBlock2D', 'AttnDownBlock2D')"},{name:"up_block_types",val:": typing.Tuple[str] = ('AttnUpBlock2D', 'AttnUpBlock2D', 'AttnUpBlock2D', 'UpBlock2D')"},{name:"block_out_channels",val:": typing.Tuple[int] = (224, 448, 672, 896)"},{name:"layers_per_block",val:": int = 2"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"downsample_padding",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"attention_head_dim",val:": typing.Optional[int] = 8"},{name:"norm_num_groups",val:": int = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"resnet_time_scale_shift",val:": str = 'default'"},{name:"add_attention",val:": bool = True"},{name:"class_embed_type",val:": typing.Optional[str] = None"},{name:"num_class_embeds",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.UNet2DModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code> or <code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Height and width of input/output sample. Dimensions must be a multiple of <code>2 ** (len(block_out_channels) - 1)</code>.`,name:"sample_size"},{anchor:"diffusers.UNet2DModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.UNet2DModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.UNet2DModel.center_input_sample",description:"<strong>center_input_sample</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to center the input sample.",name:"center_input_sample"},{anchor:"diffusers.UNet2DModel.time_embedding_type",description:"<strong>time_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;positional&quot;</code>) &#x2014; Type of time embedding to use.",name:"time_embedding_type"},{anchor:"diffusers.UNet2DModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; Frequency shift for fourier time embedding.",name:"freq_shift"},{anchor:"diffusers.UNet2DModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>True</code>): Whether to flip sin to cos for fourier time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.UNet2DModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownBlock2D&quot;, &quot;AttnDownBlock2D&quot;, &quot;AttnDownBlock2D&quot;, &quot;AttnDownBlock2D&quot;)</code>): Tuple of downsample block
types.`,name:"down_block_types"},{anchor:"diffusers.UNet2DModel.mid_block_type",description:`<strong>mid_block_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;UNetMidBlock2D&quot;</code>) &#x2014;
The mid block type. Choose from <code>UNetMidBlock2D</code> or <code>UnCLIPUNetMidBlock2D</code>.`,name:"mid_block_type"},{anchor:"diffusers.UNet2DModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;AttnUpBlock2D&quot;, &quot;AttnUpBlock2D&quot;, &quot;AttnUpBlock2D&quot;, &quot;UpBlock2D&quot;)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.UNet2DModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(224, 448, 672, 896)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.UNet2DModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to <code>2</code>) &#x2014; The number of layers per block.",name:"layers_per_block"},{anchor:"diffusers.UNet2DModel.mid_block_scale_factor",description:"<strong>mid_block_scale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014; The scale factor for the mid block.",name:"mid_block_scale_factor"},{anchor:"diffusers.UNet2DModel.downsample_padding",description:"<strong>downsample_padding</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014; The padding for the downsample convolution.",name:"downsample_padding"},{anchor:"diffusers.UNet2DModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.UNet2DModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>8</code>) &#x2014; The attention head dimension.",name:"attention_head_dim"},{anchor:"diffusers.UNet2DModel.norm_num_groups",description:"<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; The number of groups for the normalization.",name:"norm_num_groups"},{anchor:"diffusers.UNet2DModel.norm_eps",description:"<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1e-5</code>) &#x2014; The epsilon for the normalization.",name:"norm_eps"},{anchor:"diffusers.UNet2DModel.resnet_time_scale_shift",description:`<strong>resnet_time_scale_shift</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014; Time scale shift config
for resnet blocks, see <code>ResnetBlock2D</code>. Choose from <code>default</code> or <code>scale_shift</code>.`,name:"resnet_time_scale_shift"},{anchor:"diffusers.UNet2DModel.class_embed_type",description:`<strong>class_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014;
The type of class embedding to use which is ultimately summed with the time embeddings. Choose from <code>None</code>,
<code>&quot;timestep&quot;</code>, or <code>&quot;identity&quot;</code>.`,name:"class_embed_type"},{anchor:"diffusers.UNet2DModel.num_class_embeds",description:`<strong>num_class_embeds</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Input dimension of the learnable embedding matrix to be projected to <code>time_embed_dim</code>, when performing
class conditioning with <code>class_embed_type</code> equal to <code>None</code>.`,name:"num_class_embeds"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d.py#L38"}}),Bt=new y({props:{name:"forward",anchor:"diffusers.UNet2DModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"class_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UNet2DModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; (batch, channel, height, width) noisy inputs tensor",name:"sample"},{anchor:"diffusers.UNet2DModel.forward.timestep",description:"<strong>timestep</strong> (<code>torch.FloatTensor</code> or <code>float</code> or `int) &#x2014; (batch) timesteps",name:"timestep"},{anchor:"diffusers.UNet2DModel.forward.class_labels",description:`<strong>class_labels</strong> (<code>torch.FloatTensor</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional class labels for conditioning. Their embeddings will be summed with the timestep embeddings.`,name:"class_labels"},{anchor:"diffusers.UNet2DModel.forward.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 <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d.UNet2DOutput">UNet2DOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d.py#L219",returnDescription:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d.UNet2DOutput"
>UNet2DOutput</a> if <code>return_dict</code> is True,
otherwise a <code>tuple</code>. When returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d.UNet2DOutput"
>UNet2DOutput</a> or <code>tuple</code></p>
`}}),St=new M({}),Wt=new y({props:{name:"class diffusers.models.unet_1d.UNet1DOutput",anchor:"diffusers.models.unet_1d.UNet1DOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.unet_1d.UNet1DOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, sample_size)</code>) &#x2014;
Hidden states output. Output of last layer of model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_1d.py#L29"}}),Xt=new M({}),Ht=new y({props:{name:"class diffusers.UNet1DModel",anchor:"diffusers.UNet1DModel",parameters:[{name:"sample_size",val:": int = 65536"},{name:"sample_rate",val:": typing.Optional[int] = None"},{name:"in_channels",val:": int = 2"},{name:"out_channels",val:": int = 2"},{name:"extra_in_channels",val:": int = 0"},{name:"time_embedding_type",val:": str = 'fourier'"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"use_timestep_embedding",val:": bool = False"},{name:"freq_shift",val:": float = 0.0"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownBlock1DNoSkip', 'DownBlock1D', 'AttnDownBlock1D')"},{name:"up_block_types",val:": typing.Tuple[str] = ('AttnUpBlock1D', 'UpBlock1D', 'UpBlock1DNoSkip')"},{name:"mid_block_type",val:": typing.Tuple[str] = 'UNetMidBlock1D'"},{name:"out_block_type",val:": str = None"},{name:"block_out_channels",val:": typing.Tuple[int] = (32, 32, 64)"},{name:"act_fn",val:": str = None"},{name:"norm_num_groups",val:": int = 8"},{name:"layers_per_block",val:": int = 1"},{name:"downsample_each_block",val:": bool = False"}],parametersDescription:[{anchor:"diffusers.UNet1DModel.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>) &#x2014; Default length of sample. Should be adaptable at runtime.",name:"sample_size"},{anchor:"diffusers.UNet1DModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; Number of channels in the input sample.",name:"in_channels"},{anchor:"diffusers.UNet1DModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.UNet1DModel.extra_in_channels",description:`<strong>extra_in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of additional channels to be added to the input of the first down block. Useful for cases where the
input data has more channels than what the model is initially designed for.`,name:"extra_in_channels"},{anchor:"diffusers.UNet1DModel.time_embedding_type",description:"<strong>time_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;fourier&quot;</code>) &#x2014; Type of time embedding to use.",name:"time_embedding_type"},{anchor:"diffusers.UNet1DModel.freq_shift",description:"<strong>freq_shift</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014; Frequency shift for fourier time embedding.",name:"freq_shift"},{anchor:"diffusers.UNet1DModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>False</code>): Whether to flip sin to cos for fourier time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.UNet1DModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownBlock1D&quot;, &quot;DownBlock1DNoSkip&quot;, &quot;AttnDownBlock1D&quot;)</code>): Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.UNet1DModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;UpBlock1D&quot;, &quot;UpBlock1DNoSkip&quot;, &quot;AttnUpBlock1D&quot;)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.UNet1DModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(32, 32, 64)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.UNet1DModel.mid_block_type",description:"<strong>mid_block_type</strong> (<code>str</code>, <em>optional</em>, defaults to &#x201C;UNetMidBlock1D&#x201D;) &#x2014; block type for middle of UNet.",name:"mid_block_type"},{anchor:"diffusers.UNet1DModel.out_block_type",description:"<strong>out_block_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014; optional output processing of UNet.",name:"out_block_type"},{anchor:"diffusers.UNet1DModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014; optional activation function in UNet blocks.",name:"act_fn"},{anchor:"diffusers.UNet1DModel.norm_num_groups",description:"<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014; group norm member count in UNet blocks.",name:"norm_num_groups"},{anchor:"diffusers.UNet1DModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; added number of layers in a UNet block.",name:"layers_per_block"},{anchor:"diffusers.UNet1DModel.downsample_each_block",description:`<strong>downsample_each_block</strong> (<code>int</code>, <em>optional</em>, defaults to False &#x2014;
experimental feature for using a UNet without upsampling.`,name:"downsample_each_block"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_1d.py#L39"}}),Rt=new y({props:{name:"forward",anchor:"diffusers.UNet1DModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UNet1DModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; <code>(batch_size, num_channels, sample_size)</code> noisy inputs tensor",name:"sample"},{anchor:"diffusers.UNet1DModel.forward.timestep",description:"<strong>timestep</strong> (<code>torch.FloatTensor</code> or <code>float</code> or `int) &#x2014; (batch) timesteps",name:"timestep"},{anchor:"diffusers.UNet1DModel.forward.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 <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_1d.UNet1DOutput">UNet1DOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_1d.py#L193",returnDescription:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_1d.UNet1DOutput"
>UNet1DOutput</a> if <code>return_dict</code> is True,
otherwise a <code>tuple</code>. When returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_1d.UNet1DOutput"
>UNet1DOutput</a> or <code>tuple</code></p>
`}}),Yt=new M({}),Jt=new y({props:{name:"class diffusers.models.unet_2d_condition.UNet2DConditionOutput",anchor:"diffusers.models.unet_2d_condition.UNet2DConditionOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.unet_2d_condition.UNet2DConditionOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Hidden states conditioned on <code>encoder_hidden_states</code> input. Output of last layer of model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d_condition.py#L44"}}),Zt=new M({}),en=new y({props:{name:"class diffusers.UNet2DConditionModel",anchor:"diffusers.UNet2DConditionModel",parameters:[{name:"sample_size",val:": typing.Optional[int] = None"},{name:"in_channels",val:": int = 4"},{name:"out_channels",val:": int = 4"},{name:"center_input_sample",val:": bool = False"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"mid_block_type",val:": typing.Optional[str] = 'UNetMidBlock2DCrossAttn'"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": typing.Union[int, typing.Tuple[int]] = 2"},{name:"downsample_padding",val:": int = 1"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"norm_num_groups",val:": typing.Optional[int] = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"cross_attention_dim",val:": typing.Union[int, typing.Tuple[int]] = 1280"},{name:"encoder_hid_dim",val:": typing.Optional[int] = None"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 8"},{name:"dual_cross_attention",val:": bool = False"},{name:"use_linear_projection",val:": bool = False"},{name:"class_embed_type",val:": typing.Optional[str] = None"},{name:"addition_embed_type",val:": typing.Optional[str] = None"},{name:"num_class_embeds",val:": typing.Optional[int] = None"},{name:"upcast_attention",val:": bool = False"},{name:"resnet_time_scale_shift",val:": str = 'default'"},{name:"resnet_skip_time_act",val:": bool = False"},{name:"resnet_out_scale_factor",val:": int = 1.0"},{name:"time_embedding_type",val:": str = 'positional'"},{name:"time_embedding_dim",val:": typing.Optional[int] = None"},{name:"time_embedding_act_fn",val:": typing.Optional[str] = None"},{name:"timestep_post_act",val:": typing.Optional[str] = None"},{name:"time_cond_proj_dim",val:": typing.Optional[int] = None"},{name:"conv_in_kernel",val:": int = 3"},{name:"conv_out_kernel",val:": int = 3"},{name:"projection_class_embeddings_input_dim",val:": typing.Optional[int] = None"},{name:"class_embeddings_concat",val:": bool = False"},{name:"mid_block_only_cross_attention",val:": typing.Optional[bool] = None"},{name:"cross_attention_norm",val:": typing.Optional[str] = None"},{name:"addition_embed_type_num_heads",val:" = 64"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code> or <code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Height and width of input/output sample.`,name:"sample_size"},{anchor:"diffusers.UNet2DConditionModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; The number of channels in the input sample.",name:"in_channels"},{anchor:"diffusers.UNet2DConditionModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; The number of channels in the output.",name:"out_channels"},{anchor:"diffusers.UNet2DConditionModel.center_input_sample",description:"<strong>center_input_sample</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to center the input sample.",name:"center_input_sample"},{anchor:"diffusers.UNet2DConditionModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to flip the sin to cos in the time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.UNet2DConditionModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The frequency shift to apply to the time embedding.",name:"freq_shift"},{anchor:"diffusers.UNet2DConditionModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;DownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use.`,name:"down_block_types"},{anchor:"diffusers.UNet2DConditionModel.mid_block_type",description:`<strong>mid_block_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;UNetMidBlock2DCrossAttn&quot;</code>) &#x2014;
The mid block type. Choose from <code>UNetMidBlock2DCrossAttn</code> or <code>UNetMidBlock2DSimpleCrossAttn</code>, will skip the
mid block layer if <code>None</code>.`,name:"mid_block_type"},{anchor:"diffusers.UNet2DConditionModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;UpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;,)</code>) &#x2014;
The tuple of upsample blocks to use.`,name:"up_block_types"},{anchor:"diffusers.UNet2DConditionModel.only_cross_attention(bool",description:`<strong>only_cross_attention(<code>bool</code></strong> or <code>Tuple[bool]</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Whether to include self-attention in the basic transformer blocks, see
<code>BasicTransformerBlock</code>.`,name:"only_cross_attention(bool"},{anchor:"diffusers.UNet2DConditionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.UNet2DConditionModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; The number of layers per block.",name:"layers_per_block"},{anchor:"diffusers.UNet2DConditionModel.downsample_padding",description:"<strong>downsample_padding</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The padding to use for the downsampling convolution.",name:"downsample_padding"},{anchor:"diffusers.UNet2DConditionModel.mid_block_scale_factor",description:"<strong>mid_block_scale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014; The scale factor to use for the mid block.",name:"mid_block_scale_factor"},{anchor:"diffusers.UNet2DConditionModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.UNet2DConditionModel.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014; The number of groups to use for the normalization.
If <code>None</code>, it will skip the normalization and activation layers in post-processing`,name:"norm_num_groups"},{anchor:"diffusers.UNet2DConditionModel.norm_eps",description:"<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014; The epsilon to use for the normalization.",name:"norm_eps"},{anchor:"diffusers.UNet2DConditionModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>, defaults to 1280) &#x2014;
The dimension of the cross attention features.`,name:"cross_attention_dim"},{anchor:"diffusers.UNet2DConditionModel.encoder_hid_dim",description:`<strong>encoder_hid_dim</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
If given, <code>encoder_hidden_states</code> will be projected from this dimension to <code>cross_attention_dim</code>.`,name:"encoder_hid_dim"},{anchor:"diffusers.UNet2DConditionModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014; The dimension of the attention heads.",name:"attention_head_dim"},{anchor:"diffusers.UNet2DConditionModel.resnet_time_scale_shift",description:`<strong>resnet_time_scale_shift</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014; Time scale shift config
for resnet blocks, see <code>ResnetBlock2D</code>. Choose from <code>default</code> or <code>scale_shift</code>.`,name:"resnet_time_scale_shift"},{anchor:"diffusers.UNet2DConditionModel.class_embed_type",description:`<strong>class_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014;
The type of class embedding to use which is ultimately summed with the time embeddings. Choose from <code>None</code>,
<code>&quot;timestep&quot;</code>, <code>&quot;identity&quot;</code>, <code>&quot;projection&quot;</code>, or <code>&quot;simple_projection&quot;</code>.`,name:"class_embed_type"},{anchor:"diffusers.UNet2DConditionModel.addition_embed_type",description:`<strong>addition_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014;
Configures an optional embedding which will be summed with the time embeddings. Choose from <code>None</code> or
&#x201C;text&#x201D;. &#x201C;text&#x201D; will use the <code>TextTimeEmbedding</code> layer.`,name:"addition_embed_type"},{anchor:"diffusers.UNet2DConditionModel.num_class_embeds",description:`<strong>num_class_embeds</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Input dimension of the learnable embedding matrix to be projected to <code>time_embed_dim</code>, when performing
class conditioning with <code>class_embed_type</code> equal to <code>None</code>.`,name:"num_class_embeds"},{anchor:"diffusers.UNet2DConditionModel.time_embedding_type",description:`<strong>time_embedding_type</strong> (<code>str</code>, <em>optional</em>, default to <code>positional</code>) &#x2014;
The type of position embedding to use for timesteps. Choose from <code>positional</code> or <code>fourier</code>.`,name:"time_embedding_type"},{anchor:"diffusers.UNet2DConditionModel.time_embedding_dim",description:`<strong>time_embedding_dim</strong> (<code>int</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
An optional override for the dimension of the projected time embedding.`,name:"time_embedding_dim"},{anchor:"diffusers.UNet2DConditionModel.time_embedding_act_fn",description:`<strong>time_embedding_act_fn</strong> (<code>str</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
Optional activation function to use on the time embeddings only one time before they as passed to the rest
of the unet. Choose from <code>silu</code>, <code>mish</code>, <code>gelu</code>, and <code>swish</code>.`,name:"time_embedding_act_fn"},{anchor:"diffusers.UNet2DConditionModel.timestep_post_act",description:"<strong>timestep_post_act</strong> (<code>str, *optional*, default to </code>None<code>) -- The second activation function to use in timestep embedding. Choose from </code>silu<code>, </code>mish<code>and</code>gelu`.",name:"timestep_post_act"},{anchor:"diffusers.UNet2DConditionModel.time_cond_proj_dim",description:`<strong>time_cond_proj_dim</strong> (<code>int</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The dimension of <code>cond_proj</code> layer in timestep embedding.`,name:"time_cond_proj_dim"},{anchor:"diffusers.UNet2DConditionModel.conv_in_kernel",description:"<strong>conv_in_kernel</strong> (<code>int</code>, <em>optional</em>, default to <code>3</code>) &#x2014; The kernel size of <code>conv_in</code> layer.",name:"conv_in_kernel"},{anchor:"diffusers.UNet2DConditionModel.conv_out_kernel",description:"<strong>conv_out_kernel</strong> (<code>int</code>, <em>optional</em>, default to <code>3</code>) &#x2014; The kernel size of <code>conv_out</code> layer.",name:"conv_out_kernel"},{anchor:"diffusers.UNet2DConditionModel.projection_class_embeddings_input_dim",description:`<strong>projection_class_embeddings_input_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The dimension of the <code>class_labels</code> input when
using the &#x201C;projection&#x201D; <code>class_embed_type</code>. Required when using the &#x201C;projection&#x201D; <code>class_embed_type</code>.`,name:"projection_class_embeddings_input_dim"},{anchor:"diffusers.UNet2DConditionModel.class_embeddings_concat",description:`<strong>class_embeddings_concat</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to concatenate the time
embeddings with the class embeddings.`,name:"class_embeddings_concat"},{anchor:"diffusers.UNet2DConditionModel.mid_block_only_cross_attention",description:`<strong>mid_block_only_cross_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Whether to use cross attention with the mid block when using the <code>UNetMidBlock2DSimpleCrossAttn</code>. If
<code>only_cross_attention</code> is given as a single boolean and <code>mid_block_only_cross_attention</code> is None, the
<code>only_cross_attention</code> value will be used as the value for <code>mid_block_only_cross_attention</code>. Else, it will
default to <code>False</code>.`,name:"mid_block_only_cross_attention"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d_condition.py#L54"}}),tn=new y({props:{name:"forward",anchor:"diffusers.UNet2DConditionModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"encoder_hidden_states",val:": Tensor"},{name:"class_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"timestep_cond",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"down_block_additional_residuals",val:": typing.Optional[typing.Tuple[torch.Tensor]] = None"},{name:"mid_block_additional_residual",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; (batch, channel, height, width) noisy inputs tensor",name:"sample"},{anchor:"diffusers.UNet2DConditionModel.forward.timestep",description:"<strong>timestep</strong> (<code>torch.FloatTensor</code> or <code>float</code> or <code>int</code>) &#x2014; (batch) timesteps",name:"timestep"},{anchor:"diffusers.UNet2DConditionModel.forward.encoder_hidden_states",description:"<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code>) &#x2014; (batch, sequence_length, feature_dim) encoder hidden states",name:"encoder_hidden_states"},{anchor:"diffusers.UNet2DConditionModel.forward.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 <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput">models.unet_2d_condition.UNet2DConditionOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.UNet2DConditionModel.forward.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>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d_condition.py#L610",returnDescription:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput"
>UNet2DConditionOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple</code>. When
returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput"
>UNet2DConditionOutput</a> or <code>tuple</code></p>
`}}),nn=new y({props:{name:"set_attention_slice",anchor:"diffusers.UNet2DConditionModel.set_attention_slice",parameters:[{name:"slice_size",val:""}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.set_attention_slice.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code> or <code>list(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/v0.16.0/src/diffusers/models/unet_2d_condition.py#L541"}}),sn=new y({props:{name:"set_attn_processor",anchor:"diffusers.UNet2DConditionModel.set_attn_processor",parameters:[{name:"processor",val:": typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor, typing.Dict[str, typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor]]]"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.set_attn_processor.`processor",description:`<strong>\`processor</strong> (<code>dict</code> of <code>AttentionProcessor</code> or <code>AttentionProcessor</code>) &#x2014;
The instantiated processor class or a dictionary of processor classes that will be set as the processor
of <strong>all</strong> <code>Attention</code> layers.`,name:"`processor"},{anchor:"diffusers.UNet2DConditionModel.set_attn_processor.In",description:"<strong>In</strong> case <code>processor</code> is a dict, the key needs to define the path to the corresponding cross attention processor. This is strongly recommended when setting trainable attention processors. &#x2014;",name:"In"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d_condition.py#L505"}}),rn=new y({props:{name:"set_default_attn_processor",anchor:"diffusers.UNet2DConditionModel.set_default_attn_processor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d_condition.py#L535"}}),an=new M({}),ln=new y({props:{name:"class diffusers.models.unet_3d_condition.UNet3DConditionOutput",anchor:"diffusers.models.unet_3d_condition.UNet3DConditionOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.unet_3d_condition.UNet3DConditionOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_frames, num_channels, height, width)</code>) &#x2014;
Hidden states conditioned on <code>encoder_hidden_states</code> input. Output of last layer of model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_3d_condition.py#L44"}}),cn=new M({}),mn=new y({props:{name:"class diffusers.UNet3DConditionModel",anchor:"diffusers.UNet3DConditionModel",parameters:[{name:"sample_size",val:": typing.Optional[int] = None"},{name:"in_channels",val:": int = 4"},{name:"out_channels",val:": int = 4"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock3D', 'CrossAttnDownBlock3D', 'CrossAttnDownBlock3D', 'DownBlock3D')"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpBlock3D', 'CrossAttnUpBlock3D', 'CrossAttnUpBlock3D', 'CrossAttnUpBlock3D')"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"downsample_padding",val:": int = 1"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"norm_num_groups",val:": typing.Optional[int] = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"cross_attention_dim",val:": int = 1024"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 64"}],parametersDescription:[{anchor:"diffusers.UNet3DConditionModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code> or <code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Height and width of input/output sample.`,name:"sample_size"},{anchor:"diffusers.UNet3DConditionModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; The number of channels in the input sample.",name:"in_channels"},{anchor:"diffusers.UNet3DConditionModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; The number of channels in the output.",name:"out_channels"},{anchor:"diffusers.UNet3DConditionModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;DownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use.`,name:"down_block_types"},{anchor:"diffusers.UNet3DConditionModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;UpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;,)</code>) &#x2014;
The tuple of upsample blocks to use.`,name:"up_block_types"},{anchor:"diffusers.UNet3DConditionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.UNet3DConditionModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; The number of layers per block.",name:"layers_per_block"},{anchor:"diffusers.UNet3DConditionModel.downsample_padding",description:"<strong>downsample_padding</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The padding to use for the downsampling convolution.",name:"downsample_padding"},{anchor:"diffusers.UNet3DConditionModel.mid_block_scale_factor",description:"<strong>mid_block_scale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014; The scale factor to use for the mid block.",name:"mid_block_scale_factor"},{anchor:"diffusers.UNet3DConditionModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.UNet3DConditionModel.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014; The number of groups to use for the normalization.
If <code>None</code>, it will skip the normalization and activation layers in post-processing`,name:"norm_num_groups"},{anchor:"diffusers.UNet3DConditionModel.norm_eps",description:"<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014; The epsilon to use for the normalization.",name:"norm_eps"},{anchor:"diffusers.UNet3DConditionModel.cross_attention_dim",description:"<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1280) &#x2014; The dimension of the cross attention features.",name:"cross_attention_dim"},{anchor:"diffusers.UNet3DConditionModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014; The dimension of the attention heads.",name:"attention_head_dim"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_3d_condition.py#L54"}}),pn=new y({props:{name:"forward",anchor:"diffusers.UNet3DConditionModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"encoder_hidden_states",val:": Tensor"},{name:"class_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"timestep_cond",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"down_block_additional_residuals",val:": typing.Optional[typing.Tuple[torch.Tensor]] = None"},{name:"mid_block_additional_residual",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UNet3DConditionModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; (batch, num_frames, channel, height, width) noisy inputs tensor",name:"sample"},{anchor:"diffusers.UNet3DConditionModel.forward.timestep",description:"<strong>timestep</strong> (<code>torch.FloatTensor</code> or <code>float</code> or <code>int</code>) &#x2014; (batch) timesteps",name:"timestep"},{anchor:"diffusers.UNet3DConditionModel.forward.encoder_hidden_states",description:"<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code>) &#x2014; (batch, sequence_length, feature_dim) encoder hidden states",name:"encoder_hidden_states"},{anchor:"diffusers.UNet3DConditionModel.forward.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>models.unet_2d_condition.UNet3DConditionOutput</code> instead of a plain tuple.`,name:"return_dict"},{anchor:"diffusers.UNet3DConditionModel.forward.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>AttentionProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_3d_condition.py#L387",returnDescription:`
<p><code>~models.unet_2d_condition.UNet3DConditionOutput</code> if <code>return_dict</code> is True, otherwise a <code>tuple</code>. When
returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><code>~models.unet_2d_condition.UNet3DConditionOutput</code> or <code>tuple</code></p>
`}}),un=new y({props:{name:"set_attention_slice",anchor:"diffusers.UNet3DConditionModel.set_attention_slice",parameters:[{name:"slice_size",val:""}],parametersDescription:[{anchor:"diffusers.UNet3DConditionModel.set_attention_slice.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code> or <code>list(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/v0.16.0/src/diffusers/models/unet_3d_condition.py#L280"}}),hn=new y({props:{name:"set_attn_processor",anchor:"diffusers.UNet3DConditionModel.set_attn_processor",parameters:[{name:"processor",val:": typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor, typing.Dict[str, typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor]]]"}],parametersDescription:[{anchor:"diffusers.UNet3DConditionModel.set_attn_processor.`processor",description:`<strong>\`processor</strong> (<code>dict</code> of <code>AttentionProcessor</code> or <code>AttentionProcessor</code>) &#x2014;
The instantiated processor class or a dictionary of processor classes that will be set as the processor
of <strong>all</strong> <code>Attention</code> layers.`,name:"`processor"},{anchor:"diffusers.UNet3DConditionModel.set_attn_processor.In",description:"<strong>In</strong> case <code>processor</code> is a dict, the key needs to define the path to the corresponding cross attention processor. This is strongly recommended when setting trainable attention processors. &#x2014;",name:"In"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_3d_condition.py#L346"}}),_n=new y({props:{name:"set_default_attn_processor",anchor:"diffusers.UNet3DConditionModel.set_default_attn_processor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_3d_condition.py#L377"}}),gn=new M({}),bn=new y({props:{name:"class diffusers.models.vae.DecoderOutput",anchor:"diffusers.models.vae.DecoderOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.vae.DecoderOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Decoded output sample of the model. Output of the last layer of the model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/vae.py#L26"}}),vn=new M({}),yn=new y({props:{name:"class diffusers.models.vq_model.VQEncoderOutput",anchor:"diffusers.models.vq_model.VQEncoderOutput",parameters:[{name:"latents",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.vq_model.VQEncoderOutput.latents",description:`<strong>latents</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Encoded output sample of the model. Output of the last layer of the model.`,name:"latents"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/vq_model.py#L27"}}),xn=new M({}),$n=new y({props:{name:"class diffusers.VQModel",anchor:"diffusers.VQModel",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 3"},{name:"sample_size",val:": int = 32"},{name:"num_vq_embeddings",val:": int = 256"},{name:"norm_num_groups",val:": int = 32"},{name:"vq_embed_dim",val:": typing.Optional[int] = None"},{name:"scaling_factor",val:": float = 0.18215"}],parametersDescription:[{anchor:"diffusers.VQModel.in_channels",description:"<strong>in_channels</strong> (int, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.VQModel.out_channels",description:"<strong>out_channels</strong> (int,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.VQModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownEncoderBlock2D&quot;,)</code>): Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.VQModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;UpDecoderBlock2D&quot;,)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.VQModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(64,)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.VQModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.VQModel.latent_channels",description:"<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>3</code>) &#x2014; Number of channels in the latent space.",name:"latent_channels"},{anchor:"diffusers.VQModel.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; TODO",name:"sample_size"},{anchor:"diffusers.VQModel.num_vq_embeddings",description:"<strong>num_vq_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to <code>256</code>) &#x2014; Number of codebook vectors in the VQ-VAE.",name:"num_vq_embeddings"},{anchor:"diffusers.VQModel.vq_embed_dim",description:"<strong>vq_embed_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; Hidden dim of codebook vectors in the VQ-VAE.",name:"vq_embed_dim"},{anchor:"diffusers.VQModel.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.18215</code>) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <code>z = z * scaling_factor</code> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: <code>z = 1 / scaling_factor * z</code>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution Image
Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/vq_model.py#L39"}}),Dn=new y({props:{name:"forward",anchor:"diffusers.VQModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.VQModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; Input sample.",name:"sample"},{anchor:"diffusers.VQModel.forward.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>DecoderOutput</code> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/vq_model.py#L142"}}),kn=new M({}),Tn=new y({props:{name:"class diffusers.models.autoencoder_kl.AutoencoderKLOutput",anchor:"diffusers.models.autoencoder_kl.AutoencoderKLOutput",parameters:[{name:"latent_dist",val:": DiagonalGaussianDistribution"}],parametersDescription:[{anchor:"diffusers.models.autoencoder_kl.AutoencoderKLOutput.latent_dist",description:`<strong>latent_dist</strong> (<code>DiagonalGaussianDistribution</code>) &#x2014;
Encoded outputs of <code>Encoder</code> represented as the mean and logvar of <code>DiagonalGaussianDistribution</code>.
<code>DiagonalGaussianDistribution</code> allows for sampling latents from the distribution.`,name:"latent_dist"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L27"}}),Mn=new M({}),Nn=new y({props:{name:"class diffusers.AutoencoderKL",anchor:"diffusers.AutoencoderKL",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 4"},{name:"norm_num_groups",val:": int = 32"},{name:"sample_size",val:": int = 32"},{name:"scaling_factor",val:": float = 0.18215"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.in_channels",description:"<strong>in_channels</strong> (int, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.AutoencoderKL.out_channels",description:"<strong>out_channels</strong> (int,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.AutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownEncoderBlock2D&quot;,)</code>): Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.AutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;UpDecoderBlock2D&quot;,)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.AutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(64,)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.AutoencoderKL.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.AutoencoderKL.latent_channels",description:"<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; Number of channels in the latent space.",name:"latent_channels"},{anchor:"diffusers.AutoencoderKL.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; TODO",name:"sample_size"},{anchor:"diffusers.AutoencoderKL.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.18215) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <code>z = z * scaling_factor</code> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: <code>z = 1 / scaling_factor * z</code>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution Image
Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L40"}}),En=new y({props:{name:"disable_slicing",anchor:"diffusers.AutoencoderKL.disable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L152"}}),Cn=new y({props:{name:"disable_tiling",anchor:"diffusers.AutoencoderKL.disable_tiling",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L138"}}),Pn=new y({props:{name:"enable_slicing",anchor:"diffusers.AutoencoderKL.enable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L145"}}),On=new y({props:{name:"enable_tiling",anchor:"diffusers.AutoencoderKL.enable_tiling",parameters:[{name:"use_tiling",val:": bool = True"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L130"}}),qn=new y({props:{name:"forward",anchor:"diffusers.AutoencoderKL.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"sample_posterior",val:": bool = False"},{name:"return_dict",val:": bool = True"},{name:"generator",val:": typing.Optional[torch._C.Generator] = None"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; Input sample.",name:"sample"},{anchor:"diffusers.AutoencoderKL.forward.sample_posterior",description:`<strong>sample_posterior</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to sample from the posterior.`,name:"sample_posterior"},{anchor:"diffusers.AutoencoderKL.forward.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>DecoderOutput</code> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L302"}}),Ln=new y({props:{name:"tiled_decode",anchor:"diffusers.AutoencoderKL.tiled_decode",parameters:[{name:"z",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.tiled_decode.When",description:"<strong>When</strong> this option is enabled, the VAE will split the input tensor into tiles to compute decoding in several &#x2014;",name:"When"},{anchor:"diffusers.AutoencoderKL.tiled_decode.steps.",description:"<strong>steps.</strong> This is useful to keep memory use constant regardless of image size. The end result of tiled decoding is &#x2014;",name:"steps."},{anchor:"diffusers.AutoencoderKL.tiled_decode.different",description:"<strong>different</strong> from non-tiled decoding due to each tile using a different decoder. To avoid tiling artifacts, the &#x2014;",name:"different"},{anchor:"diffusers.AutoencoderKL.tiled_decode.tiles",description:"<strong>tiles</strong> overlap and are blended together to form a smooth output. You may still see tile-sized changes in the &#x2014;",name:"tiles"},{anchor:"diffusers.AutoencoderKL.tiled_decode.look",description:`<strong>look</strong> of the output, but they should be much less noticeable. &#x2014;
z (<code>torch.FloatTensor</code>): Input batch of latent vectors. return_dict (<code>bool</code>, <em>optional</em>, defaults to
<code>True</code>):
Whether or not to return a <code>DecoderOutput</code> instead of a plain tuple.`,name:"look"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L255"}}),jn=new y({props:{name:"tiled_encode",anchor:"diffusers.AutoencoderKL.tiled_encode",parameters:[{name:"x",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.tiled_encode.When",description:"<strong>When</strong> this option is enabled, the VAE will split the input tensor into tiles to compute encoding in several &#x2014;",name:"When"},{anchor:"diffusers.AutoencoderKL.tiled_encode.steps.",description:"<strong>steps.</strong> This is useful to keep memory use constant regardless of image size. The end result of tiled encoding is &#x2014;",name:"steps."},{anchor:"diffusers.AutoencoderKL.tiled_encode.different",description:"<strong>different</strong> from non-tiled encoding due to each tile using a different encoder. To avoid tiling artifacts, the &#x2014;",name:"different"},{anchor:"diffusers.AutoencoderKL.tiled_encode.tiles",description:"<strong>tiles</strong> overlap and are blended together to form a smooth output. You may still see tile-sized changes in the &#x2014;",name:"tiles"},{anchor:"diffusers.AutoencoderKL.tiled_encode.look",description:`<strong>look</strong> of the output, but they should be much less noticeable. &#x2014;
x (<code>torch.FloatTensor</code>): Input batch of images. return_dict (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>):
Whether or not to return a <code>AutoencoderKLOutput</code> instead of a plain tuple.`,name:"look"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/autoencoder_kl.py#L208"}}),In=new M({}),zn=new y({props:{name:"class diffusers.Transformer2DModel",anchor:"diffusers.Transformer2DModel",parameters:[{name:"num_attention_heads",val:": int = 16"},{name:"attention_head_dim",val:": int = 88"},{name:"in_channels",val:": typing.Optional[int] = None"},{name:"out_channels",val:": typing.Optional[int] = None"},{name:"num_layers",val:": int = 1"},{name:"dropout",val:": float = 0.0"},{name:"norm_num_groups",val:": int = 32"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"attention_bias",val:": bool = False"},{name:"sample_size",val:": typing.Optional[int] = None"},{name:"num_vector_embeds",val:": typing.Optional[int] = None"},{name:"patch_size",val:": typing.Optional[int] = None"},{name:"activation_fn",val:": str = 'geglu'"},{name:"num_embeds_ada_norm",val:": typing.Optional[int] = None"},{name:"use_linear_projection",val:": bool = False"},{name:"only_cross_attention",val:": bool = False"},{name:"upcast_attention",val:": bool = False"},{name:"norm_type",val:": str = 'layer_norm'"},{name:"norm_elementwise_affine",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.Transformer2DModel.num_attention_heads",description:"<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014; The number of heads to use for multi-head attention.",name:"num_attention_heads"},{anchor:"diffusers.Transformer2DModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 88) &#x2014; The number of channels in each head.",name:"attention_head_dim"},{anchor:"diffusers.Transformer2DModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Pass if the input is continuous. The number of channels in the input and output.`,name:"in_channels"},{anchor:"diffusers.Transformer2DModel.num_layers",description:"<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The number of layers of Transformer blocks to use.",name:"num_layers"},{anchor:"diffusers.Transformer2DModel.dropout",description:"<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014; The dropout probability to use.",name:"dropout"},{anchor:"diffusers.Transformer2DModel.cross_attention_dim",description:"<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The number of encoder_hidden_states dimensions to use.",name:"cross_attention_dim"},{anchor:"diffusers.Transformer2DModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>) &#x2014; Pass if the input is discrete. The width of the latent images.
Note that this is fixed at training time as it is used for learning a number of position embeddings. See
<code>ImagePositionalEmbeddings</code>.`,name:"sample_size"},{anchor:"diffusers.Transformer2DModel.num_vector_embeds",description:`<strong>num_vector_embeds</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Pass if the input is discrete. The number of classes of the vector embeddings of the latent pixels.
Includes the class for the masked latent pixel.`,name:"num_vector_embeds"},{anchor:"diffusers.Transformer2DModel.activation_fn",description:"<strong>activation_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;geglu&quot;</code>) &#x2014; Activation function to be used in feed-forward.",name:"activation_fn"},{anchor:"diffusers.Transformer2DModel.num_embeds_ada_norm",description:`<strong>num_embeds_ada_norm</strong> ( <code>int</code>, <em>optional</em>) &#x2014; Pass if at least one of the norm_layers is <code>AdaLayerNorm</code>.
The number of diffusion steps used during training. Note that this is fixed at training time as it is used
to learn a number of embeddings that are added to the hidden states. During inference, you can denoise for
up to but not more than steps than <code>num_embeds_ada_norm</code>.`,name:"num_embeds_ada_norm"},{anchor:"diffusers.Transformer2DModel.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Configure if the TransformerBlocks&#x2019; attention should contain a bias parameter.`,name:"attention_bias"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/transformer_2d.py#L41"}}),Bn=new y({props:{name:"forward",anchor:"diffusers.Transformer2DModel.forward",parameters:[{name:"hidden_states",val:""},{name:"encoder_hidden_states",val:" = None"},{name:"timestep",val:" = None"},{name:"class_labels",val:" = None"},{name:"cross_attention_kwargs",val:" = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.Transformer2DModel.forward.hidden_states",description:`<strong>hidden_states</strong> ( When discrete, <code>torch.LongTensor</code> of shape <code>(batch size, num latent pixels)</code>. &#x2014;
When continuous, <code>torch.FloatTensor</code> of shape <code>(batch size, channel, height, width)</code>): Input
hidden_states`,name:"hidden_states"},{anchor:"diffusers.Transformer2DModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> ( <code>torch.FloatTensor</code> of shape <code>(batch size, sequence len, embed dims)</code>, <em>optional</em>) &#x2014;
Conditional embeddings for cross attention layer. If not given, cross-attention defaults to
self-attention.`,name:"encoder_hidden_states"},{anchor:"diffusers.Transformer2DModel.forward.timestep",description:`<strong>timestep</strong> ( <code>torch.long</code>, <em>optional</em>) &#x2014;
Optional timestep to be applied as an embedding in AdaLayerNorm&#x2019;s. Used to indicate denoising step.`,name:"timestep"},{anchor:"diffusers.Transformer2DModel.forward.class_labels",description:`<strong>class_labels</strong> ( <code>torch.LongTensor</code> of shape <code>(batch size, num classes)</code>, <em>optional</em>) &#x2014;
Optional class labels to be applied as an embedding in AdaLayerZeroNorm. Used to indicate class labels
conditioning.`,name:"class_labels"},{anchor:"diffusers.Transformer2DModel.forward.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 <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput">models.unet_2d_condition.UNet2DConditionOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/transformer_2d.py#L214",returnDescription:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.transformer_2d.Transformer2DModelOutput"
>Transformer2DModelOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple</code>. When
returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.transformer_2d.Transformer2DModelOutput"
>Transformer2DModelOutput</a> or <code>tuple</code></p>
`}}),Sn=new M({}),Wn=new y({props:{name:"class diffusers.models.transformer_2d.Transformer2DModelOutput",anchor:"diffusers.models.transformer_2d.Transformer2DModelOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.transformer_2d.Transformer2DModelOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code> or <code>(batch size, num_vector_embeds - 1, num_latent_pixels)</code> if <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.Transformer2DModel">Transformer2DModel</a> is discrete) &#x2014;
Hidden states conditioned on <code>encoder_hidden_states</code> input. If discrete, returns probability distributions
for the unnoised latent pixels.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/transformer_2d.py#L30"}}),Xn=new M({}),Hn=new y({props:{name:"class diffusers.models.transformer_temporal.TransformerTemporalModel",anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel",parameters:[{name:"num_attention_heads",val:": int = 16"},{name:"attention_head_dim",val:": int = 88"},{name:"in_channels",val:": typing.Optional[int] = None"},{name:"out_channels",val:": typing.Optional[int] = None"},{name:"num_layers",val:": int = 1"},{name:"dropout",val:": float = 0.0"},{name:"norm_num_groups",val:": int = 32"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"attention_bias",val:": bool = False"},{name:"sample_size",val:": typing.Optional[int] = None"},{name:"activation_fn",val:": str = 'geglu'"},{name:"norm_elementwise_affine",val:": bool = True"},{name:"double_self_attention",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.num_attention_heads",description:"<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014; The number of heads to use for multi-head attention.",name:"num_attention_heads"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 88) &#x2014; The number of channels in each head.",name:"attention_head_dim"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Pass if the input is continuous. The number of channels in the input and output.`,name:"in_channels"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.num_layers",description:"<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The number of layers of Transformer blocks to use.",name:"num_layers"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.dropout",description:"<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014; The dropout probability to use.",name:"dropout"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.cross_attention_dim",description:"<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The number of encoder_hidden_states dimensions to use.",name:"cross_attention_dim"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>) &#x2014; Pass if the input is discrete. The width of the latent images.
Note that this is fixed at training time as it is used for learning a number of position embeddings. See
<code>ImagePositionalEmbeddings</code>.`,name:"sample_size"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.activation_fn",description:"<strong>activation_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;geglu&quot;</code>) &#x2014; Activation function to be used in feed-forward.",name:"activation_fn"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Configure if the TransformerBlocks&#x2019; attention should contain a bias parameter.`,name:"attention_bias"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.double_self_attention",description:`<strong>double_self_attention</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Configure if each TransformerBlock should contain two self-attention layers`,name:"double_self_attention"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/transformer_temporal.py#L37"}}),Qn=new y({props:{name:"forward",anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.forward",parameters:[{name:"hidden_states",val:""},{name:"encoder_hidden_states",val:" = None"},{name:"timestep",val:" = None"},{name:"class_labels",val:" = None"},{name:"num_frames",val:" = 1"},{name:"cross_attention_kwargs",val:" = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.forward.hidden_states",description:`<strong>hidden_states</strong> ( When discrete, <code>torch.LongTensor</code> of shape <code>(batch size, num latent pixels)</code>. &#x2014;
When continous, <code>torch.FloatTensor</code> of shape <code>(batch size, channel, height, width)</code>): Input
hidden_states`,name:"hidden_states"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> ( <code>torch.LongTensor</code> of shape <code>(batch size, encoder_hidden_states dim)</code>, <em>optional</em>) &#x2014;
Conditional embeddings for cross attention layer. If not given, cross-attention defaults to
self-attention.`,name:"encoder_hidden_states"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.forward.timestep",description:`<strong>timestep</strong> ( <code>torch.long</code>, <em>optional</em>) &#x2014;
Optional timestep to be applied as an embedding in AdaLayerNorm&#x2019;s. Used to indicate denoising step.`,name:"timestep"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.forward.class_labels",description:`<strong>class_labels</strong> ( <code>torch.LongTensor</code> of shape <code>(batch size, num classes)</code>, <em>optional</em>) &#x2014;
Optional class labels to be applied as an embedding in AdaLayerZeroNorm. Used to indicate class labels
conditioning.`,name:"class_labels"},{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModel.forward.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 <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput">models.unet_2d_condition.UNet2DConditionOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/transformer_temporal.py#L106",returnDescription:`
<p><code>~models.transformer_2d.TransformerTemporalModelOutput</code> if <code>return_dict</code> is True, otherwise a <code>tuple</code>.
When returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><code>~models.transformer_2d.TransformerTemporalModelOutput</code> or <code>tuple</code></p>
`}}),Rn=new M({}),Gn=new y({props:{name:"class diffusers.models.transformer_temporal.TransformerTemporalModelOutput",anchor:"diffusers.models.transformer_temporal.TransformerTemporalModelOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.transformer_temporal.TransformerTemporalModelOutput.sample",description:`<strong>sample</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size x num_frames, num_channels, height, width)</code>) &#x2014;
Hidden states conditioned on <code>encoder_hidden_states</code> input.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/transformer_temporal.py#L27"}}),Jn=new M({}),Zn=new y({props:{name:"class diffusers.PriorTransformer",anchor:"diffusers.PriorTransformer",parameters:[{name:"num_attention_heads",val:": int = 32"},{name:"attention_head_dim",val:": int = 64"},{name:"num_layers",val:": int = 20"},{name:"embedding_dim",val:": int = 768"},{name:"num_embeddings",val:" = 77"},{name:"additional_embeddings",val:" = 4"},{name:"dropout",val:": float = 0.0"}],parametersDescription:[{anchor:"diffusers.PriorTransformer.num_attention_heads",description:"<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014; The number of heads to use for multi-head attention.",name:"num_attention_heads"},{anchor:"diffusers.PriorTransformer.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014; The number of channels in each head.",name:"attention_head_dim"},{anchor:"diffusers.PriorTransformer.num_layers",description:"<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 20) &#x2014; The number of layers of Transformer blocks to use.",name:"num_layers"},{anchor:"diffusers.PriorTransformer.embedding_dim",description:`<strong>embedding_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014; The dimension of the CLIP embeddings. Note that CLIP
image embeddings and text embeddings are both the same dimension.`,name:"embedding_dim"},{anchor:"diffusers.PriorTransformer.num_embeddings",description:`<strong>num_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 77) &#x2014; The max number of clip embeddings allowed. I.e. the
length of the prompt after it has been tokenized.`,name:"num_embeddings"},{anchor:"diffusers.PriorTransformer.additional_embeddings",description:`<strong>additional_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; The number of additional tokens appended to the
projected hidden_states. The actual length of the used hidden_states is <code>num_embeddings + additional_embeddings</code>.`,name:"additional_embeddings"},{anchor:"diffusers.PriorTransformer.dropout",description:"<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014; The dropout probability to use.",name:"dropout"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/prior_transformer.py#L26"}}),ts=new y({props:{name:"forward",anchor:"diffusers.PriorTransformer.forward",parameters:[{name:"hidden_states",val:""},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"proj_embedding",val:": FloatTensor"},{name:"encoder_hidden_states",val:": FloatTensor"},{name:"attention_mask",val:": typing.Optional[torch.BoolTensor] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.PriorTransformer.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, embedding_dim)</code>) &#x2014;
x_t, the currently predicted image embeddings.`,name:"hidden_states"},{anchor:"diffusers.PriorTransformer.forward.timestep",description:`<strong>timestep</strong> (<code>torch.long</code>) &#x2014;
Current denoising step.`,name:"timestep"},{anchor:"diffusers.PriorTransformer.forward.proj_embedding",description:`<strong>proj_embedding</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, embedding_dim)</code>) &#x2014;
Projected embedding vector the denoising process is conditioned on.`,name:"proj_embedding"},{anchor:"diffusers.PriorTransformer.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_embeddings, embedding_dim)</code>) &#x2014;
Hidden states of the text embeddings the denoising process is conditioned on.`,name:"encoder_hidden_states"},{anchor:"diffusers.PriorTransformer.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, num_embeddings)</code>) &#x2014;
Text mask for the text embeddings.`,name:"attention_mask"},{anchor:"diffusers.PriorTransformer.forward.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 <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.prior_transformer.PriorTransformerOutput">models.prior_transformer.PriorTransformerOutput</a> instead of a plain
tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/prior_transformer.py#L107",returnDescription:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.prior_transformer.PriorTransformerOutput"
>PriorTransformerOutput</a> if <code>return_dict</code> is True, otherwise a <code>tuple</code>. When
returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><a
  href="/docs/diffusers/v0.16.0/en/api/models#diffusers.models.prior_transformer.PriorTransformerOutput"
>PriorTransformerOutput</a> or <code>tuple</code></p>
`}}),ns=new M({}),rs=new y({props:{name:"class diffusers.models.prior_transformer.PriorTransformerOutput",anchor:"diffusers.models.prior_transformer.PriorTransformerOutput",parameters:[{name:"predicted_image_embedding",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.prior_transformer.PriorTransformerOutput.predicted_image_embedding",description:`<strong>predicted_image_embedding</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, embedding_dim)</code>) &#x2014;
The predicted CLIP image embedding conditioned on the CLIP text embedding input.`,name:"predicted_image_embedding"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/prior_transformer.py#L16"}}),as=new M({}),ds=new y({props:{name:"class diffusers.models.controlnet.ControlNetOutput",anchor:"diffusers.models.controlnet.ControlNetOutput",parameters:[{name:"down_block_res_samples",val:": typing.Tuple[torch.Tensor]"},{name:"mid_block_res_sample",val:": Tensor"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/controlnet.py#L39"}}),ls=new M({}),cs=new y({props:{name:"class diffusers.ControlNetModel",anchor:"diffusers.ControlNetModel",parameters:[{name:"in_channels",val:": int = 4"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"downsample_padding",val:": int = 1"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"norm_num_groups",val:": typing.Optional[int] = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"cross_attention_dim",val:": int = 1280"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 8"},{name:"use_linear_projection",val:": bool = False"},{name:"class_embed_type",val:": typing.Optional[str] = None"},{name:"num_class_embeds",val:": typing.Optional[int] = None"},{name:"upcast_attention",val:": bool = False"},{name:"resnet_time_scale_shift",val:": str = 'default'"},{name:"projection_class_embeddings_input_dim",val:": typing.Optional[int] = None"},{name:"controlnet_conditioning_channel_order",val:": str = 'rgb'"},{name:"conditioning_embedding_out_channels",val:": typing.Optional[typing.Tuple[int]] = (16, 32, 96, 256)"},{name:"global_pool_conditions",val:": bool = False"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/controlnet.py#L89"}}),ms=new y({props:{name:"from_unet",anchor:"diffusers.ControlNetModel.from_unet",parameters:[{name:"unet",val:": UNet2DConditionModel"},{name:"controlnet_conditioning_channel_order",val:": str = 'rgb'"},{name:"conditioning_embedding_out_channels",val:": typing.Optional[typing.Tuple[int]] = (16, 32, 96, 256)"},{name:"load_weights_from_unet",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.ControlNetModel.from_unet.unet",description:`<strong>unet</strong> (<code>UNet2DConditionModel</code>) &#x2014;
UNet model which weights are copied to the ControlNet. Note that all configuration options are also
copied where applicable.`,name:"unet"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/controlnet.py#L262"}}),fs=new y({props:{name:"set_attention_slice",anchor:"diffusers.ControlNetModel.set_attention_slice",parameters:[{name:"slice_size",val:""}],parametersDescription:[{anchor:"diffusers.ControlNetModel.set_attention_slice.slice_size",description:`<strong>slice_size</strong> (<code>str</code> or <code>int</code> or <code>list(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/v0.16.0/src/diffusers/models/controlnet.py#L380"}}),ps=new y({props:{name:"set_attn_processor",anchor:"diffusers.ControlNetModel.set_attn_processor",parameters:[{name:"processor",val:": typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor, typing.Dict[str, typing.Union[diffusers.models.attention_processor.AttnProcessor, diffusers.models.attention_processor.AttnProcessor2_0, diffusers.models.attention_processor.XFormersAttnProcessor, diffusers.models.attention_processor.SlicedAttnProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor, diffusers.models.attention_processor.SlicedAttnAddedKVProcessor, diffusers.models.attention_processor.AttnAddedKVProcessor2_0, diffusers.models.attention_processor.LoRAAttnProcessor, diffusers.models.attention_processor.LoRAXFormersAttnProcessor, diffusers.models.attention_processor.CustomDiffusionAttnProcessor, diffusers.models.attention_processor.CustomDiffusionXFormersAttnProcessor]]]"}],parametersDescription:[{anchor:"diffusers.ControlNetModel.set_attn_processor.`processor",description:`<strong>\`processor</strong> (<code>dict</code> of <code>AttentionProcessor</code> or <code>AttentionProcessor</code>) &#x2014;
The instantiated processor class or a dictionary of processor classes that will be set as the processor
of <strong>all</strong> <code>Attention</code> layers.`,name:"`processor"},{anchor:"diffusers.ControlNetModel.set_attn_processor.In",description:"<strong>In</strong> case <code>processor</code> is a dict, the key needs to define the path to the corresponding cross attention processor. This is strongly recommended when setting trainable attention processors. &#x2014;",name:"In"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/controlnet.py#L342"}}),us=new y({props:{name:"set_default_attn_processor",anchor:"diffusers.ControlNetModel.set_default_attn_processor",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/controlnet.py#L373"}}),hs=new M({}),_s=new y({props:{name:"class diffusers.FlaxModelMixin",anchor:"diffusers.FlaxModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_flax_utils.py#L45"}}),gs=new y({props:{name:"from_pretrained",anchor:"diffusers.FlaxModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"*model_args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids are namespaced under a user or organization name, like
<code>runwayml/stable-diffusion-v1-5</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <a href="/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin.save_pretrained">save_pretrained()</a>,
e.g., <code>./my_model_directory/</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <code>~ModelMixin.to_fp16</code> and
<code>~ModelMixin.to_bf16</code>.`,name:"dtype"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.model_args",description:`<strong>model_args</strong> (sequence of positional arguments, <em>optional</em>) &#x2014;
All remaining positional arguments will be passed to the underlying model&#x2019;s <code>__init__</code> method.`,name:"model_args"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.from_pt",description:`<strong>from_pt</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a PyTorch checkpoint save file.`,name:"from_pt"},{anchor:"diffusers.FlaxModelMixin.from_pretrained.kwargs",description:`<strong>kwargs</strong> (remaining dictionary of keyword arguments, <em>optional</em>) &#x2014;
Can be used to update the configuration object (after it being loaded) and initiate the model (e.g.,
<code>output_attentions=True</code>). Behaves differently depending on whether a <code>config</code> is provided or
automatically loaded:</p>
<ul>
<li>If a configuration is provided with <code>config</code>, <code>**kwargs</code> will be directly passed to the
underlying model&#x2019;s <code>__init__</code> method (we assume all relevant updates to the configuration have
already been done)</li>
<li>If a configuration is not provided, <code>kwargs</code> will be first passed to the configuration class
initialization function (<a href="/docs/diffusers/v0.16.0/en/api/configuration#diffusers.ConfigMixin.from_config">from_config()</a>). Each key of <code>kwargs</code> that corresponds to
a configuration attribute will be used to override said attribute with the supplied <code>kwargs</code>
value. Remaining keys that do not correspond to any configuration attribute will be passed to the
underlying model&#x2019;s <code>__init__</code> function.</li>
</ul>`,name:"kwargs"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_flax_utils.py#L195"}}),et=new Qd({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example",$$slots:{default:[ry]},$$scope:{ctx:I}}}),ys=new y({props:{name:"save_pretrained",anchor:"diffusers.FlaxModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"is_main_process",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.FlaxModelMixin.save_pretrained.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful when in distributed training like
TPUs and need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on
the main process to avoid race conditions.`,name:"is_main_process"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_flax_utils.py#L487"}}),$s=new y({props:{name:"to_bf16",anchor:"diffusers.FlaxModelMixin.to_bf16",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_bf16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_bf16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans, <code>True</code> for params
you want to cast, and should be <code>False</code> for those you want to skip.`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_flax_utils.py#L87"}}),tt=new Qd({props:{anchor:"diffusers.FlaxModelMixin.to_bf16.example",$$slots:{default:[ay]},$$scope:{ctx:I}}}),ws=new y({props:{name:"to_fp16",anchor:"diffusers.FlaxModelMixin.to_fp16",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_fp16.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_fp16.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans, <code>True</code> for params
you want to cast, and should be <code>False</code> for those you want to skip`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_flax_utils.py#L153"}}),nt=new Qd({props:{anchor:"diffusers.FlaxModelMixin.to_fp16.example",$$slots:{default:[iy]},$$scope:{ctx:I}}}),Ds=new y({props:{name:"to_fp32",anchor:"diffusers.FlaxModelMixin.to_fp32",parameters:[{name:"params",val:": typing.Union[typing.Dict, flax.core.frozen_dict.FrozenDict]"},{name:"mask",val:": typing.Any = None"}],parametersDescription:[{anchor:"diffusers.FlaxModelMixin.to_fp32.params",description:`<strong>params</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> of model parameters.`,name:"params"},{anchor:"diffusers.FlaxModelMixin.to_fp32.mask",description:`<strong>mask</strong> (<code>Union[Dict, FrozenDict]</code>) &#x2014;
A <code>PyTree</code> with same structure as the <code>params</code> tree. The leaves should be booleans, <code>True</code> for params
you want to cast, and should be <code>False</code> for those you want to skip`,name:"mask"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/modeling_flax_utils.py#L126"}}),st=new Qd({props:{anchor:"diffusers.FlaxModelMixin.to_fp32.example",$$slots:{default:[dy]},$$scope:{ctx:I}}}),ks=new M({}),Ts=new y({props:{name:"class diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput",anchor:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput",parameters:[{name:"sample",val:": ndarray"}],parametersDescription:[{anchor:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput.sample",description:`<strong>sample</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_channels, height, width)</code>) &#x2014;
Hidden states conditioned on <code>encoder_hidden_states</code> input. Output of last layer of model.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d_condition_flax.py#L36"}}),Ms=new y({props:{name:"replace",anchor:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/flax/struct.py#L108"}}),Ns=new M({}),As=new y({props:{name:"class diffusers.FlaxUNet2DConditionModel",anchor:"diffusers.FlaxUNet2DConditionModel",parameters:[{name:"sample_size",val:": int = 32"},{name:"in_channels",val:": int = 4"},{name:"out_channels",val:": int = 4"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 8"},{name:"cross_attention_dim",val:": int = 1280"},{name:"dropout",val:": float = 0.0"},{name:"use_linear_projection",val:": bool = False"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"use_memory_efficient_attention",val:": bool = False"},{name:"parent",val:": typing.Union[typing.Type[flax.linen.module.Module], typing.Type[flax.core.scope.Scope], typing.Type[flax.linen.module._Sentinel], NoneType] = <flax.linen.module._Sentinel object at 0x7ff2943c0550>"},{name:"name",val:": str = None"}],parametersDescription:[{anchor:"diffusers.FlaxUNet2DConditionModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The size of the input sample.`,name:"sample_size"},{anchor:"diffusers.FlaxUNet2DConditionModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of channels in the input sample.`,name:"in_channels"},{anchor:"diffusers.FlaxUNet2DConditionModel.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of channels in the output.`,name:"out_channels"},{anchor:"diffusers.FlaxUNet2DConditionModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;DownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use. The corresponding class names will be: &#x201C;FlaxCrossAttnDownBlock2D&#x201D;,
&#x201C;FlaxCrossAttnDownBlock2D&#x201D;, &#x201C;FlaxCrossAttnDownBlock2D&#x201D;, &#x201C;FlaxDownBlock2D&#x201D;`,name:"down_block_types"},{anchor:"diffusers.FlaxUNet2DConditionModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;UpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;,)</code>) &#x2014;
The tuple of upsample blocks to use. The corresponding class names will be: &#x201C;FlaxUpBlock2D&#x201D;,
&#x201C;FlaxCrossAttnUpBlock2D&#x201D;, &#x201C;FlaxCrossAttnUpBlock2D&#x201D;, &#x201C;FlaxCrossAttnUpBlock2D&#x201D;`,name:"up_block_types"},{anchor:"diffusers.FlaxUNet2DConditionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.FlaxUNet2DConditionModel.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of layers per block.`,name:"layers_per_block"},{anchor:"diffusers.FlaxUNet2DConditionModel.attention_head_dim",description:`<strong>attention_head_dim</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>, defaults to 8) &#x2014;
The dimension of the attention heads.`,name:"attention_head_dim"},{anchor:"diffusers.FlaxUNet2DConditionModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
The dimension of the cross attention features.`,name:"cross_attention_dim"},{anchor:"diffusers.FlaxUNet2DConditionModel.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
Dropout probability for down, up and bottleneck blocks.`,name:"dropout"},{anchor:"diffusers.FlaxUNet2DConditionModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to flip the sin to cos in the time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.FlaxUNet2DConditionModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The frequency shift to apply to the time embedding.",name:"freq_shift"},{anchor:"diffusers.FlaxUNet2DConditionModel.use_memory_efficient_attention",description:`<strong>use_memory_efficient_attention</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
enable memory efficient attention <a href="https://arxiv.org/abs/2112.05682" rel="nofollow">https://arxiv.org/abs/2112.05682</a>`,name:"use_memory_efficient_attention"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/unet_2d_condition_flax.py#L47"}}),Ls=new M({}),js=new y({props:{name:"class diffusers.models.vae_flax.FlaxDecoderOutput",anchor:"diffusers.models.vae_flax.FlaxDecoderOutput",parameters:[{name:"sample",val:": ndarray"}],parametersDescription:[{anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.sample",description:`<strong>sample</strong> (<em>jnp.ndarray</em> of shape <em>(batch_size, num_channels, height, width)</em>) &#x2014;
Decoded output sample of the model. Output of the last layer of the model.`,name:"sample"},{anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.dtype",description:`<strong>dtype</strong> (<code>jnp.dtype</code>, <em>optional</em>, defaults to jnp.float32) &#x2014;
Parameters <em>dtype</em>`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/vae_flax.py#L33"}}),Is=new y({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/flax/struct.py#L108"}}),zs=new M({}),Vs=new y({props:{name:"class diffusers.models.vae_flax.FlaxAutoencoderKLOutput",anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput",parameters:[{name:"latent_dist",val:": FlaxDiagonalGaussianDistribution"}],parametersDescription:[{anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput.latent_dist",description:`<strong>latent_dist</strong> (<code>FlaxDiagonalGaussianDistribution</code>) &#x2014;
Encoded outputs of <code>Encoder</code> represented as the mean and logvar of <code>FlaxDiagonalGaussianDistribution</code>.
<code>FlaxDiagonalGaussianDistribution</code> allows for sampling latents from the distribution.`,name:"latent_dist"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/vae_flax.py#L48"}}),Bs=new y({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/flax/struct.py#L108"}}),Ss=new M({}),Ks=new y({props:{name:"class diffusers.FlaxAutoencoderKL",anchor:"diffusers.FlaxAutoencoderKL",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 4"},{name:"norm_num_groups",val:": int = 32"},{name:"sample_size",val:": int = 32"},{name:"scaling_factor",val:": float = 0.18215"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"parent",val:": typing.Union[typing.Type[flax.linen.module.Module], typing.Type[flax.core.scope.Scope], typing.Type[flax.linen.module._Sentinel], NoneType] = <flax.linen.module._Sentinel object at 0x7ff2943c0550>"},{name:"name",val:": str = None"}],parametersDescription:[{anchor:"diffusers.FlaxAutoencoderKL.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Input channels`,name:"in_channels"},{anchor:"diffusers.FlaxAutoencoderKL.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Output channels`,name:"out_channels"},{anchor:"diffusers.FlaxAutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(DownEncoderBlock2D)</em>) &#x2014;
DownEncoder block type`,name:"down_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(UpDecoderBlock2D)</em>) &#x2014;
UpDecoder block type`,name:"up_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(64,)</em>) &#x2014;
Tuple containing the number of output channels for each block`,name:"block_out_channels"},{anchor:"diffusers.FlaxAutoencoderKL.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to <em>2</em>) &#x2014;
Number of Resnet layer for each block`,name:"layers_per_block"},{anchor:"diffusers.FlaxAutoencoderKL.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <em>silu</em>) &#x2014;
Activation function`,name:"act_fn"},{anchor:"diffusers.FlaxAutoencoderKL.latent_channels",description:`<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <em>4</em>) &#x2014;
Latent space channels`,name:"latent_channels"},{anchor:"diffusers.FlaxAutoencoderKL.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to <em>32</em>) &#x2014;
Norm num group`,name:"norm_num_groups"},{anchor:"diffusers.FlaxAutoencoderKL.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Sample input size`,name:"sample_size"},{anchor:"diffusers.FlaxAutoencoderKL.scaling_factor",description:`<strong>scaling_factor</strong> (<em>float</em>, <em>optional</em>, defaults to 0.18215) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <em>z = z </em> scaling_factor<em> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: </em>z = 1
/ scaling_factor <em> z</em>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution Image
Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"},{anchor:"diffusers.FlaxAutoencoderKL.dtype",description:`<strong>dtype</strong> (<code>jnp.dtype</code>, <em>optional</em>, defaults to jnp.float32) &#x2014;
parameters <em>dtype</em>`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/vae_flax.py#L721"}}),Gs=new M({}),Js=new y({props:{name:"class diffusers.models.controlnet_flax.FlaxControlNetOutput",anchor:"diffusers.models.controlnet_flax.FlaxControlNetOutput",parameters:[{name:"down_block_res_samples",val:": ndarray"},{name:"mid_block_res_sample",val:": ndarray"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/controlnet_flax.py#L34"}}),Zs=new y({props:{name:"replace",anchor:"diffusers.models.controlnet_flax.FlaxControlNetOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/flax/struct.py#L108"}}),er=new M({}),or=new y({props:{name:"class diffusers.FlaxControlNetModel",anchor:"diffusers.FlaxControlNetModel",parameters:[{name:"sample_size",val:": int = 32"},{name:"in_channels",val:": int = 4"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 8"},{name:"cross_attention_dim",val:": int = 1280"},{name:"dropout",val:": float = 0.0"},{name:"use_linear_projection",val:": bool = False"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"controlnet_conditioning_channel_order",val:": str = 'rgb'"},{name:"conditioning_embedding_out_channels",val:": typing.Tuple[int] = (16, 32, 96, 256)"},{name:"parent",val:": typing.Union[typing.Type[flax.linen.module.Module], typing.Type[flax.core.scope.Scope], typing.Type[flax.linen.module._Sentinel], NoneType] = <flax.linen.module._Sentinel object at 0x7ff2943c0550>"},{name:"name",val:": str = None"}],parametersDescription:[{anchor:"diffusers.FlaxControlNetModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The size of the input sample.`,name:"sample_size"},{anchor:"diffusers.FlaxControlNetModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The number of channels in the input sample.`,name:"in_channels"},{anchor:"diffusers.FlaxControlNetModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;DownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use. The corresponding class names will be: &#x201C;FlaxCrossAttnDownBlock2D&#x201D;,
&#x201C;FlaxCrossAttnDownBlock2D&#x201D;, &#x201C;FlaxCrossAttnDownBlock2D&#x201D;, &#x201C;FlaxDownBlock2D&#x201D;`,name:"down_block_types"},{anchor:"diffusers.FlaxControlNetModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.FlaxControlNetModel.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of layers per block.`,name:"layers_per_block"},{anchor:"diffusers.FlaxControlNetModel.attention_head_dim",description:`<strong>attention_head_dim</strong> (<code>int</code> or <code>Tuple[int]</code>, <em>optional</em>, defaults to 8) &#x2014;
The dimension of the attention heads.`,name:"attention_head_dim"},{anchor:"diffusers.FlaxControlNetModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
The dimension of the cross attention features.`,name:"cross_attention_dim"},{anchor:"diffusers.FlaxControlNetModel.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
Dropout probability for down, up and bottleneck blocks.`,name:"dropout"},{anchor:"diffusers.FlaxControlNetModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to flip the sin to cos in the time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.FlaxControlNetModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The frequency shift to apply to the time embedding.",name:"freq_shift"},{anchor:"diffusers.FlaxControlNetModel.controlnet_conditioning_channel_order",description:`<strong>controlnet_conditioning_channel_order</strong> (<code>str</code>, <em>optional</em>, defaults to <code>rgb</code>) &#x2014;
The channel order of conditional image. Will convert it to <code>rgb</code> if it&#x2019;s <code>bgr</code>`,name:"controlnet_conditioning_channel_order"},{anchor:"diffusers.FlaxControlNetModel.conditioning_embedding_out_channels",description:`<strong>conditioning_embedding_out_channels</strong> (<code>tuple</code>, <em>optional</em>, defaults to <code>(16, 32, 96, 256)</code>) &#x2014;
The tuple of output channel for each block in conditioning_embedding layer`,name:"conditioning_embedding_out_channels"}],source:"https://github.com/huggingface/diffusers/blob/v0.16.0/src/diffusers/models/controlnet_flax.py#L96"}}),{c(){x=n("meta"),T=i(),D=n("h1"),$=n("a"),k=n("span"),p(v.$$.fragment),w=i(),ne=n("span"),Ee=l("Models"),R=i(),Y=n("p"),pr=l(`Diffusers contains pretrained models for popular algorithms and modules for creating the next set of diffusion models.
The primary function of these models is to denoise an input sample, by modeling the distribution $p`),Gr=n("em"),km=l("\\theta(\\mathbf{x}"),Tm=l(`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),Jr=n("code"),Mm=l("torch.nn.module"),Nm=l(" with basic functionality for saving and loading models both locally and from the HuggingFace hub."),Gd=i(),Ue=n("h2"),ho=n("a"),Zr=n("span"),p(Dt.$$.fragment),Am=i(),ea=n("span"),Em=l("ModelMixin"),Jd=i(),N=n("div"),p(kt.$$.fragment),Um=i(),oa=n("p"),Cm=l("Base class for all models."),Fm=i(),ur=n("p"),hr=n("a"),Pm=l("ModelMixin"),Om=l(` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),qm=i(),ta=n("ul"),he=n("li"),na=n("strong"),Lm=l("config_name"),jm=l(" ("),sa=n("code"),Im=l("str"),zm=l(`) \u2014 A filename under which the model should be stored when calling
`),_r=n("a"),Vm=l("save_pretrained()"),Bm=l("."),Sm=i(),_e=n("div"),p(Tt.$$.fragment),Km=i(),ra=n("p"),Wm=l("Deactivates gradient checkpointing for the current model."),Xm=i(),aa=n("p"),Hm=l(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Qm=i(),_o=n("div"),p(Mt.$$.fragment),Rm=i(),ia=n("p"),Ym=l("Disable memory efficient attention as implemented in xformers."),Gm=i(),ge=n("div"),p(Nt.$$.fragment),Jm=i(),da=n("p"),Zm=l("Activates gradient checkpointing for the current model."),ef=i(),la=n("p"),of=l(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),tf=i(),K=n("div"),p(At.$$.fragment),nf=i(),ca=n("p"),sf=l("Enable memory efficient attention as implemented in xformers."),rf=i(),ma=n("p"),af=l(`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),df=i(),fa=n("p"),lf=l(`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),cf=i(),p(go.$$.fragment),mf=i(),O=n("div"),p(Et.$$.fragment),ff=i(),pa=n("p"),pf=l("Instantiate a pretrained pytorch model from a pre-trained model configuration."),uf=i(),Ce=n("p"),hf=l("The model is set in evaluation mode by default using "),ua=n("code"),_f=l("model.eval()"),gf=l(` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),ha=n("code"),bf=l("model.train()"),vf=l("."),yf=i(),Ut=n("p"),xf=l("The warning "),_a=n("em"),$f=l("Weights from XXX not initialized from pretrained model"),wf=l(` means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`),Df=i(),Ct=n("p"),kf=l("The warning "),ga=n("em"),Tf=l("Weights from XXX not used in YYY"),Mf=l(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Nf=i(),p(bo.$$.fragment),Af=i(),p(vo.$$.fragment),Ef=i(),yo=n("div"),p(Ft.$$.fragment),Uf=i(),ba=n("p"),Cf=l("Get number of (optionally, trainable or non-embeddings) parameters in the module."),Ff=i(),xo=n("div"),p(Pt.$$.fragment),Pf=i(),Ot=n("p"),Of=l(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),va=n("code"),qf=l("[from_pretrained()](/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin.from_pretrained)"),Lf=l(" class method."),Zd=i(),Fe=n("h2"),$o=n("a"),ya=n("span"),p(qt.$$.fragment),jf=i(),xa=n("span"),If=l("UNet2DOutput"),el=i(),Lt=n("div"),p(jt.$$.fragment),ol=i(),Pe=n("h2"),wo=n("a"),$a=n("span"),p(It.$$.fragment),zf=i(),wa=n("span"),Vf=l("UNet2DModel"),tl=i(),G=n("div"),p(zt.$$.fragment),Bf=i(),Da=n("p"),Sf=l("UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Kf=i(),Vt=n("p"),Wf=l("This model inherits from "),gr=n("a"),Xf=l("ModelMixin"),Hf=l(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Qf=i(),br=n("div"),p(Bt.$$.fragment),nl=i(),Oe=n("h2"),Do=n("a"),ka=n("span"),p(St.$$.fragment),Rf=i(),Ta=n("span"),Yf=l("UNet1DOutput"),sl=i(),Kt=n("div"),p(Wt.$$.fragment),rl=i(),qe=n("h2"),ko=n("a"),Ma=n("span"),p(Xt.$$.fragment),Gf=i(),Na=n("span"),Jf=l("UNet1DModel"),al=i(),J=n("div"),p(Ht.$$.fragment),Zf=i(),Aa=n("p"),ep=l("UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),op=i(),Qt=n("p"),tp=l("This model inherits from "),vr=n("a"),np=l("ModelMixin"),sp=l(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),rp=i(),yr=n("div"),p(Rt.$$.fragment),il=i(),Le=n("h2"),To=n("a"),Ea=n("span"),p(Yt.$$.fragment),ap=i(),Ua=n("span"),ip=l("UNet2DConditionOutput"),dl=i(),Gt=n("div"),p(Jt.$$.fragment),ll=i(),je=n("h2"),Mo=n("a"),Ca=n("span"),p(Zt.$$.fragment),dp=i(),Fa=n("span"),lp=l("UNet2DConditionModel"),cl=i(),F=n("div"),p(en.$$.fragment),cp=i(),Pa=n("p"),mp=l(`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),fp=i(),on=n("p"),pp=l("This model inherits from "),xr=n("a"),up=l("ModelMixin"),hp=l(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),_p=i(),$r=n("div"),p(tn.$$.fragment),gp=i(),be=n("div"),p(nn.$$.fragment),bp=i(),Oa=n("p"),vp=l("Enable sliced attention computation."),yp=i(),qa=n("p"),xp=l(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),$p=i(),wr=n("div"),p(sn.$$.fragment),wp=i(),No=n("div"),p(rn.$$.fragment),Dp=i(),La=n("p"),kp=l("Disables custom attention processors and sets the default attention implementation."),ml=i(),Ie=n("h2"),Ao=n("a"),ja=n("span"),p(an.$$.fragment),Tp=i(),Ia=n("span"),Mp=l("UNet3DConditionOutput"),fl=i(),dn=n("div"),p(ln.$$.fragment),pl=i(),ze=n("h2"),Eo=n("a"),za=n("span"),p(cn.$$.fragment),Np=i(),Va=n("span"),Ap=l("UNet3DConditionModel"),ul=i(),P=n("div"),p(mn.$$.fragment),Ep=i(),Ba=n("p"),Up=l(`UNet3DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Cp=i(),fn=n("p"),Fp=l("This model inherits from "),Dr=n("a"),Pp=l("ModelMixin"),Op=l(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),qp=i(),kr=n("div"),p(pn.$$.fragment),Lp=i(),ve=n("div"),p(un.$$.fragment),jp=i(),Sa=n("p"),Ip=l("Enable sliced attention computation."),zp=i(),Ka=n("p"),Vp=l(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),Bp=i(),Tr=n("div"),p(hn.$$.fragment),Sp=i(),Uo=n("div"),p(_n.$$.fragment),Kp=i(),Wa=n("p"),Wp=l("Disables custom attention processors and sets the default attention implementation."),hl=i(),Ve=n("h2"),Co=n("a"),Xa=n("span"),p(gn.$$.fragment),Xp=i(),Ha=n("span"),Hp=l("DecoderOutput"),_l=i(),Be=n("div"),p(bn.$$.fragment),Qp=i(),Qa=n("p"),Rp=l("Output of decoding method."),gl=i(),Se=n("h2"),Fo=n("a"),Ra=n("span"),p(vn.$$.fragment),Yp=i(),Ya=n("span"),Gp=l("VQEncoderOutput"),bl=i(),Ke=n("div"),p(yn.$$.fragment),Jp=i(),Ga=n("p"),Zp=l("Output of VQModel encoding method."),vl=i(),We=n("h2"),Po=n("a"),Ja=n("span"),p(xn.$$.fragment),eu=i(),Za=n("span"),ou=l("VQModel"),yl=i(),Z=n("div"),p($n.$$.fragment),tu=i(),ei=n("p"),nu=l(`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),su=i(),wn=n("p"),ru=l("This model inherits from "),Mr=n("a"),au=l("ModelMixin"),iu=l(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),du=i(),Nr=n("div"),p(Dn.$$.fragment),xl=i(),Xe=n("h2"),Oo=n("a"),oi=n("span"),p(kn.$$.fragment),lu=i(),ti=n("span"),cu=l("AutoencoderKLOutput"),$l=i(),He=n("div"),p(Tn.$$.fragment),mu=i(),ni=n("p"),fu=l("Output of AutoencoderKL encoding method."),wl=i(),Qe=n("h2"),qo=n("a"),si=n("span"),p(Mn.$$.fragment),pu=i(),ri=n("span"),uu=l("AutoencoderKL"),Dl=i(),A=n("div"),p(Nn.$$.fragment),hu=i(),ai=n("p"),_u=l(`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),gu=i(),An=n("p"),bu=l("This model inherits from "),Ar=n("a"),vu=l("ModelMixin"),yu=l(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),xu=i(),Lo=n("div"),p(En.$$.fragment),$u=i(),Un=n("p"),wu=l("Disable sliced VAE decoding. If "),ii=n("code"),Du=l("enable_slicing"),ku=l(` was previously invoked, this method will go back to computing
decoding in one step.`),Tu=i(),jo=n("div"),p(Cn.$$.fragment),Mu=i(),Fn=n("p"),Nu=l("Disable tiled VAE decoding. If "),di=n("code"),Au=l("enable_vae_tiling"),Eu=l(` was previously invoked, this method will go back to
computing decoding in one step.`),Uu=i(),Io=n("div"),p(Pn.$$.fragment),Cu=i(),li=n("p"),Fu=l(`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.`),Pu=i(),zo=n("div"),p(On.$$.fragment),Ou=i(),ci=n("p"),qu=l(`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful to save a large amount of memory and to allow
the processing of larger images.`),Lu=i(),Er=n("div"),p(qn.$$.fragment),ju=i(),Vo=n("div"),p(Ln.$$.fragment),Iu=i(),mi=n("p"),zu=l("Decode a batch of images using a tiled decoder."),Vu=i(),Bo=n("div"),p(jn.$$.fragment),Bu=i(),fi=n("p"),Su=l("Encode a batch of images using a tiled encoder."),kl=i(),Re=n("h2"),So=n("a"),pi=n("span"),p(In.$$.fragment),Ku=i(),ui=n("span"),Wu=l("Transformer2DModel"),Tl=i(),q=n("div"),p(zn.$$.fragment),Xu=i(),hi=n("p"),Hu=l(`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),Qu=i(),_i=n("p"),Ru=l(`When input is continuous: First, project the input (aka embedding) and reshape to b, t, d. Then apply standard
transformer action. Finally, reshape to image.`),Yu=i(),Vn=n("p"),Gu=l(`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),gi=n("code"),Ju=l("ImagePositionalEmbeddings"),Zu=l(`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),eh=i(),bi=n("p"),oh=l(`Note that it is assumed one of the input classes is the masked latent pixel. The predicted classes of the unnoised
image do not contain a prediction for the masked pixel as the unnoised image cannot be masked.`),th=i(),Ur=n("div"),p(Bn.$$.fragment),Ml=i(),Ye=n("h2"),Ko=n("a"),vi=n("span"),p(Sn.$$.fragment),nh=i(),yi=n("span"),sh=l("Transformer2DModelOutput"),Nl=i(),Kn=n("div"),p(Wn.$$.fragment),Al=i(),Ge=n("h2"),Wo=n("a"),xi=n("span"),p(Xn.$$.fragment),rh=i(),$i=n("span"),ah=l("TransformerTemporalModel"),El=i(),le=n("div"),p(Hn.$$.fragment),ih=i(),wi=n("p"),dh=l("Transformer model for video-like data."),lh=i(),Cr=n("div"),p(Qn.$$.fragment),Ul=i(),Je=n("h2"),Xo=n("a"),Di=n("span"),p(Rn.$$.fragment),ch=i(),ki=n("span"),mh=l("Transformer2DModelOutput"),Cl=i(),Yn=n("div"),p(Gn.$$.fragment),Fl=i(),Ze=n("h2"),Ho=n("a"),Ti=n("span"),p(Jn.$$.fragment),fh=i(),Mi=n("span"),ph=l("PriorTransformer"),Pl=i(),V=n("div"),p(Zn.$$.fragment),uh=i(),Ni=n("p"),hh=l(`The prior transformer from unCLIP is used to predict CLIP image embeddings from CLIP text embeddings. Note that the
transformer predicts the image embeddings through a denoising diffusion process.`),_h=i(),es=n("p"),gh=l("This model inherits from "),Fr=n("a"),bh=l("ModelMixin"),vh=l(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),yh=i(),Pr=n("p"),xh=l("For more details, see the original paper: "),os=n("a"),$h=l("https://arxiv.org/abs/2204.06125"),wh=i(),Or=n("div"),p(ts.$$.fragment),Ol=i(),eo=n("h2"),Qo=n("a"),Ai=n("span"),p(ns.$$.fragment),Dh=i(),Ei=n("span"),kh=l("PriorTransformerOutput"),ql=i(),ss=n("div"),p(rs.$$.fragment),Ll=i(),oo=n("h2"),Ro=n("a"),Ui=n("span"),p(as.$$.fragment),Th=i(),Ci=n("span"),Mh=l("ControlNetOutput"),jl=i(),is=n("div"),p(ds.$$.fragment),Il=i(),to=n("h2"),Yo=n("a"),Fi=n("span"),p(ls.$$.fragment),Nh=i(),Pi=n("span"),Ah=l("ControlNetModel"),zl=i(),B=n("div"),p(cs.$$.fragment),Eh=i(),Go=n("div"),p(ms.$$.fragment),Uh=i(),Oi=n("p"),Ch=l("Instantiate Controlnet class from UNet2DConditionModel."),Fh=i(),ye=n("div"),p(fs.$$.fragment),Ph=i(),qi=n("p"),Oh=l("Enable sliced attention computation."),qh=i(),Li=n("p"),Lh=l(`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),jh=i(),qr=n("div"),p(ps.$$.fragment),Ih=i(),Jo=n("div"),p(us.$$.fragment),zh=i(),ji=n("p"),Vh=l("Disables custom attention processors and sets the default attention implementation."),Vl=i(),no=n("h2"),Zo=n("a"),Ii=n("span"),p(hs.$$.fragment),Bh=i(),zi=n("span"),Sh=l("FlaxModelMixin"),Bl=i(),U=n("div"),p(_s.$$.fragment),Kh=i(),Vi=n("p"),Wh=l("Base class for all flax models."),Xh=i(),Lr=n("p"),jr=n("a"),Hh=l("FlaxModelMixin"),Qh=l(` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Rh=i(),W=n("div"),p(gs.$$.fragment),Yh=i(),Bi=n("p"),Gh=l("Instantiate a pretrained flax model from a pre-trained model configuration."),Jh=i(),bs=n("p"),Zh=l("The warning "),Si=n("em"),e_=l("Weights from XXX not initialized from pretrained model"),o_=l(` means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`),t_=i(),vs=n("p"),n_=l("The warning "),Ki=n("em"),s_=l("Weights from XXX not used in YYY"),r_=l(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),a_=i(),p(et.$$.fragment),i_=i(),ot=n("div"),p(ys.$$.fragment),d_=i(),xs=n("p"),l_=l(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Wi=n("code"),c_=l("[from_pretrained()](/docs/diffusers/v0.16.0/en/api/models#diffusers.FlaxModelMixin.from_pretrained)"),m_=l(" class method"),f_=i(),se=n("div"),p($s.$$.fragment),p_=i(),ee=n("p"),u_=l("Cast the floating-point "),Xi=n("code"),h_=l("params"),__=l(" to "),Hi=n("code"),g_=l("jax.numpy.bfloat16"),b_=l(". This returns a new "),Qi=n("code"),v_=l("params"),y_=l(` tree and does not cast
the `),Ri=n("code"),x_=l("params"),$_=l(" in place."),w_=i(),Yi=n("p"),D_=l(`This method can be used on TPU to explicitly convert the model parameters to bfloat16 precision to do full
half-precision training or to save weights in bfloat16 for inference in order to save memory and improve speed.`),k_=i(),p(tt.$$.fragment),T_=i(),re=n("div"),p(ws.$$.fragment),M_=i(),oe=n("p"),N_=l("Cast the floating-point "),Gi=n("code"),A_=l("params"),E_=l(" to "),Ji=n("code"),U_=l("jax.numpy.float16"),C_=l(". This returns a new "),Zi=n("code"),F_=l("params"),P_=l(` tree and does not cast the
`),ed=n("code"),O_=l("params"),q_=l(" in place."),L_=i(),od=n("p"),j_=l(`This method can be used on GPU to explicitly convert the model parameters to float16 precision to do full
half-precision training or to save weights in float16 for inference in order to save memory and improve speed.`),I_=i(),p(nt.$$.fragment),z_=i(),xe=n("div"),p(Ds.$$.fragment),V_=i(),te=n("p"),B_=l("Cast the floating-point "),td=n("code"),S_=l("params"),K_=l(" to "),nd=n("code"),W_=l("jax.numpy.float32"),X_=l(`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),sd=n("code"),H_=l("params"),Q_=l(" tree and does not cast the "),rd=n("code"),R_=l("params"),Y_=l(" in place."),G_=i(),p(st.$$.fragment),Sl=i(),so=n("h2"),rt=n("a"),ad=n("span"),p(ks.$$.fragment),J_=i(),id=n("span"),Z_=l("FlaxUNet2DConditionOutput"),Kl=i(),ro=n("div"),p(Ts.$$.fragment),eg=i(),at=n("div"),p(Ms.$$.fragment),og=i(),dd=n("p"),tg=l("\u201CReturns a new object replacing the specified fields with new values."),Wl=i(),ao=n("h2"),it=n("a"),ld=n("span"),p(Ns.$$.fragment),ng=i(),cd=n("span"),sg=l("FlaxUNet2DConditionModel"),Xl=i(),L=n("div"),p(As.$$.fragment),rg=i(),md=n("p"),ag=l(`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),ig=i(),Es=n("p"),dg=l("This model inherits from "),Ir=n("a"),lg=l("FlaxModelMixin"),cg=l(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),mg=i(),Us=n("p"),fg=l("Also, this model is a Flax Linen "),Cs=n("a"),pg=l("flax.linen.Module"),ug=l(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hg=i(),fd=n("p"),_g=l("Finally, this model supports inherent JAX features such as:"),gg=i(),ce=n("ul"),pd=n("li"),Fs=n("a"),bg=l("Just-In-Time (JIT) compilation"),vg=i(),ud=n("li"),Ps=n("a"),yg=l("Automatic Differentiation"),xg=i(),hd=n("li"),Os=n("a"),$g=l("Vectorization"),wg=i(),_d=n("li"),qs=n("a"),Dg=l("Parallelization"),Hl=i(),io=n("h2"),dt=n("a"),gd=n("span"),p(Ls.$$.fragment),kg=i(),bd=n("span"),Tg=l("FlaxDecoderOutput"),Ql=i(),me=n("div"),p(js.$$.fragment),Mg=i(),vd=n("p"),Ng=l("Output of decoding method."),Ag=i(),lt=n("div"),p(Is.$$.fragment),Eg=i(),yd=n("p"),Ug=l("\u201CReturns a new object replacing the specified fields with new values."),Rl=i(),lo=n("h2"),ct=n("a"),xd=n("span"),p(zs.$$.fragment),Cg=i(),$d=n("span"),Fg=l("FlaxAutoencoderKLOutput"),Yl=i(),fe=n("div"),p(Vs.$$.fragment),Pg=i(),wd=n("p"),Og=l("Output of AutoencoderKL encoding method."),qg=i(),mt=n("div"),p(Bs.$$.fragment),Lg=i(),Dd=n("p"),jg=l("\u201CReturns a new object replacing the specified fields with new values."),Gl=i(),co=n("h2"),ft=n("a"),kd=n("span"),p(Ss.$$.fragment),Ig=i(),Td=n("span"),zg=l("FlaxAutoencoderKL"),Jl=i(),S=n("div"),p(Ks.$$.fragment),Vg=i(),Md=n("p"),Bg=l(`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),Sg=i(),Ws=n("p"),Kg=l("This model is a Flax Linen "),Xs=n("a"),Wg=l("flax.linen.Module"),Xg=l(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Hg=i(),Nd=n("p"),Qg=l("Finally, this model supports inherent JAX features such as:"),Rg=i(),pe=n("ul"),Ad=n("li"),Hs=n("a"),Yg=l("Just-In-Time (JIT) compilation"),Gg=i(),Ed=n("li"),Qs=n("a"),Jg=l("Automatic Differentiation"),Zg=i(),Ud=n("li"),Rs=n("a"),eb=l("Vectorization"),ob=i(),Cd=n("li"),Ys=n("a"),tb=l("Parallelization"),Zl=i(),mo=n("h2"),pt=n("a"),Fd=n("span"),p(Gs.$$.fragment),nb=i(),Pd=n("span"),sb=l("FlaxControlNetOutput"),ec=i(),fo=n("div"),p(Js.$$.fragment),rb=i(),ut=n("div"),p(Zs.$$.fragment),ab=i(),Od=n("p"),ib=l("\u201CReturns a new object replacing the specified fields with new values."),oc=i(),po=n("h2"),ht=n("a"),qd=n("span"),p(er.$$.fragment),db=i(),Ld=n("span"),lb=l("FlaxControlNetModel"),tc=i(),j=n("div"),p(or.$$.fragment),cb=i(),tr=n("p"),mb=l("Quoting from "),nr=n("a"),fb=l("https://arxiv.org/abs/2302.05543"),pb=l(`: \u201CStable Diffusion uses a pre-processing method similar to VQ-GAN
[11] to convert the entire dataset of 512 \xD7 512 images into smaller 64 \xD7 64 \u201Clatent images\u201D for stabilized
training. This requires ControlNets to convert image-based conditions to 64 \xD7 64 feature space to match the
convolution size. We use a tiny network E(\xB7) of four convolution layers with 4 \xD7 4 kernels and 2 \xD7 2 strides
(activated by ReLU, channels are 16, 32, 64, 128, initialized with Gaussian weights, trained jointly with the full
model) to encode image-space conditions \u2026 into feature maps \u2026\u201D`),ub=i(),sr=n("p"),hb=l("This model inherits from "),zr=n("a"),_b=l("FlaxModelMixin"),gb=l(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),bb=i(),rr=n("p"),vb=l("Also, this model is a Flax Linen "),ar=n("a"),yb=l("flax.linen.Module"),xb=l(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),$b=i(),jd=n("p"),wb=l("Finally, this model supports inherent JAX features such as:"),Db=i(),ue=n("ul"),Id=n("li"),ir=n("a"),kb=l("Just-In-Time (JIT) compilation"),Tb=i(),zd=n("li"),dr=n("a"),Mb=l("Automatic Differentiation"),Nb=i(),Vd=n("li"),lr=n("a"),Ab=l("Vectorization"),Eb=i(),Bd=n("li"),cr=n("a"),Ub=l("Parallelization"),this.h()},l(o){const m=ey('[data-svelte="svelte-1phssyn"]',document.head);x=s(m,"META",{name:!0,content:!0}),m.forEach(t),T=d(o),D=s(o,"H1",{class:!0});var mr=r(D);$=s(mr,"A",{id:!0,class:!0,href:!0});var Sd=r($);k=s(Sd,"SPAN",{});var Kd=r(k);u(v.$$.fragment,Kd),Kd.forEach(t),Sd.forEach(t),w=d(mr),ne=s(mr,"SPAN",{});var Wd=r(ne);Ee=c(Wd,"Models"),Wd.forEach(t),mr.forEach(t),R=d(o),Y=s(o,"P",{});var uo=r(Y);pr=c(uo,`Diffusers contains pretrained models for popular algorithms and modules for creating the next set of diffusion models.
The primary function of these models is to denoise an input sample, by modeling the distribution $p`),Gr=s(uo,"EM",{});var Xd=r(Gr);km=c(Xd,"\\theta(\\mathbf{x}"),Xd.forEach(t),Tm=c(uo,`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),Jr=s(uo,"CODE",{});var Hd=r(Jr);Mm=c(Hd,"torch.nn.module"),Hd.forEach(t),Nm=c(uo," with basic functionality for saving and loading models both locally and from the HuggingFace hub."),uo.forEach(t),Gd=d(o),Ue=s(o,"H2",{class:!0});var sc=r(Ue);ho=s(sc,"A",{id:!0,class:!0,href:!0});var Ob=r(ho);Zr=s(Ob,"SPAN",{});var qb=r(Zr);u(Dt.$$.fragment,qb),qb.forEach(t),Ob.forEach(t),Am=d(sc),ea=s(sc,"SPAN",{});var Lb=r(ea);Em=c(Lb,"ModelMixin"),Lb.forEach(t),sc.forEach(t),Jd=d(o),N=s(o,"DIV",{class:!0});var E=r(N);u(kt.$$.fragment,E),Um=d(E),oa=s(E,"P",{});var jb=r(oa);Cm=c(jb,"Base class for all models."),jb.forEach(t),Fm=d(E),ur=s(E,"P",{});var Cb=r(ur);hr=s(Cb,"A",{href:!0});var Ib=r(hr);Pm=c(Ib,"ModelMixin"),Ib.forEach(t),Om=c(Cb,` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),Cb.forEach(t),qm=d(E),ta=s(E,"UL",{});var zb=r(ta);he=s(zb,"LI",{});var fr=r(he);na=s(fr,"STRONG",{});var Vb=r(na);Lm=c(Vb,"config_name"),Vb.forEach(t),jm=c(fr," ("),sa=s(fr,"CODE",{});var Bb=r(sa);Im=c(Bb,"str"),Bb.forEach(t),zm=c(fr,`) \u2014 A filename under which the model should be stored when calling
`),_r=s(fr,"A",{href:!0});var Sb=r(_r);Vm=c(Sb,"save_pretrained()"),Sb.forEach(t),Bm=c(fr,"."),fr.forEach(t),zb.forEach(t),Sm=d(E),_e=s(E,"DIV",{class:!0});var Vr=r(_e);u(Tt.$$.fragment,Vr),Km=d(Vr),ra=s(Vr,"P",{});var Kb=r(ra);Wm=c(Kb,"Deactivates gradient checkpointing for the current model."),Kb.forEach(t),Xm=d(Vr),aa=s(Vr,"P",{});var Wb=r(aa);Hm=c(Wb,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Wb.forEach(t),Vr.forEach(t),Qm=d(E),_o=s(E,"DIV",{class:!0});var rc=r(_o);u(Mt.$$.fragment,rc),Rm=d(rc),ia=s(rc,"P",{});var Xb=r(ia);Ym=c(Xb,"Disable memory efficient attention as implemented in xformers."),Xb.forEach(t),rc.forEach(t),Gm=d(E),ge=s(E,"DIV",{class:!0});var Br=r(ge);u(Nt.$$.fragment,Br),Jm=d(Br),da=s(Br,"P",{});var Hb=r(da);Zm=c(Hb,"Activates gradient checkpointing for the current model."),Hb.forEach(t),ef=d(Br),la=s(Br,"P",{});var Qb=r(la);of=c(Qb,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Qb.forEach(t),Br.forEach(t),tf=d(E),K=s(E,"DIV",{class:!0});var $e=r(K);u(At.$$.fragment,$e),nf=d($e),ca=s($e,"P",{});var Rb=r(ca);sf=c(Rb,"Enable memory efficient attention as implemented in xformers."),Rb.forEach(t),rf=d($e),ma=s($e,"P",{});var Yb=r(ma);af=c(Yb,`When this option is enabled, you should observe lower GPU memory usage and a potential speed up at inference
time. Speed up at training time is not guaranteed.`),Yb.forEach(t),df=d($e),fa=s($e,"P",{});var Gb=r(fa);lf=c(Gb,`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),Gb.forEach(t),cf=d($e),u(go.$$.fragment,$e),$e.forEach(t),mf=d(E),O=s(E,"DIV",{class:!0});var X=r(O);u(Et.$$.fragment,X),ff=d(X),pa=s(X,"P",{});var Jb=r(pa);pf=c(Jb,"Instantiate a pretrained pytorch model from a pre-trained model configuration."),Jb.forEach(t),uf=d(X),Ce=s(X,"P",{});var Sr=r(Ce);hf=c(Sr,"The model is set in evaluation mode by default using "),ua=s(Sr,"CODE",{});var Zb=r(ua);_f=c(Zb,"model.eval()"),Zb.forEach(t),gf=c(Sr,` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),ha=s(Sr,"CODE",{});var ev=r(ha);bf=c(ev,"model.train()"),ev.forEach(t),vf=c(Sr,"."),Sr.forEach(t),yf=d(X),Ut=s(X,"P",{});var ac=r(Ut);xf=c(ac,"The warning "),_a=s(ac,"EM",{});var ov=r(_a);$f=c(ov,"Weights from XXX not initialized from pretrained model"),ov.forEach(t),wf=c(ac,` means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`),ac.forEach(t),Df=d(X),Ct=s(X,"P",{});var ic=r(Ct);kf=c(ic,"The warning "),ga=s(ic,"EM",{});var tv=r(ga);Tf=c(tv,"Weights from XXX not used in YYY"),tv.forEach(t),Mf=c(ic,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),ic.forEach(t),Nf=d(X),u(bo.$$.fragment,X),Af=d(X),u(vo.$$.fragment,X),X.forEach(t),Ef=d(E),yo=s(E,"DIV",{class:!0});var dc=r(yo);u(Ft.$$.fragment,dc),Uf=d(dc),ba=s(dc,"P",{});var nv=r(ba);Cf=c(nv,"Get number of (optionally, trainable or non-embeddings) parameters in the module."),nv.forEach(t),dc.forEach(t),Ff=d(E),xo=s(E,"DIV",{class:!0});var lc=r(xo);u(Pt.$$.fragment,lc),Pf=d(lc),Ot=s(lc,"P",{});var cc=r(Ot);Of=c(cc,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),va=s(cc,"CODE",{});var sv=r(va);qf=c(sv,"[from_pretrained()](/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin.from_pretrained)"),sv.forEach(t),Lf=c(cc," class method."),cc.forEach(t),lc.forEach(t),E.forEach(t),Zd=d(o),Fe=s(o,"H2",{class:!0});var mc=r(Fe);$o=s(mc,"A",{id:!0,class:!0,href:!0});var rv=r($o);ya=s(rv,"SPAN",{});var av=r(ya);u(qt.$$.fragment,av),av.forEach(t),rv.forEach(t),jf=d(mc),xa=s(mc,"SPAN",{});var iv=r(xa);If=c(iv,"UNet2DOutput"),iv.forEach(t),mc.forEach(t),el=d(o),Lt=s(o,"DIV",{class:!0});var dv=r(Lt);u(jt.$$.fragment,dv),dv.forEach(t),ol=d(o),Pe=s(o,"H2",{class:!0});var fc=r(Pe);wo=s(fc,"A",{id:!0,class:!0,href:!0});var lv=r(wo);$a=s(lv,"SPAN",{});var cv=r($a);u(It.$$.fragment,cv),cv.forEach(t),lv.forEach(t),zf=d(fc),wa=s(fc,"SPAN",{});var mv=r(wa);Vf=c(mv,"UNet2DModel"),mv.forEach(t),fc.forEach(t),tl=d(o),G=s(o,"DIV",{class:!0});var _t=r(G);u(zt.$$.fragment,_t),Bf=d(_t),Da=s(_t,"P",{});var fv=r(Da);Sf=c(fv,"UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),fv.forEach(t),Kf=d(_t),Vt=s(_t,"P",{});var pc=r(Vt);Wf=c(pc,"This model inherits from "),gr=s(pc,"A",{href:!0});var pv=r(gr);Xf=c(pv,"ModelMixin"),pv.forEach(t),Hf=c(pc,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),pc.forEach(t),Qf=d(_t),br=s(_t,"DIV",{class:!0});var uv=r(br);u(Bt.$$.fragment,uv),uv.forEach(t),_t.forEach(t),nl=d(o),Oe=s(o,"H2",{class:!0});var uc=r(Oe);Do=s(uc,"A",{id:!0,class:!0,href:!0});var hv=r(Do);ka=s(hv,"SPAN",{});var _v=r(ka);u(St.$$.fragment,_v),_v.forEach(t),hv.forEach(t),Rf=d(uc),Ta=s(uc,"SPAN",{});var gv=r(Ta);Yf=c(gv,"UNet1DOutput"),gv.forEach(t),uc.forEach(t),sl=d(o),Kt=s(o,"DIV",{class:!0});var bv=r(Kt);u(Wt.$$.fragment,bv),bv.forEach(t),rl=d(o),qe=s(o,"H2",{class:!0});var hc=r(qe);ko=s(hc,"A",{id:!0,class:!0,href:!0});var vv=r(ko);Ma=s(vv,"SPAN",{});var yv=r(Ma);u(Xt.$$.fragment,yv),yv.forEach(t),vv.forEach(t),Gf=d(hc),Na=s(hc,"SPAN",{});var xv=r(Na);Jf=c(xv,"UNet1DModel"),xv.forEach(t),hc.forEach(t),al=d(o),J=s(o,"DIV",{class:!0});var gt=r(J);u(Ht.$$.fragment,gt),Zf=d(gt),Aa=s(gt,"P",{});var $v=r(Aa);ep=c($v,"UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),$v.forEach(t),op=d(gt),Qt=s(gt,"P",{});var _c=r(Qt);tp=c(_c,"This model inherits from "),vr=s(_c,"A",{href:!0});var wv=r(vr);np=c(wv,"ModelMixin"),wv.forEach(t),sp=c(_c,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),_c.forEach(t),rp=d(gt),yr=s(gt,"DIV",{class:!0});var Dv=r(yr);u(Rt.$$.fragment,Dv),Dv.forEach(t),gt.forEach(t),il=d(o),Le=s(o,"H2",{class:!0});var gc=r(Le);To=s(gc,"A",{id:!0,class:!0,href:!0});var kv=r(To);Ea=s(kv,"SPAN",{});var Tv=r(Ea);u(Yt.$$.fragment,Tv),Tv.forEach(t),kv.forEach(t),ap=d(gc),Ua=s(gc,"SPAN",{});var Mv=r(Ua);ip=c(Mv,"UNet2DConditionOutput"),Mv.forEach(t),gc.forEach(t),dl=d(o),Gt=s(o,"DIV",{class:!0});var Nv=r(Gt);u(Jt.$$.fragment,Nv),Nv.forEach(t),ll=d(o),je=s(o,"H2",{class:!0});var bc=r(je);Mo=s(bc,"A",{id:!0,class:!0,href:!0});var Av=r(Mo);Ca=s(Av,"SPAN",{});var Ev=r(Ca);u(Zt.$$.fragment,Ev),Ev.forEach(t),Av.forEach(t),dp=d(bc),Fa=s(bc,"SPAN",{});var Uv=r(Fa);lp=c(Uv,"UNet2DConditionModel"),Uv.forEach(t),bc.forEach(t),cl=d(o),F=s(o,"DIV",{class:!0});var H=r(F);u(en.$$.fragment,H),cp=d(H),Pa=s(H,"P",{});var Cv=r(Pa);mp=c(Cv,`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Cv.forEach(t),fp=d(H),on=s(H,"P",{});var vc=r(on);pp=c(vc,"This model inherits from "),xr=s(vc,"A",{href:!0});var Fv=r(xr);up=c(Fv,"ModelMixin"),Fv.forEach(t),hp=c(vc,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),vc.forEach(t),_p=d(H),$r=s(H,"DIV",{class:!0});var Pv=r($r);u(tn.$$.fragment,Pv),Pv.forEach(t),gp=d(H),be=s(H,"DIV",{class:!0});var Kr=r(be);u(nn.$$.fragment,Kr),bp=d(Kr),Oa=s(Kr,"P",{});var Ov=r(Oa);vp=c(Ov,"Enable sliced attention computation."),Ov.forEach(t),yp=d(Kr),qa=s(Kr,"P",{});var qv=r(qa);xp=c(qv,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),qv.forEach(t),Kr.forEach(t),$p=d(H),wr=s(H,"DIV",{class:!0});var Lv=r(wr);u(sn.$$.fragment,Lv),Lv.forEach(t),wp=d(H),No=s(H,"DIV",{class:!0});var yc=r(No);u(rn.$$.fragment,yc),Dp=d(yc),La=s(yc,"P",{});var jv=r(La);kp=c(jv,"Disables custom attention processors and sets the default attention implementation."),jv.forEach(t),yc.forEach(t),H.forEach(t),ml=d(o),Ie=s(o,"H2",{class:!0});var xc=r(Ie);Ao=s(xc,"A",{id:!0,class:!0,href:!0});var Iv=r(Ao);ja=s(Iv,"SPAN",{});var zv=r(ja);u(an.$$.fragment,zv),zv.forEach(t),Iv.forEach(t),Tp=d(xc),Ia=s(xc,"SPAN",{});var Vv=r(Ia);Mp=c(Vv,"UNet3DConditionOutput"),Vv.forEach(t),xc.forEach(t),fl=d(o),dn=s(o,"DIV",{class:!0});var Bv=r(dn);u(ln.$$.fragment,Bv),Bv.forEach(t),pl=d(o),ze=s(o,"H2",{class:!0});var $c=r(ze);Eo=s($c,"A",{id:!0,class:!0,href:!0});var Sv=r(Eo);za=s(Sv,"SPAN",{});var Kv=r(za);u(cn.$$.fragment,Kv),Kv.forEach(t),Sv.forEach(t),Np=d($c),Va=s($c,"SPAN",{});var Wv=r(Va);Ap=c(Wv,"UNet3DConditionModel"),Wv.forEach(t),$c.forEach(t),ul=d(o),P=s(o,"DIV",{class:!0});var Q=r(P);u(mn.$$.fragment,Q),Ep=d(Q),Ba=s(Q,"P",{});var Xv=r(Ba);Up=c(Xv,`UNet3DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Xv.forEach(t),Cp=d(Q),fn=s(Q,"P",{});var wc=r(fn);Fp=c(wc,"This model inherits from "),Dr=s(wc,"A",{href:!0});var Hv=r(Dr);Pp=c(Hv,"ModelMixin"),Hv.forEach(t),Op=c(wc,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),wc.forEach(t),qp=d(Q),kr=s(Q,"DIV",{class:!0});var Qv=r(kr);u(pn.$$.fragment,Qv),Qv.forEach(t),Lp=d(Q),ve=s(Q,"DIV",{class:!0});var Wr=r(ve);u(un.$$.fragment,Wr),jp=d(Wr),Sa=s(Wr,"P",{});var Rv=r(Sa);Ip=c(Rv,"Enable sliced attention computation."),Rv.forEach(t),zp=d(Wr),Ka=s(Wr,"P",{});var Yv=r(Ka);Vp=c(Yv,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),Yv.forEach(t),Wr.forEach(t),Bp=d(Q),Tr=s(Q,"DIV",{class:!0});var Gv=r(Tr);u(hn.$$.fragment,Gv),Gv.forEach(t),Sp=d(Q),Uo=s(Q,"DIV",{class:!0});var Dc=r(Uo);u(_n.$$.fragment,Dc),Kp=d(Dc),Wa=s(Dc,"P",{});var Jv=r(Wa);Wp=c(Jv,"Disables custom attention processors and sets the default attention implementation."),Jv.forEach(t),Dc.forEach(t),Q.forEach(t),hl=d(o),Ve=s(o,"H2",{class:!0});var kc=r(Ve);Co=s(kc,"A",{id:!0,class:!0,href:!0});var Zv=r(Co);Xa=s(Zv,"SPAN",{});var e2=r(Xa);u(gn.$$.fragment,e2),e2.forEach(t),Zv.forEach(t),Xp=d(kc),Ha=s(kc,"SPAN",{});var o2=r(Ha);Hp=c(o2,"DecoderOutput"),o2.forEach(t),kc.forEach(t),_l=d(o),Be=s(o,"DIV",{class:!0});var Tc=r(Be);u(bn.$$.fragment,Tc),Qp=d(Tc),Qa=s(Tc,"P",{});var t2=r(Qa);Rp=c(t2,"Output of decoding method."),t2.forEach(t),Tc.forEach(t),gl=d(o),Se=s(o,"H2",{class:!0});var Mc=r(Se);Fo=s(Mc,"A",{id:!0,class:!0,href:!0});var n2=r(Fo);Ra=s(n2,"SPAN",{});var s2=r(Ra);u(vn.$$.fragment,s2),s2.forEach(t),n2.forEach(t),Yp=d(Mc),Ya=s(Mc,"SPAN",{});var r2=r(Ya);Gp=c(r2,"VQEncoderOutput"),r2.forEach(t),Mc.forEach(t),bl=d(o),Ke=s(o,"DIV",{class:!0});var Nc=r(Ke);u(yn.$$.fragment,Nc),Jp=d(Nc),Ga=s(Nc,"P",{});var a2=r(Ga);Zp=c(a2,"Output of VQModel encoding method."),a2.forEach(t),Nc.forEach(t),vl=d(o),We=s(o,"H2",{class:!0});var Ac=r(We);Po=s(Ac,"A",{id:!0,class:!0,href:!0});var i2=r(Po);Ja=s(i2,"SPAN",{});var d2=r(Ja);u(xn.$$.fragment,d2),d2.forEach(t),i2.forEach(t),eu=d(Ac),Za=s(Ac,"SPAN",{});var l2=r(Za);ou=c(l2,"VQModel"),l2.forEach(t),Ac.forEach(t),yl=d(o),Z=s(o,"DIV",{class:!0});var bt=r(Z);u($n.$$.fragment,bt),tu=d(bt),ei=s(bt,"P",{});var c2=r(ei);nu=c(c2,`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),c2.forEach(t),su=d(bt),wn=s(bt,"P",{});var Ec=r(wn);ru=c(Ec,"This model inherits from "),Mr=s(Ec,"A",{href:!0});var m2=r(Mr);au=c(m2,"ModelMixin"),m2.forEach(t),iu=c(Ec,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Ec.forEach(t),du=d(bt),Nr=s(bt,"DIV",{class:!0});var f2=r(Nr);u(Dn.$$.fragment,f2),f2.forEach(t),bt.forEach(t),xl=d(o),Xe=s(o,"H2",{class:!0});var Uc=r(Xe);Oo=s(Uc,"A",{id:!0,class:!0,href:!0});var p2=r(Oo);oi=s(p2,"SPAN",{});var u2=r(oi);u(kn.$$.fragment,u2),u2.forEach(t),p2.forEach(t),lu=d(Uc),ti=s(Uc,"SPAN",{});var h2=r(ti);cu=c(h2,"AutoencoderKLOutput"),h2.forEach(t),Uc.forEach(t),$l=d(o),He=s(o,"DIV",{class:!0});var Cc=r(He);u(Tn.$$.fragment,Cc),mu=d(Cc),ni=s(Cc,"P",{});var _2=r(ni);fu=c(_2,"Output of AutoencoderKL encoding method."),_2.forEach(t),Cc.forEach(t),wl=d(o),Qe=s(o,"H2",{class:!0});var Fc=r(Qe);qo=s(Fc,"A",{id:!0,class:!0,href:!0});var g2=r(qo);si=s(g2,"SPAN",{});var b2=r(si);u(Mn.$$.fragment,b2),b2.forEach(t),g2.forEach(t),pu=d(Fc),ri=s(Fc,"SPAN",{});var v2=r(ri);uu=c(v2,"AutoencoderKL"),v2.forEach(t),Fc.forEach(t),Dl=d(o),A=s(o,"DIV",{class:!0});var C=r(A);u(Nn.$$.fragment,C),hu=d(C),ai=s(C,"P",{});var y2=r(ai);_u=c(y2,`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),y2.forEach(t),gu=d(C),An=s(C,"P",{});var Pc=r(An);bu=c(Pc,"This model inherits from "),Ar=s(Pc,"A",{href:!0});var x2=r(Ar);vu=c(x2,"ModelMixin"),x2.forEach(t),yu=c(Pc,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Pc.forEach(t),xu=d(C),Lo=s(C,"DIV",{class:!0});var Oc=r(Lo);u(En.$$.fragment,Oc),$u=d(Oc),Un=s(Oc,"P",{});var qc=r(Un);wu=c(qc,"Disable sliced VAE decoding. If "),ii=s(qc,"CODE",{});var $2=r(ii);Du=c($2,"enable_slicing"),$2.forEach(t),ku=c(qc,` was previously invoked, this method will go back to computing
decoding in one step.`),qc.forEach(t),Oc.forEach(t),Tu=d(C),jo=s(C,"DIV",{class:!0});var Lc=r(jo);u(Cn.$$.fragment,Lc),Mu=d(Lc),Fn=s(Lc,"P",{});var jc=r(Fn);Nu=c(jc,"Disable tiled VAE decoding. If "),di=s(jc,"CODE",{});var w2=r(di);Au=c(w2,"enable_vae_tiling"),w2.forEach(t),Eu=c(jc,` was previously invoked, this method will go back to
computing decoding in one step.`),jc.forEach(t),Lc.forEach(t),Uu=d(C),Io=s(C,"DIV",{class:!0});var Ic=r(Io);u(Pn.$$.fragment,Ic),Cu=d(Ic),li=s(Ic,"P",{});var D2=r(li);Fu=c(D2,`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.`),D2.forEach(t),Ic.forEach(t),Pu=d(C),zo=s(C,"DIV",{class:!0});var zc=r(zo);u(On.$$.fragment,zc),Ou=d(zc),ci=s(zc,"P",{});var k2=r(ci);qu=c(k2,`Enable tiled VAE decoding. When this option is enabled, the VAE will split the input tensor into tiles to
compute decoding and encoding in several steps. This is useful to save a large amount of memory and to allow
the processing of larger images.`),k2.forEach(t),zc.forEach(t),Lu=d(C),Er=s(C,"DIV",{class:!0});var T2=r(Er);u(qn.$$.fragment,T2),T2.forEach(t),ju=d(C),Vo=s(C,"DIV",{class:!0});var Vc=r(Vo);u(Ln.$$.fragment,Vc),Iu=d(Vc),mi=s(Vc,"P",{});var M2=r(mi);zu=c(M2,"Decode a batch of images using a tiled decoder."),M2.forEach(t),Vc.forEach(t),Vu=d(C),Bo=s(C,"DIV",{class:!0});var Bc=r(Bo);u(jn.$$.fragment,Bc),Bu=d(Bc),fi=s(Bc,"P",{});var N2=r(fi);Su=c(N2,"Encode a batch of images using a tiled encoder."),N2.forEach(t),Bc.forEach(t),C.forEach(t),kl=d(o),Re=s(o,"H2",{class:!0});var Sc=r(Re);So=s(Sc,"A",{id:!0,class:!0,href:!0});var A2=r(So);pi=s(A2,"SPAN",{});var E2=r(pi);u(In.$$.fragment,E2),E2.forEach(t),A2.forEach(t),Ku=d(Sc),ui=s(Sc,"SPAN",{});var U2=r(ui);Wu=c(U2,"Transformer2DModel"),U2.forEach(t),Sc.forEach(t),Tl=d(o),q=s(o,"DIV",{class:!0});var ae=r(q);u(zn.$$.fragment,ae),Xu=d(ae),hi=s(ae,"P",{});var C2=r(hi);Hu=c(C2,`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),C2.forEach(t),Qu=d(ae),_i=s(ae,"P",{});var F2=r(_i);Ru=c(F2,`When input is continuous: First, project the input (aka embedding) and reshape to b, t, d. Then apply standard
transformer action. Finally, reshape to image.`),F2.forEach(t),Yu=d(ae),Vn=s(ae,"P",{});var Kc=r(Vn);Gu=c(Kc,`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),gi=s(Kc,"CODE",{});var P2=r(gi);Ju=c(P2,"ImagePositionalEmbeddings"),P2.forEach(t),Zu=c(Kc,`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),Kc.forEach(t),eh=d(ae),bi=s(ae,"P",{});var O2=r(bi);oh=c(O2,`Note that it is assumed one of the input classes is the masked latent pixel. The predicted classes of the unnoised
image do not contain a prediction for the masked pixel as the unnoised image cannot be masked.`),O2.forEach(t),th=d(ae),Ur=s(ae,"DIV",{class:!0});var q2=r(Ur);u(Bn.$$.fragment,q2),q2.forEach(t),ae.forEach(t),Ml=d(o),Ye=s(o,"H2",{class:!0});var Wc=r(Ye);Ko=s(Wc,"A",{id:!0,class:!0,href:!0});var L2=r(Ko);vi=s(L2,"SPAN",{});var j2=r(vi);u(Sn.$$.fragment,j2),j2.forEach(t),L2.forEach(t),nh=d(Wc),yi=s(Wc,"SPAN",{});var I2=r(yi);sh=c(I2,"Transformer2DModelOutput"),I2.forEach(t),Wc.forEach(t),Nl=d(o),Kn=s(o,"DIV",{class:!0});var z2=r(Kn);u(Wn.$$.fragment,z2),z2.forEach(t),Al=d(o),Ge=s(o,"H2",{class:!0});var Xc=r(Ge);Wo=s(Xc,"A",{id:!0,class:!0,href:!0});var V2=r(Wo);xi=s(V2,"SPAN",{});var B2=r(xi);u(Xn.$$.fragment,B2),B2.forEach(t),V2.forEach(t),rh=d(Xc),$i=s(Xc,"SPAN",{});var S2=r($i);ah=c(S2,"TransformerTemporalModel"),S2.forEach(t),Xc.forEach(t),El=d(o),le=s(o,"DIV",{class:!0});var Xr=r(le);u(Hn.$$.fragment,Xr),ih=d(Xr),wi=s(Xr,"P",{});var K2=r(wi);dh=c(K2,"Transformer model for video-like data."),K2.forEach(t),lh=d(Xr),Cr=s(Xr,"DIV",{class:!0});var W2=r(Cr);u(Qn.$$.fragment,W2),W2.forEach(t),Xr.forEach(t),Ul=d(o),Je=s(o,"H2",{class:!0});var Hc=r(Je);Xo=s(Hc,"A",{id:!0,class:!0,href:!0});var X2=r(Xo);Di=s(X2,"SPAN",{});var H2=r(Di);u(Rn.$$.fragment,H2),H2.forEach(t),X2.forEach(t),ch=d(Hc),ki=s(Hc,"SPAN",{});var Q2=r(ki);mh=c(Q2,"Transformer2DModelOutput"),Q2.forEach(t),Hc.forEach(t),Cl=d(o),Yn=s(o,"DIV",{class:!0});var R2=r(Yn);u(Gn.$$.fragment,R2),R2.forEach(t),Fl=d(o),Ze=s(o,"H2",{class:!0});var Qc=r(Ze);Ho=s(Qc,"A",{id:!0,class:!0,href:!0});var Y2=r(Ho);Ti=s(Y2,"SPAN",{});var G2=r(Ti);u(Jn.$$.fragment,G2),G2.forEach(t),Y2.forEach(t),fh=d(Qc),Mi=s(Qc,"SPAN",{});var J2=r(Mi);ph=c(J2,"PriorTransformer"),J2.forEach(t),Qc.forEach(t),Pl=d(o),V=s(o,"DIV",{class:!0});var we=r(V);u(Zn.$$.fragment,we),uh=d(we),Ni=s(we,"P",{});var Z2=r(Ni);hh=c(Z2,`The prior transformer from unCLIP is used to predict CLIP image embeddings from CLIP text embeddings. Note that the
transformer predicts the image embeddings through a denoising diffusion process.`),Z2.forEach(t),_h=d(we),es=s(we,"P",{});var Rc=r(es);gh=c(Rc,"This model inherits from "),Fr=s(Rc,"A",{href:!0});var e1=r(Fr);bh=c(e1,"ModelMixin"),e1.forEach(t),vh=c(Rc,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Rc.forEach(t),yh=d(we),Pr=s(we,"P",{});var Fb=r(Pr);xh=c(Fb,"For more details, see the original paper: "),os=s(Fb,"A",{href:!0,rel:!0});var o1=r(os);$h=c(o1,"https://arxiv.org/abs/2204.06125"),o1.forEach(t),Fb.forEach(t),wh=d(we),Or=s(we,"DIV",{class:!0});var t1=r(Or);u(ts.$$.fragment,t1),t1.forEach(t),we.forEach(t),Ol=d(o),eo=s(o,"H2",{class:!0});var Yc=r(eo);Qo=s(Yc,"A",{id:!0,class:!0,href:!0});var n1=r(Qo);Ai=s(n1,"SPAN",{});var s1=r(Ai);u(ns.$$.fragment,s1),s1.forEach(t),n1.forEach(t),Dh=d(Yc),Ei=s(Yc,"SPAN",{});var r1=r(Ei);kh=c(r1,"PriorTransformerOutput"),r1.forEach(t),Yc.forEach(t),ql=d(o),ss=s(o,"DIV",{class:!0});var a1=r(ss);u(rs.$$.fragment,a1),a1.forEach(t),Ll=d(o),oo=s(o,"H2",{class:!0});var Gc=r(oo);Ro=s(Gc,"A",{id:!0,class:!0,href:!0});var i1=r(Ro);Ui=s(i1,"SPAN",{});var d1=r(Ui);u(as.$$.fragment,d1),d1.forEach(t),i1.forEach(t),Th=d(Gc),Ci=s(Gc,"SPAN",{});var l1=r(Ci);Mh=c(l1,"ControlNetOutput"),l1.forEach(t),Gc.forEach(t),jl=d(o),is=s(o,"DIV",{class:!0});var c1=r(is);u(ds.$$.fragment,c1),c1.forEach(t),Il=d(o),to=s(o,"H2",{class:!0});var Jc=r(to);Yo=s(Jc,"A",{id:!0,class:!0,href:!0});var m1=r(Yo);Fi=s(m1,"SPAN",{});var f1=r(Fi);u(ls.$$.fragment,f1),f1.forEach(t),m1.forEach(t),Nh=d(Jc),Pi=s(Jc,"SPAN",{});var p1=r(Pi);Ah=c(p1,"ControlNetModel"),p1.forEach(t),Jc.forEach(t),zl=d(o),B=s(o,"DIV",{class:!0});var De=r(B);u(cs.$$.fragment,De),Eh=d(De),Go=s(De,"DIV",{class:!0});var Zc=r(Go);u(ms.$$.fragment,Zc),Uh=d(Zc),Oi=s(Zc,"P",{});var u1=r(Oi);Ch=c(u1,"Instantiate Controlnet class from UNet2DConditionModel."),u1.forEach(t),Zc.forEach(t),Fh=d(De),ye=s(De,"DIV",{class:!0});var Hr=r(ye);u(fs.$$.fragment,Hr),Ph=d(Hr),qi=s(Hr,"P",{});var h1=r(qi);Oh=c(h1,"Enable sliced attention computation."),h1.forEach(t),qh=d(Hr),Li=s(Hr,"P",{});var _1=r(Li);Lh=c(_1,`When this option is enabled, the attention module will split the input tensor in slices, to compute attention
in several steps. This is useful to save some memory in exchange for a small speed decrease.`),_1.forEach(t),Hr.forEach(t),jh=d(De),qr=s(De,"DIV",{class:!0});var g1=r(qr);u(ps.$$.fragment,g1),g1.forEach(t),Ih=d(De),Jo=s(De,"DIV",{class:!0});var em=r(Jo);u(us.$$.fragment,em),zh=d(em),ji=s(em,"P",{});var b1=r(ji);Vh=c(b1,"Disables custom attention processors and sets the default attention implementation."),b1.forEach(t),em.forEach(t),De.forEach(t),Vl=d(o),no=s(o,"H2",{class:!0});var om=r(no);Zo=s(om,"A",{id:!0,class:!0,href:!0});var v1=r(Zo);Ii=s(v1,"SPAN",{});var y1=r(Ii);u(hs.$$.fragment,y1),y1.forEach(t),v1.forEach(t),Bh=d(om),zi=s(om,"SPAN",{});var x1=r(zi);Sh=c(x1,"FlaxModelMixin"),x1.forEach(t),om.forEach(t),Bl=d(o),U=s(o,"DIV",{class:!0});var z=r(U);u(_s.$$.fragment,z),Kh=d(z),Vi=s(z,"P",{});var $1=r(Vi);Wh=c($1,"Base class for all flax models."),$1.forEach(t),Xh=d(z),Lr=s(z,"P",{});var Pb=r(Lr);jr=s(Pb,"A",{href:!0});var w1=r(jr);Hh=c(w1,"FlaxModelMixin"),w1.forEach(t),Qh=c(Pb,` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Pb.forEach(t),Rh=d(z),W=s(z,"DIV",{class:!0});var ke=r(W);u(gs.$$.fragment,ke),Yh=d(ke),Bi=s(ke,"P",{});var D1=r(Bi);Gh=c(D1,"Instantiate a pretrained flax model from a pre-trained model configuration."),D1.forEach(t),Jh=d(ke),bs=s(ke,"P",{});var tm=r(bs);Zh=c(tm,"The warning "),Si=s(tm,"EM",{});var k1=r(Si);e_=c(k1,"Weights from XXX not initialized from pretrained model"),k1.forEach(t),o_=c(tm,` means that the weights of XXX do not come
pretrained with the rest of the model. It is up to you to train those weights with a downstream fine-tuning
task.`),tm.forEach(t),t_=d(ke),vs=s(ke,"P",{});var nm=r(vs);n_=c(nm,"The warning "),Ki=s(nm,"EM",{});var T1=r(Ki);s_=c(T1,"Weights from XXX not used in YYY"),T1.forEach(t),r_=c(nm,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),nm.forEach(t),a_=d(ke),u(et.$$.fragment,ke),ke.forEach(t),i_=d(z),ot=s(z,"DIV",{class:!0});var sm=r(ot);u(ys.$$.fragment,sm),d_=d(sm),xs=s(sm,"P",{});var rm=r(xs);l_=c(rm,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Wi=s(rm,"CODE",{});var M1=r(Wi);c_=c(M1,"[from_pretrained()](/docs/diffusers/v0.16.0/en/api/models#diffusers.FlaxModelMixin.from_pretrained)"),M1.forEach(t),m_=c(rm," class method"),rm.forEach(t),sm.forEach(t),f_=d(z),se=s(z,"DIV",{class:!0});var vt=r(se);u($s.$$.fragment,vt),p_=d(vt),ee=s(vt,"P",{});var Te=r(ee);u_=c(Te,"Cast the floating-point "),Xi=s(Te,"CODE",{});var N1=r(Xi);h_=c(N1,"params"),N1.forEach(t),__=c(Te," to "),Hi=s(Te,"CODE",{});var A1=r(Hi);g_=c(A1,"jax.numpy.bfloat16"),A1.forEach(t),b_=c(Te,". This returns a new "),Qi=s(Te,"CODE",{});var E1=r(Qi);v_=c(E1,"params"),E1.forEach(t),y_=c(Te,` tree and does not cast
the `),Ri=s(Te,"CODE",{});var U1=r(Ri);x_=c(U1,"params"),U1.forEach(t),$_=c(Te," in place."),Te.forEach(t),w_=d(vt),Yi=s(vt,"P",{});var C1=r(Yi);D_=c(C1,`This method can be used on TPU to explicitly convert the model parameters to bfloat16 precision to do full
half-precision training or to save weights in bfloat16 for inference in order to save memory and improve speed.`),C1.forEach(t),k_=d(vt),u(tt.$$.fragment,vt),vt.forEach(t),T_=d(z),re=s(z,"DIV",{class:!0});var yt=r(re);u(ws.$$.fragment,yt),M_=d(yt),oe=s(yt,"P",{});var Me=r(oe);N_=c(Me,"Cast the floating-point "),Gi=s(Me,"CODE",{});var F1=r(Gi);A_=c(F1,"params"),F1.forEach(t),E_=c(Me," to "),Ji=s(Me,"CODE",{});var P1=r(Ji);U_=c(P1,"jax.numpy.float16"),P1.forEach(t),C_=c(Me,". This returns a new "),Zi=s(Me,"CODE",{});var O1=r(Zi);F_=c(O1,"params"),O1.forEach(t),P_=c(Me,` tree and does not cast the
`),ed=s(Me,"CODE",{});var q1=r(ed);O_=c(q1,"params"),q1.forEach(t),q_=c(Me," in place."),Me.forEach(t),L_=d(yt),od=s(yt,"P",{});var L1=r(od);j_=c(L1,`This method can be used on GPU to explicitly convert the model parameters to float16 precision to do full
half-precision training or to save weights in float16 for inference in order to save memory and improve speed.`),L1.forEach(t),I_=d(yt),u(nt.$$.fragment,yt),yt.forEach(t),z_=d(z),xe=s(z,"DIV",{class:!0});var Qr=r(xe);u(Ds.$$.fragment,Qr),V_=d(Qr),te=s(Qr,"P",{});var Ne=r(te);B_=c(Ne,"Cast the floating-point "),td=s(Ne,"CODE",{});var j1=r(td);S_=c(j1,"params"),j1.forEach(t),K_=c(Ne," to "),nd=s(Ne,"CODE",{});var I1=r(nd);W_=c(I1,"jax.numpy.float32"),I1.forEach(t),X_=c(Ne,`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),sd=s(Ne,"CODE",{});var z1=r(sd);H_=c(z1,"params"),z1.forEach(t),Q_=c(Ne," tree and does not cast the "),rd=s(Ne,"CODE",{});var V1=r(rd);R_=c(V1,"params"),V1.forEach(t),Y_=c(Ne," in place."),Ne.forEach(t),G_=d(Qr),u(st.$$.fragment,Qr),Qr.forEach(t),z.forEach(t),Sl=d(o),so=s(o,"H2",{class:!0});var am=r(so);rt=s(am,"A",{id:!0,class:!0,href:!0});var B1=r(rt);ad=s(B1,"SPAN",{});var S1=r(ad);u(ks.$$.fragment,S1),S1.forEach(t),B1.forEach(t),J_=d(am),id=s(am,"SPAN",{});var K1=r(id);Z_=c(K1,"FlaxUNet2DConditionOutput"),K1.forEach(t),am.forEach(t),Kl=d(o),ro=s(o,"DIV",{class:!0});var im=r(ro);u(Ts.$$.fragment,im),eg=d(im),at=s(im,"DIV",{class:!0});var dm=r(at);u(Ms.$$.fragment,dm),og=d(dm),dd=s(dm,"P",{});var W1=r(dd);tg=c(W1,"\u201CReturns a new object replacing the specified fields with new values."),W1.forEach(t),dm.forEach(t),im.forEach(t),Wl=d(o),ao=s(o,"H2",{class:!0});var lm=r(ao);it=s(lm,"A",{id:!0,class:!0,href:!0});var X1=r(it);ld=s(X1,"SPAN",{});var H1=r(ld);u(Ns.$$.fragment,H1),H1.forEach(t),X1.forEach(t),ng=d(lm),cd=s(lm,"SPAN",{});var Q1=r(cd);sg=c(Q1,"FlaxUNet2DConditionModel"),Q1.forEach(t),lm.forEach(t),Xl=d(o),L=s(o,"DIV",{class:!0});var ie=r(L);u(As.$$.fragment,ie),rg=d(ie),md=s(ie,"P",{});var R1=r(md);ag=c(R1,`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),R1.forEach(t),ig=d(ie),Es=s(ie,"P",{});var cm=r(Es);dg=c(cm,"This model inherits from "),Ir=s(cm,"A",{href:!0});var Y1=r(Ir);lg=c(Y1,"FlaxModelMixin"),Y1.forEach(t),cg=c(cm,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),cm.forEach(t),mg=d(ie),Us=s(ie,"P",{});var mm=r(Us);fg=c(mm,"Also, this model is a Flax Linen "),Cs=s(mm,"A",{href:!0,rel:!0});var G1=r(Cs);pg=c(G1,"flax.linen.Module"),G1.forEach(t),ug=c(mm,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),mm.forEach(t),hg=d(ie),fd=s(ie,"P",{});var J1=r(fd);_g=c(J1,"Finally, this model supports inherent JAX features such as:"),J1.forEach(t),gg=d(ie),ce=s(ie,"UL",{});var xt=r(ce);pd=s(xt,"LI",{});var Z1=r(pd);Fs=s(Z1,"A",{href:!0,rel:!0});var e0=r(Fs);bg=c(e0,"Just-In-Time (JIT) compilation"),e0.forEach(t),Z1.forEach(t),vg=d(xt),ud=s(xt,"LI",{});var o0=r(ud);Ps=s(o0,"A",{href:!0,rel:!0});var t0=r(Ps);yg=c(t0,"Automatic Differentiation"),t0.forEach(t),o0.forEach(t),xg=d(xt),hd=s(xt,"LI",{});var n0=r(hd);Os=s(n0,"A",{href:!0,rel:!0});var s0=r(Os);$g=c(s0,"Vectorization"),s0.forEach(t),n0.forEach(t),wg=d(xt),_d=s(xt,"LI",{});var r0=r(_d);qs=s(r0,"A",{href:!0,rel:!0});var a0=r(qs);Dg=c(a0,"Parallelization"),a0.forEach(t),r0.forEach(t),xt.forEach(t),ie.forEach(t),Hl=d(o),io=s(o,"H2",{class:!0});var fm=r(io);dt=s(fm,"A",{id:!0,class:!0,href:!0});var i0=r(dt);gd=s(i0,"SPAN",{});var d0=r(gd);u(Ls.$$.fragment,d0),d0.forEach(t),i0.forEach(t),kg=d(fm),bd=s(fm,"SPAN",{});var l0=r(bd);Tg=c(l0,"FlaxDecoderOutput"),l0.forEach(t),fm.forEach(t),Ql=d(o),me=s(o,"DIV",{class:!0});var Rr=r(me);u(js.$$.fragment,Rr),Mg=d(Rr),vd=s(Rr,"P",{});var c0=r(vd);Ng=c(c0,"Output of decoding method."),c0.forEach(t),Ag=d(Rr),lt=s(Rr,"DIV",{class:!0});var pm=r(lt);u(Is.$$.fragment,pm),Eg=d(pm),yd=s(pm,"P",{});var m0=r(yd);Ug=c(m0,"\u201CReturns a new object replacing the specified fields with new values."),m0.forEach(t),pm.forEach(t),Rr.forEach(t),Rl=d(o),lo=s(o,"H2",{class:!0});var um=r(lo);ct=s(um,"A",{id:!0,class:!0,href:!0});var f0=r(ct);xd=s(f0,"SPAN",{});var p0=r(xd);u(zs.$$.fragment,p0),p0.forEach(t),f0.forEach(t),Cg=d(um),$d=s(um,"SPAN",{});var u0=r($d);Fg=c(u0,"FlaxAutoencoderKLOutput"),u0.forEach(t),um.forEach(t),Yl=d(o),fe=s(o,"DIV",{class:!0});var Yr=r(fe);u(Vs.$$.fragment,Yr),Pg=d(Yr),wd=s(Yr,"P",{});var h0=r(wd);Og=c(h0,"Output of AutoencoderKL encoding method."),h0.forEach(t),qg=d(Yr),mt=s(Yr,"DIV",{class:!0});var hm=r(mt);u(Bs.$$.fragment,hm),Lg=d(hm),Dd=s(hm,"P",{});var _0=r(Dd);jg=c(_0,"\u201CReturns a new object replacing the specified fields with new values."),_0.forEach(t),hm.forEach(t),Yr.forEach(t),Gl=d(o),co=s(o,"H2",{class:!0});var _m=r(co);ft=s(_m,"A",{id:!0,class:!0,href:!0});var g0=r(ft);kd=s(g0,"SPAN",{});var b0=r(kd);u(Ss.$$.fragment,b0),b0.forEach(t),g0.forEach(t),Ig=d(_m),Td=s(_m,"SPAN",{});var v0=r(Td);zg=c(v0,"FlaxAutoencoderKL"),v0.forEach(t),_m.forEach(t),Jl=d(o),S=s(o,"DIV",{class:!0});var Ae=r(S);u(Ks.$$.fragment,Ae),Vg=d(Ae),Md=s(Ae,"P",{});var y0=r(Md);Bg=c(y0,`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),y0.forEach(t),Sg=d(Ae),Ws=s(Ae,"P",{});var gm=r(Ws);Kg=c(gm,"This model is a Flax Linen "),Xs=s(gm,"A",{href:!0,rel:!0});var x0=r(Xs);Wg=c(x0,"flax.linen.Module"),x0.forEach(t),Xg=c(gm,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),gm.forEach(t),Hg=d(Ae),Nd=s(Ae,"P",{});var $0=r(Nd);Qg=c($0,"Finally, this model supports inherent JAX features such as:"),$0.forEach(t),Rg=d(Ae),pe=s(Ae,"UL",{});var $t=r(pe);Ad=s($t,"LI",{});var w0=r(Ad);Hs=s(w0,"A",{href:!0,rel:!0});var D0=r(Hs);Yg=c(D0,"Just-In-Time (JIT) compilation"),D0.forEach(t),w0.forEach(t),Gg=d($t),Ed=s($t,"LI",{});var k0=r(Ed);Qs=s(k0,"A",{href:!0,rel:!0});var T0=r(Qs);Jg=c(T0,"Automatic Differentiation"),T0.forEach(t),k0.forEach(t),Zg=d($t),Ud=s($t,"LI",{});var M0=r(Ud);Rs=s(M0,"A",{href:!0,rel:!0});var N0=r(Rs);eb=c(N0,"Vectorization"),N0.forEach(t),M0.forEach(t),ob=d($t),Cd=s($t,"LI",{});var A0=r(Cd);Ys=s(A0,"A",{href:!0,rel:!0});var E0=r(Ys);tb=c(E0,"Parallelization"),E0.forEach(t),A0.forEach(t),$t.forEach(t),Ae.forEach(t),Zl=d(o),mo=s(o,"H2",{class:!0});var bm=r(mo);pt=s(bm,"A",{id:!0,class:!0,href:!0});var U0=r(pt);Fd=s(U0,"SPAN",{});var C0=r(Fd);u(Gs.$$.fragment,C0),C0.forEach(t),U0.forEach(t),nb=d(bm),Pd=s(bm,"SPAN",{});var F0=r(Pd);sb=c(F0,"FlaxControlNetOutput"),F0.forEach(t),bm.forEach(t),ec=d(o),fo=s(o,"DIV",{class:!0});var vm=r(fo);u(Js.$$.fragment,vm),rb=d(vm),ut=s(vm,"DIV",{class:!0});var ym=r(ut);u(Zs.$$.fragment,ym),ab=d(ym),Od=s(ym,"P",{});var P0=r(Od);ib=c(P0,"\u201CReturns a new object replacing the specified fields with new values."),P0.forEach(t),ym.forEach(t),vm.forEach(t),oc=d(o),po=s(o,"H2",{class:!0});var xm=r(po);ht=s(xm,"A",{id:!0,class:!0,href:!0});var O0=r(ht);qd=s(O0,"SPAN",{});var q0=r(qd);u(er.$$.fragment,q0),q0.forEach(t),O0.forEach(t),db=d(xm),Ld=s(xm,"SPAN",{});var L0=r(Ld);lb=c(L0,"FlaxControlNetModel"),L0.forEach(t),xm.forEach(t),tc=d(o),j=s(o,"DIV",{class:!0});var de=r(j);u(or.$$.fragment,de),cb=d(de),tr=s(de,"P",{});var $m=r(tr);mb=c($m,"Quoting from "),nr=s($m,"A",{href:!0,rel:!0});var j0=r(nr);fb=c(j0,"https://arxiv.org/abs/2302.05543"),j0.forEach(t),pb=c($m,`: \u201CStable Diffusion uses a pre-processing method similar to VQ-GAN
[11] to convert the entire dataset of 512 \xD7 512 images into smaller 64 \xD7 64 \u201Clatent images\u201D for stabilized
training. This requires ControlNets to convert image-based conditions to 64 \xD7 64 feature space to match the
convolution size. We use a tiny network E(\xB7) of four convolution layers with 4 \xD7 4 kernels and 2 \xD7 2 strides
(activated by ReLU, channels are 16, 32, 64, 128, initialized with Gaussian weights, trained jointly with the full
model) to encode image-space conditions \u2026 into feature maps \u2026\u201D`),$m.forEach(t),ub=d(de),sr=s(de,"P",{});var wm=r(sr);hb=c(wm,"This model inherits from "),zr=s(wm,"A",{href:!0});var I0=r(zr);_b=c(I0,"FlaxModelMixin"),I0.forEach(t),gb=c(wm,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),wm.forEach(t),bb=d(de),rr=s(de,"P",{});var Dm=r(rr);vb=c(Dm,"Also, this model is a Flax Linen "),ar=s(Dm,"A",{href:!0,rel:!0});var z0=r(ar);yb=c(z0,"flax.linen.Module"),z0.forEach(t),xb=c(Dm,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Dm.forEach(t),$b=d(de),jd=s(de,"P",{});var V0=r(jd);wb=c(V0,"Finally, this model supports inherent JAX features such as:"),V0.forEach(t),Db=d(de),ue=s(de,"UL",{});var wt=r(ue);Id=s(wt,"LI",{});var B0=r(Id);ir=s(B0,"A",{href:!0,rel:!0});var S0=r(ir);kb=c(S0,"Just-In-Time (JIT) compilation"),S0.forEach(t),B0.forEach(t),Tb=d(wt),zd=s(wt,"LI",{});var K0=r(zd);dr=s(K0,"A",{href:!0,rel:!0});var W0=r(dr);Mb=c(W0,"Automatic Differentiation"),W0.forEach(t),K0.forEach(t),Nb=d(wt),Vd=s(wt,"LI",{});var X0=r(Vd);lr=s(X0,"A",{href:!0,rel:!0});var H0=r(lr);Ab=c(H0,"Vectorization"),H0.forEach(t),X0.forEach(t),Eb=d(wt),Bd=s(wt,"LI",{});var Q0=r(Bd);cr=s(Q0,"A",{href:!0,rel:!0});var R0=r(cr);Ub=c(R0,"Parallelization"),R0.forEach(t),Q0.forEach(t),wt.forEach(t),de.forEach(t),this.h()},h(){a(x,"name","hf:doc:metadata"),a(x,"content",JSON.stringify(cy)),a($,"id","models"),a($,"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"),a($,"href","#models"),a(D,"class","relative group"),a(ho,"id","diffusers.ModelMixin"),a(ho,"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"),a(ho,"href","#diffusers.ModelMixin"),a(Ue,"class","relative group"),a(hr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a(_r,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin.save_pretrained"),a(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(_o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a($o,"id","diffusers.models.unet_2d.UNet2DOutput"),a($o,"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"),a($o,"href","#diffusers.models.unet_2d.UNet2DOutput"),a(Fe,"class","relative group"),a(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(wo,"id","diffusers.UNet2DModel"),a(wo,"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"),a(wo,"href","#diffusers.UNet2DModel"),a(Pe,"class","relative group"),a(gr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a(br,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Do,"id","diffusers.models.unet_1d.UNet1DOutput"),a(Do,"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"),a(Do,"href","#diffusers.models.unet_1d.UNet1DOutput"),a(Oe,"class","relative group"),a(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ko,"id","diffusers.UNet1DModel"),a(ko,"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"),a(ko,"href","#diffusers.UNet1DModel"),a(qe,"class","relative group"),a(vr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a(yr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(To,"id","diffusers.models.unet_2d_condition.UNet2DConditionOutput"),a(To,"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"),a(To,"href","#diffusers.models.unet_2d_condition.UNet2DConditionOutput"),a(Le,"class","relative group"),a(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Mo,"id","diffusers.UNet2DConditionModel"),a(Mo,"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"),a(Mo,"href","#diffusers.UNet2DConditionModel"),a(je,"class","relative group"),a(xr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a($r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(wr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(No,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Ao,"id","diffusers.models.unet_3d_condition.UNet3DConditionOutput"),a(Ao,"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"),a(Ao,"href","#diffusers.models.unet_3d_condition.UNet3DConditionOutput"),a(Ie,"class","relative group"),a(dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Eo,"id","diffusers.UNet3DConditionModel"),a(Eo,"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"),a(Eo,"href","#diffusers.UNet3DConditionModel"),a(ze,"class","relative group"),a(Dr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a(kr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Tr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Co,"id","diffusers.models.vae.DecoderOutput"),a(Co,"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"),a(Co,"href","#diffusers.models.vae.DecoderOutput"),a(Ve,"class","relative group"),a(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Fo,"id","diffusers.models.vq_model.VQEncoderOutput"),a(Fo,"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"),a(Fo,"href","#diffusers.models.vq_model.VQEncoderOutput"),a(Se,"class","relative group"),a(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Po,"id","diffusers.VQModel"),a(Po,"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"),a(Po,"href","#diffusers.VQModel"),a(We,"class","relative group"),a(Mr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a(Nr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Oo,"id","diffusers.models.autoencoder_kl.AutoencoderKLOutput"),a(Oo,"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"),a(Oo,"href","#diffusers.models.autoencoder_kl.AutoencoderKLOutput"),a(Xe,"class","relative group"),a(He,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(qo,"id","diffusers.AutoencoderKL"),a(qo,"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"),a(qo,"href","#diffusers.AutoencoderKL"),a(Qe,"class","relative group"),a(Ar,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Er,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(So,"id","diffusers.Transformer2DModel"),a(So,"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"),a(So,"href","#diffusers.Transformer2DModel"),a(Re,"class","relative group"),a(Ur,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Ko,"id","diffusers.models.transformer_2d.Transformer2DModelOutput"),a(Ko,"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"),a(Ko,"href","#diffusers.models.transformer_2d.Transformer2DModelOutput"),a(Ye,"class","relative group"),a(Kn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Wo,"id","diffusers.models.transformer_temporal.TransformerTemporalModel"),a(Wo,"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"),a(Wo,"href","#diffusers.models.transformer_temporal.TransformerTemporalModel"),a(Ge,"class","relative group"),a(Cr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Xo,"id","diffusers.models.transformer_temporal.TransformerTemporalModelOutput"),a(Xo,"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"),a(Xo,"href","#diffusers.models.transformer_temporal.TransformerTemporalModelOutput"),a(Je,"class","relative group"),a(Yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Ho,"id","diffusers.PriorTransformer"),a(Ho,"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"),a(Ho,"href","#diffusers.PriorTransformer"),a(Ze,"class","relative group"),a(Fr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.ModelMixin"),a(os,"href","https://arxiv.org/abs/2204.06125"),a(os,"rel","nofollow"),a(Or,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Qo,"id","diffusers.models.prior_transformer.PriorTransformerOutput"),a(Qo,"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"),a(Qo,"href","#diffusers.models.prior_transformer.PriorTransformerOutput"),a(eo,"class","relative group"),a(ss,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Ro,"id","diffusers.models.controlnet.ControlNetOutput"),a(Ro,"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"),a(Ro,"href","#diffusers.models.controlnet.ControlNetOutput"),a(oo,"class","relative group"),a(is,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Yo,"id","diffusers.ControlNetModel"),a(Yo,"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"),a(Yo,"href","#diffusers.ControlNetModel"),a(to,"class","relative group"),a(Go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(qr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Jo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(Zo,"id","diffusers.FlaxModelMixin"),a(Zo,"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"),a(Zo,"href","#diffusers.FlaxModelMixin"),a(no,"class","relative group"),a(jr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.FlaxModelMixin"),a(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(rt,"id","diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),a(rt,"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"),a(rt,"href","#diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),a(so,"class","relative group"),a(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(it,"id","diffusers.FlaxUNet2DConditionModel"),a(it,"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"),a(it,"href","#diffusers.FlaxUNet2DConditionModel"),a(ao,"class","relative group"),a(Ir,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.FlaxModelMixin"),a(Cs,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),a(Cs,"rel","nofollow"),a(Fs,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),a(Fs,"rel","nofollow"),a(Ps,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),a(Ps,"rel","nofollow"),a(Os,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),a(Os,"rel","nofollow"),a(qs,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),a(qs,"rel","nofollow"),a(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(dt,"id","diffusers.models.vae_flax.FlaxDecoderOutput"),a(dt,"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"),a(dt,"href","#diffusers.models.vae_flax.FlaxDecoderOutput"),a(io,"class","relative group"),a(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ct,"id","diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),a(ct,"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"),a(ct,"href","#diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),a(lo,"class","relative group"),a(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ft,"id","diffusers.FlaxAutoencoderKL"),a(ft,"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"),a(ft,"href","#diffusers.FlaxAutoencoderKL"),a(co,"class","relative group"),a(Xs,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),a(Xs,"rel","nofollow"),a(Hs,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),a(Hs,"rel","nofollow"),a(Qs,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),a(Qs,"rel","nofollow"),a(Rs,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),a(Rs,"rel","nofollow"),a(Ys,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),a(Ys,"rel","nofollow"),a(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(pt,"id","diffusers.models.controlnet_flax.FlaxControlNetOutput"),a(pt,"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"),a(pt,"href","#diffusers.models.controlnet_flax.FlaxControlNetOutput"),a(mo,"class","relative group"),a(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),a(ht,"id","diffusers.FlaxControlNetModel"),a(ht,"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"),a(ht,"href","#diffusers.FlaxControlNetModel"),a(po,"class","relative group"),a(nr,"href","https://arxiv.org/abs/2302.05543"),a(nr,"rel","nofollow"),a(zr,"href","/docs/diffusers/v0.16.0/en/api/models#diffusers.FlaxModelMixin"),a(ar,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),a(ar,"rel","nofollow"),a(ir,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),a(ir,"rel","nofollow"),a(dr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),a(dr,"rel","nofollow"),a(lr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),a(lr,"rel","nofollow"),a(cr,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),a(cr,"rel","nofollow"),a(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,m){e(document.head,x),f(o,T,m),f(o,D,m),e(D,$),e($,k),h(v,k,null),e(D,w),e(D,ne),e(ne,Ee),f(o,R,m),f(o,Y,m),e(Y,pr),e(Y,Gr),e(Gr,km),e(Y,Tm),e(Y,Jr),e(Jr,Mm),e(Y,Nm),f(o,Gd,m),f(o,Ue,m),e(Ue,ho),e(ho,Zr),h(Dt,Zr,null),e(Ue,Am),e(Ue,ea),e(ea,Em),f(o,Jd,m),f(o,N,m),h(kt,N,null),e(N,Um),e(N,oa),e(oa,Cm),e(N,Fm),e(N,ur),e(ur,hr),e(hr,Pm),e(ur,Om),e(N,qm),e(N,ta),e(ta,he),e(he,na),e(na,Lm),e(he,jm),e(he,sa),e(sa,Im),e(he,zm),e(he,_r),e(_r,Vm),e(he,Bm),e(N,Sm),e(N,_e),h(Tt,_e,null),e(_e,Km),e(_e,ra),e(ra,Wm),e(_e,Xm),e(_e,aa),e(aa,Hm),e(N,Qm),e(N,_o),h(Mt,_o,null),e(_o,Rm),e(_o,ia),e(ia,Ym),e(N,Gm),e(N,ge),h(Nt,ge,null),e(ge,Jm),e(ge,da),e(da,Zm),e(ge,ef),e(ge,la),e(la,of),e(N,tf),e(N,K),h(At,K,null),e(K,nf),e(K,ca),e(ca,sf),e(K,rf),e(K,ma),e(ma,af),e(K,df),e(K,fa),e(fa,lf),e(K,cf),h(go,K,null),e(N,mf),e(N,O),h(Et,O,null),e(O,ff),e(O,pa),e(pa,pf),e(O,uf),e(O,Ce),e(Ce,hf),e(Ce,ua),e(ua,_f),e(Ce,gf),e(Ce,ha),e(ha,bf),e(Ce,vf),e(O,yf),e(O,Ut),e(Ut,xf),e(Ut,_a),e(_a,$f),e(Ut,wf),e(O,Df),e(O,Ct),e(Ct,kf),e(Ct,ga),e(ga,Tf),e(Ct,Mf),e(O,Nf),h(bo,O,null),e(O,Af),h(vo,O,null),e(N,Ef),e(N,yo),h(Ft,yo,null),e(yo,Uf),e(yo,ba),e(ba,Cf),e(N,Ff),e(N,xo),h(Pt,xo,null),e(xo,Pf),e(xo,Ot),e(Ot,Of),e(Ot,va),e(va,qf),e(Ot,Lf),f(o,Zd,m),f(o,Fe,m),e(Fe,$o),e($o,ya),h(qt,ya,null),e(Fe,jf),e(Fe,xa),e(xa,If),f(o,el,m),f(o,Lt,m),h(jt,Lt,null),f(o,ol,m),f(o,Pe,m),e(Pe,wo),e(wo,$a),h(It,$a,null),e(Pe,zf),e(Pe,wa),e(wa,Vf),f(o,tl,m),f(o,G,m),h(zt,G,null),e(G,Bf),e(G,Da),e(Da,Sf),e(G,Kf),e(G,Vt),e(Vt,Wf),e(Vt,gr),e(gr,Xf),e(Vt,Hf),e(G,Qf),e(G,br),h(Bt,br,null),f(o,nl,m),f(o,Oe,m),e(Oe,Do),e(Do,ka),h(St,ka,null),e(Oe,Rf),e(Oe,Ta),e(Ta,Yf),f(o,sl,m),f(o,Kt,m),h(Wt,Kt,null),f(o,rl,m),f(o,qe,m),e(qe,ko),e(ko,Ma),h(Xt,Ma,null),e(qe,Gf),e(qe,Na),e(Na,Jf),f(o,al,m),f(o,J,m),h(Ht,J,null),e(J,Zf),e(J,Aa),e(Aa,ep),e(J,op),e(J,Qt),e(Qt,tp),e(Qt,vr),e(vr,np),e(Qt,sp),e(J,rp),e(J,yr),h(Rt,yr,null),f(o,il,m),f(o,Le,m),e(Le,To),e(To,Ea),h(Yt,Ea,null),e(Le,ap),e(Le,Ua),e(Ua,ip),f(o,dl,m),f(o,Gt,m),h(Jt,Gt,null),f(o,ll,m),f(o,je,m),e(je,Mo),e(Mo,Ca),h(Zt,Ca,null),e(je,dp),e(je,Fa),e(Fa,lp),f(o,cl,m),f(o,F,m),h(en,F,null),e(F,cp),e(F,Pa),e(Pa,mp),e(F,fp),e(F,on),e(on,pp),e(on,xr),e(xr,up),e(on,hp),e(F,_p),e(F,$r),h(tn,$r,null),e(F,gp),e(F,be),h(nn,be,null),e(be,bp),e(be,Oa),e(Oa,vp),e(be,yp),e(be,qa),e(qa,xp),e(F,$p),e(F,wr),h(sn,wr,null),e(F,wp),e(F,No),h(rn,No,null),e(No,Dp),e(No,La),e(La,kp),f(o,ml,m),f(o,Ie,m),e(Ie,Ao),e(Ao,ja),h(an,ja,null),e(Ie,Tp),e(Ie,Ia),e(Ia,Mp),f(o,fl,m),f(o,dn,m),h(ln,dn,null),f(o,pl,m),f(o,ze,m),e(ze,Eo),e(Eo,za),h(cn,za,null),e(ze,Np),e(ze,Va),e(Va,Ap),f(o,ul,m),f(o,P,m),h(mn,P,null),e(P,Ep),e(P,Ba),e(Ba,Up),e(P,Cp),e(P,fn),e(fn,Fp),e(fn,Dr),e(Dr,Pp),e(fn,Op),e(P,qp),e(P,kr),h(pn,kr,null),e(P,Lp),e(P,ve),h(un,ve,null),e(ve,jp),e(ve,Sa),e(Sa,Ip),e(ve,zp),e(ve,Ka),e(Ka,Vp),e(P,Bp),e(P,Tr),h(hn,Tr,null),e(P,Sp),e(P,Uo),h(_n,Uo,null),e(Uo,Kp),e(Uo,Wa),e(Wa,Wp),f(o,hl,m),f(o,Ve,m),e(Ve,Co),e(Co,Xa),h(gn,Xa,null),e(Ve,Xp),e(Ve,Ha),e(Ha,Hp),f(o,_l,m),f(o,Be,m),h(bn,Be,null),e(Be,Qp),e(Be,Qa),e(Qa,Rp),f(o,gl,m),f(o,Se,m),e(Se,Fo),e(Fo,Ra),h(vn,Ra,null),e(Se,Yp),e(Se,Ya),e(Ya,Gp),f(o,bl,m),f(o,Ke,m),h(yn,Ke,null),e(Ke,Jp),e(Ke,Ga),e(Ga,Zp),f(o,vl,m),f(o,We,m),e(We,Po),e(Po,Ja),h(xn,Ja,null),e(We,eu),e(We,Za),e(Za,ou),f(o,yl,m),f(o,Z,m),h($n,Z,null),e(Z,tu),e(Z,ei),e(ei,nu),e(Z,su),e(Z,wn),e(wn,ru),e(wn,Mr),e(Mr,au),e(wn,iu),e(Z,du),e(Z,Nr),h(Dn,Nr,null),f(o,xl,m),f(o,Xe,m),e(Xe,Oo),e(Oo,oi),h(kn,oi,null),e(Xe,lu),e(Xe,ti),e(ti,cu),f(o,$l,m),f(o,He,m),h(Tn,He,null),e(He,mu),e(He,ni),e(ni,fu),f(o,wl,m),f(o,Qe,m),e(Qe,qo),e(qo,si),h(Mn,si,null),e(Qe,pu),e(Qe,ri),e(ri,uu),f(o,Dl,m),f(o,A,m),h(Nn,A,null),e(A,hu),e(A,ai),e(ai,_u),e(A,gu),e(A,An),e(An,bu),e(An,Ar),e(Ar,vu),e(An,yu),e(A,xu),e(A,Lo),h(En,Lo,null),e(Lo,$u),e(Lo,Un),e(Un,wu),e(Un,ii),e(ii,Du),e(Un,ku),e(A,Tu),e(A,jo),h(Cn,jo,null),e(jo,Mu),e(jo,Fn),e(Fn,Nu),e(Fn,di),e(di,Au),e(Fn,Eu),e(A,Uu),e(A,Io),h(Pn,Io,null),e(Io,Cu),e(Io,li),e(li,Fu),e(A,Pu),e(A,zo),h(On,zo,null),e(zo,Ou),e(zo,ci),e(ci,qu),e(A,Lu),e(A,Er),h(qn,Er,null),e(A,ju),e(A,Vo),h(Ln,Vo,null),e(Vo,Iu),e(Vo,mi),e(mi,zu),e(A,Vu),e(A,Bo),h(jn,Bo,null),e(Bo,Bu),e(Bo,fi),e(fi,Su),f(o,kl,m),f(o,Re,m),e(Re,So),e(So,pi),h(In,pi,null),e(Re,Ku),e(Re,ui),e(ui,Wu),f(o,Tl,m),f(o,q,m),h(zn,q,null),e(q,Xu),e(q,hi),e(hi,Hu),e(q,Qu),e(q,_i),e(_i,Ru),e(q,Yu),e(q,Vn),e(Vn,Gu),e(Vn,gi),e(gi,Ju),e(Vn,Zu),e(q,eh),e(q,bi),e(bi,oh),e(q,th),e(q,Ur),h(Bn,Ur,null),f(o,Ml,m),f(o,Ye,m),e(Ye,Ko),e(Ko,vi),h(Sn,vi,null),e(Ye,nh),e(Ye,yi),e(yi,sh),f(o,Nl,m),f(o,Kn,m),h(Wn,Kn,null),f(o,Al,m),f(o,Ge,m),e(Ge,Wo),e(Wo,xi),h(Xn,xi,null),e(Ge,rh),e(Ge,$i),e($i,ah),f(o,El,m),f(o,le,m),h(Hn,le,null),e(le,ih),e(le,wi),e(wi,dh),e(le,lh),e(le,Cr),h(Qn,Cr,null),f(o,Ul,m),f(o,Je,m),e(Je,Xo),e(Xo,Di),h(Rn,Di,null),e(Je,ch),e(Je,ki),e(ki,mh),f(o,Cl,m),f(o,Yn,m),h(Gn,Yn,null),f(o,Fl,m),f(o,Ze,m),e(Ze,Ho),e(Ho,Ti),h(Jn,Ti,null),e(Ze,fh),e(Ze,Mi),e(Mi,ph),f(o,Pl,m),f(o,V,m),h(Zn,V,null),e(V,uh),e(V,Ni),e(Ni,hh),e(V,_h),e(V,es),e(es,gh),e(es,Fr),e(Fr,bh),e(es,vh),e(V,yh),e(V,Pr),e(Pr,xh),e(Pr,os),e(os,$h),e(V,wh),e(V,Or),h(ts,Or,null),f(o,Ol,m),f(o,eo,m),e(eo,Qo),e(Qo,Ai),h(ns,Ai,null),e(eo,Dh),e(eo,Ei),e(Ei,kh),f(o,ql,m),f(o,ss,m),h(rs,ss,null),f(o,Ll,m),f(o,oo,m),e(oo,Ro),e(Ro,Ui),h(as,Ui,null),e(oo,Th),e(oo,Ci),e(Ci,Mh),f(o,jl,m),f(o,is,m),h(ds,is,null),f(o,Il,m),f(o,to,m),e(to,Yo),e(Yo,Fi),h(ls,Fi,null),e(to,Nh),e(to,Pi),e(Pi,Ah),f(o,zl,m),f(o,B,m),h(cs,B,null),e(B,Eh),e(B,Go),h(ms,Go,null),e(Go,Uh),e(Go,Oi),e(Oi,Ch),e(B,Fh),e(B,ye),h(fs,ye,null),e(ye,Ph),e(ye,qi),e(qi,Oh),e(ye,qh),e(ye,Li),e(Li,Lh),e(B,jh),e(B,qr),h(ps,qr,null),e(B,Ih),e(B,Jo),h(us,Jo,null),e(Jo,zh),e(Jo,ji),e(ji,Vh),f(o,Vl,m),f(o,no,m),e(no,Zo),e(Zo,Ii),h(hs,Ii,null),e(no,Bh),e(no,zi),e(zi,Sh),f(o,Bl,m),f(o,U,m),h(_s,U,null),e(U,Kh),e(U,Vi),e(Vi,Wh),e(U,Xh),e(U,Lr),e(Lr,jr),e(jr,Hh),e(Lr,Qh),e(U,Rh),e(U,W),h(gs,W,null),e(W,Yh),e(W,Bi),e(Bi,Gh),e(W,Jh),e(W,bs),e(bs,Zh),e(bs,Si),e(Si,e_),e(bs,o_),e(W,t_),e(W,vs),e(vs,n_),e(vs,Ki),e(Ki,s_),e(vs,r_),e(W,a_),h(et,W,null),e(U,i_),e(U,ot),h(ys,ot,null),e(ot,d_),e(ot,xs),e(xs,l_),e(xs,Wi),e(Wi,c_),e(xs,m_),e(U,f_),e(U,se),h($s,se,null),e(se,p_),e(se,ee),e(ee,u_),e(ee,Xi),e(Xi,h_),e(ee,__),e(ee,Hi),e(Hi,g_),e(ee,b_),e(ee,Qi),e(Qi,v_),e(ee,y_),e(ee,Ri),e(Ri,x_),e(ee,$_),e(se,w_),e(se,Yi),e(Yi,D_),e(se,k_),h(tt,se,null),e(U,T_),e(U,re),h(ws,re,null),e(re,M_),e(re,oe),e(oe,N_),e(oe,Gi),e(Gi,A_),e(oe,E_),e(oe,Ji),e(Ji,U_),e(oe,C_),e(oe,Zi),e(Zi,F_),e(oe,P_),e(oe,ed),e(ed,O_),e(oe,q_),e(re,L_),e(re,od),e(od,j_),e(re,I_),h(nt,re,null),e(U,z_),e(U,xe),h(Ds,xe,null),e(xe,V_),e(xe,te),e(te,B_),e(te,td),e(td,S_),e(te,K_),e(te,nd),e(nd,W_),e(te,X_),e(te,sd),e(sd,H_),e(te,Q_),e(te,rd),e(rd,R_),e(te,Y_),e(xe,G_),h(st,xe,null),f(o,Sl,m),f(o,so,m),e(so,rt),e(rt,ad),h(ks,ad,null),e(so,J_),e(so,id),e(id,Z_),f(o,Kl,m),f(o,ro,m),h(Ts,ro,null),e(ro,eg),e(ro,at),h(Ms,at,null),e(at,og),e(at,dd),e(dd,tg),f(o,Wl,m),f(o,ao,m),e(ao,it),e(it,ld),h(Ns,ld,null),e(ao,ng),e(ao,cd),e(cd,sg),f(o,Xl,m),f(o,L,m),h(As,L,null),e(L,rg),e(L,md),e(md,ag),e(L,ig),e(L,Es),e(Es,dg),e(Es,Ir),e(Ir,lg),e(Es,cg),e(L,mg),e(L,Us),e(Us,fg),e(Us,Cs),e(Cs,pg),e(Us,ug),e(L,hg),e(L,fd),e(fd,_g),e(L,gg),e(L,ce),e(ce,pd),e(pd,Fs),e(Fs,bg),e(ce,vg),e(ce,ud),e(ud,Ps),e(Ps,yg),e(ce,xg),e(ce,hd),e(hd,Os),e(Os,$g),e(ce,wg),e(ce,_d),e(_d,qs),e(qs,Dg),f(o,Hl,m),f(o,io,m),e(io,dt),e(dt,gd),h(Ls,gd,null),e(io,kg),e(io,bd),e(bd,Tg),f(o,Ql,m),f(o,me,m),h(js,me,null),e(me,Mg),e(me,vd),e(vd,Ng),e(me,Ag),e(me,lt),h(Is,lt,null),e(lt,Eg),e(lt,yd),e(yd,Ug),f(o,Rl,m),f(o,lo,m),e(lo,ct),e(ct,xd),h(zs,xd,null),e(lo,Cg),e(lo,$d),e($d,Fg),f(o,Yl,m),f(o,fe,m),h(Vs,fe,null),e(fe,Pg),e(fe,wd),e(wd,Og),e(fe,qg),e(fe,mt),h(Bs,mt,null),e(mt,Lg),e(mt,Dd),e(Dd,jg),f(o,Gl,m),f(o,co,m),e(co,ft),e(ft,kd),h(Ss,kd,null),e(co,Ig),e(co,Td),e(Td,zg),f(o,Jl,m),f(o,S,m),h(Ks,S,null),e(S,Vg),e(S,Md),e(Md,Bg),e(S,Sg),e(S,Ws),e(Ws,Kg),e(Ws,Xs),e(Xs,Wg),e(Ws,Xg),e(S,Hg),e(S,Nd),e(Nd,Qg),e(S,Rg),e(S,pe),e(pe,Ad),e(Ad,Hs),e(Hs,Yg),e(pe,Gg),e(pe,Ed),e(Ed,Qs),e(Qs,Jg),e(pe,Zg),e(pe,Ud),e(Ud,Rs),e(Rs,eb),e(pe,ob),e(pe,Cd),e(Cd,Ys),e(Ys,tb),f(o,Zl,m),f(o,mo,m),e(mo,pt),e(pt,Fd),h(Gs,Fd,null),e(mo,nb),e(mo,Pd),e(Pd,sb),f(o,ec,m),f(o,fo,m),h(Js,fo,null),e(fo,rb),e(fo,ut),h(Zs,ut,null),e(ut,ab),e(ut,Od),e(Od,ib),f(o,oc,m),f(o,po,m),e(po,ht),e(ht,qd),h(er,qd,null),e(po,db),e(po,Ld),e(Ld,lb),f(o,tc,m),f(o,j,m),h(or,j,null),e(j,cb),e(j,tr),e(tr,mb),e(tr,nr),e(nr,fb),e(tr,pb),e(j,ub),e(j,sr),e(sr,hb),e(sr,zr),e(zr,_b),e(sr,gb),e(j,bb),e(j,rr),e(rr,vb),e(rr,ar),e(ar,yb),e(rr,xb),e(j,$b),e(j,jd),e(jd,wb),e(j,Db),e(j,ue),e(ue,Id),e(Id,ir),e(ir,kb),e(ue,Tb),e(ue,zd),e(zd,dr),e(dr,Mb),e(ue,Nb),e(ue,Vd),e(Vd,lr),e(lr,Ab),e(ue,Eb),e(ue,Bd),e(Bd,cr),e(cr,Ub),nc=!0},p(o,[m]){const mr={};m&2&&(mr.$$scope={dirty:m,ctx:o}),go.$set(mr);const Sd={};m&2&&(Sd.$$scope={dirty:m,ctx:o}),bo.$set(Sd);const Kd={};m&2&&(Kd.$$scope={dirty:m,ctx:o}),vo.$set(Kd);const Wd={};m&2&&(Wd.$$scope={dirty:m,ctx:o}),et.$set(Wd);const uo={};m&2&&(uo.$$scope={dirty:m,ctx:o}),tt.$set(uo);const Xd={};m&2&&(Xd.$$scope={dirty:m,ctx:o}),nt.$set(Xd);const Hd={};m&2&&(Hd.$$scope={dirty:m,ctx:o}),st.$set(Hd)},i(o){nc||(_(v.$$.fragment,o),_(Dt.$$.fragment,o),_(kt.$$.fragment,o),_(Tt.$$.fragment,o),_(Mt.$$.fragment,o),_(Nt.$$.fragment,o),_(At.$$.fragment,o),_(go.$$.fragment,o),_(Et.$$.fragment,o),_(bo.$$.fragment,o),_(vo.$$.fragment,o),_(Ft.$$.fragment,o),_(Pt.$$.fragment,o),_(qt.$$.fragment,o),_(jt.$$.fragment,o),_(It.$$.fragment,o),_(zt.$$.fragment,o),_(Bt.$$.fragment,o),_(St.$$.fragment,o),_(Wt.$$.fragment,o),_(Xt.$$.fragment,o),_(Ht.$$.fragment,o),_(Rt.$$.fragment,o),_(Yt.$$.fragment,o),_(Jt.$$.fragment,o),_(Zt.$$.fragment,o),_(en.$$.fragment,o),_(tn.$$.fragment,o),_(nn.$$.fragment,o),_(sn.$$.fragment,o),_(rn.$$.fragment,o),_(an.$$.fragment,o),_(ln.$$.fragment,o),_(cn.$$.fragment,o),_(mn.$$.fragment,o),_(pn.$$.fragment,o),_(un.$$.fragment,o),_(hn.$$.fragment,o),_(_n.$$.fragment,o),_(gn.$$.fragment,o),_(bn.$$.fragment,o),_(vn.$$.fragment,o),_(yn.$$.fragment,o),_(xn.$$.fragment,o),_($n.$$.fragment,o),_(Dn.$$.fragment,o),_(kn.$$.fragment,o),_(Tn.$$.fragment,o),_(Mn.$$.fragment,o),_(Nn.$$.fragment,o),_(En.$$.fragment,o),_(Cn.$$.fragment,o),_(Pn.$$.fragment,o),_(On.$$.fragment,o),_(qn.$$.fragment,o),_(Ln.$$.fragment,o),_(jn.$$.fragment,o),_(In.$$.fragment,o),_(zn.$$.fragment,o),_(Bn.$$.fragment,o),_(Sn.$$.fragment,o),_(Wn.$$.fragment,o),_(Xn.$$.fragment,o),_(Hn.$$.fragment,o),_(Qn.$$.fragment,o),_(Rn.$$.fragment,o),_(Gn.$$.fragment,o),_(Jn.$$.fragment,o),_(Zn.$$.fragment,o),_(ts.$$.fragment,o),_(ns.$$.fragment,o),_(rs.$$.fragment,o),_(as.$$.fragment,o),_(ds.$$.fragment,o),_(ls.$$.fragment,o),_(cs.$$.fragment,o),_(ms.$$.fragment,o),_(fs.$$.fragment,o),_(ps.$$.fragment,o),_(us.$$.fragment,o),_(hs.$$.fragment,o),_(_s.$$.fragment,o),_(gs.$$.fragment,o),_(et.$$.fragment,o),_(ys.$$.fragment,o),_($s.$$.fragment,o),_(tt.$$.fragment,o),_(ws.$$.fragment,o),_(nt.$$.fragment,o),_(Ds.$$.fragment,o),_(st.$$.fragment,o),_(ks.$$.fragment,o),_(Ts.$$.fragment,o),_(Ms.$$.fragment,o),_(Ns.$$.fragment,o),_(As.$$.fragment,o),_(Ls.$$.fragment,o),_(js.$$.fragment,o),_(Is.$$.fragment,o),_(zs.$$.fragment,o),_(Vs.$$.fragment,o),_(Bs.$$.fragment,o),_(Ss.$$.fragment,o),_(Ks.$$.fragment,o),_(Gs.$$.fragment,o),_(Js.$$.fragment,o),_(Zs.$$.fragment,o),_(er.$$.fragment,o),_(or.$$.fragment,o),nc=!0)},o(o){g(v.$$.fragment,o),g(Dt.$$.fragment,o),g(kt.$$.fragment,o),g(Tt.$$.fragment,o),g(Mt.$$.fragment,o),g(Nt.$$.fragment,o),g(At.$$.fragment,o),g(go.$$.fragment,o),g(Et.$$.fragment,o),g(bo.$$.fragment,o),g(vo.$$.fragment,o),g(Ft.$$.fragment,o),g(Pt.$$.fragment,o),g(qt.$$.fragment,o),g(jt.$$.fragment,o),g(It.$$.fragment,o),g(zt.$$.fragment,o),g(Bt.$$.fragment,o),g(St.$$.fragment,o),g(Wt.$$.fragment,o),g(Xt.$$.fragment,o),g(Ht.$$.fragment,o),g(Rt.$$.fragment,o),g(Yt.$$.fragment,o),g(Jt.$$.fragment,o),g(Zt.$$.fragment,o),g(en.$$.fragment,o),g(tn.$$.fragment,o),g(nn.$$.fragment,o),g(sn.$$.fragment,o),g(rn.$$.fragment,o),g(an.$$.fragment,o),g(ln.$$.fragment,o),g(cn.$$.fragment,o),g(mn.$$.fragment,o),g(pn.$$.fragment,o),g(un.$$.fragment,o),g(hn.$$.fragment,o),g(_n.$$.fragment,o),g(gn.$$.fragment,o),g(bn.$$.fragment,o),g(vn.$$.fragment,o),g(yn.$$.fragment,o),g(xn.$$.fragment,o),g($n.$$.fragment,o),g(Dn.$$.fragment,o),g(kn.$$.fragment,o),g(Tn.$$.fragment,o),g(Mn.$$.fragment,o),g(Nn.$$.fragment,o),g(En.$$.fragment,o),g(Cn.$$.fragment,o),g(Pn.$$.fragment,o),g(On.$$.fragment,o),g(qn.$$.fragment,o),g(Ln.$$.fragment,o),g(jn.$$.fragment,o),g(In.$$.fragment,o),g(zn.$$.fragment,o),g(Bn.$$.fragment,o),g(Sn.$$.fragment,o),g(Wn.$$.fragment,o),g(Xn.$$.fragment,o),g(Hn.$$.fragment,o),g(Qn.$$.fragment,o),g(Rn.$$.fragment,o),g(Gn.$$.fragment,o),g(Jn.$$.fragment,o),g(Zn.$$.fragment,o),g(ts.$$.fragment,o),g(ns.$$.fragment,o),g(rs.$$.fragment,o),g(as.$$.fragment,o),g(ds.$$.fragment,o),g(ls.$$.fragment,o),g(cs.$$.fragment,o),g(ms.$$.fragment,o),g(fs.$$.fragment,o),g(ps.$$.fragment,o),g(us.$$.fragment,o),g(hs.$$.fragment,o),g(_s.$$.fragment,o),g(gs.$$.fragment,o),g(et.$$.fragment,o),g(ys.$$.fragment,o),g($s.$$.fragment,o),g(tt.$$.fragment,o),g(ws.$$.fragment,o),g(nt.$$.fragment,o),g(Ds.$$.fragment,o),g(st.$$.fragment,o),g(ks.$$.fragment,o),g(Ts.$$.fragment,o),g(Ms.$$.fragment,o),g(Ns.$$.fragment,o),g(As.$$.fragment,o),g(Ls.$$.fragment,o),g(js.$$.fragment,o),g(Is.$$.fragment,o),g(zs.$$.fragment,o),g(Vs.$$.fragment,o),g(Bs.$$.fragment,o),g(Ss.$$.fragment,o),g(Ks.$$.fragment,o),g(Gs.$$.fragment,o),g(Js.$$.fragment,o),g(Zs.$$.fragment,o),g(er.$$.fragment,o),g(or.$$.fragment,o),nc=!1},d(o){t(x),o&&t(T),o&&t(D),b(v),o&&t(R),o&&t(Y),o&&t(Gd),o&&t(Ue),b(Dt),o&&t(Jd),o&&t(N),b(kt),b(Tt),b(Mt),b(Nt),b(At),b(go),b(Et),b(bo),b(vo),b(Ft),b(Pt),o&&t(Zd),o&&t(Fe),b(qt),o&&t(el),o&&t(Lt),b(jt),o&&t(ol),o&&t(Pe),b(It),o&&t(tl),o&&t(G),b(zt),b(Bt),o&&t(nl),o&&t(Oe),b(St),o&&t(sl),o&&t(Kt),b(Wt),o&&t(rl),o&&t(qe),b(Xt),o&&t(al),o&&t(J),b(Ht),b(Rt),o&&t(il),o&&t(Le),b(Yt),o&&t(dl),o&&t(Gt),b(Jt),o&&t(ll),o&&t(je),b(Zt),o&&t(cl),o&&t(F),b(en),b(tn),b(nn),b(sn),b(rn),o&&t(ml),o&&t(Ie),b(an),o&&t(fl),o&&t(dn),b(ln),o&&t(pl),o&&t(ze),b(cn),o&&t(ul),o&&t(P),b(mn),b(pn),b(un),b(hn),b(_n),o&&t(hl),o&&t(Ve),b(gn),o&&t(_l),o&&t(Be),b(bn),o&&t(gl),o&&t(Se),b(vn),o&&t(bl),o&&t(Ke),b(yn),o&&t(vl),o&&t(We),b(xn),o&&t(yl),o&&t(Z),b($n),b(Dn),o&&t(xl),o&&t(Xe),b(kn),o&&t($l),o&&t(He),b(Tn),o&&t(wl),o&&t(Qe),b(Mn),o&&t(Dl),o&&t(A),b(Nn),b(En),b(Cn),b(Pn),b(On),b(qn),b(Ln),b(jn),o&&t(kl),o&&t(Re),b(In),o&&t(Tl),o&&t(q),b(zn),b(Bn),o&&t(Ml),o&&t(Ye),b(Sn),o&&t(Nl),o&&t(Kn),b(Wn),o&&t(Al),o&&t(Ge),b(Xn),o&&t(El),o&&t(le),b(Hn),b(Qn),o&&t(Ul),o&&t(Je),b(Rn),o&&t(Cl),o&&t(Yn),b(Gn),o&&t(Fl),o&&t(Ze),b(Jn),o&&t(Pl),o&&t(V),b(Zn),b(ts),o&&t(Ol),o&&t(eo),b(ns),o&&t(ql),o&&t(ss),b(rs),o&&t(Ll),o&&t(oo),b(as),o&&t(jl),o&&t(is),b(ds),o&&t(Il),o&&t(to),b(ls),o&&t(zl),o&&t(B),b(cs),b(ms),b(fs),b(ps),b(us),o&&t(Vl),o&&t(no),b(hs),o&&t(Bl),o&&t(U),b(_s),b(gs),b(et),b(ys),b($s),b(tt),b(ws),b(nt),b(Ds),b(st),o&&t(Sl),o&&t(so),b(ks),o&&t(Kl),o&&t(ro),b(Ts),b(Ms),o&&t(Wl),o&&t(ao),b(Ns),o&&t(Xl),o&&t(L),b(As),o&&t(Hl),o&&t(io),b(Ls),o&&t(Ql),o&&t(me),b(js),b(Is),o&&t(Rl),o&&t(lo),b(zs),o&&t(Yl),o&&t(fe),b(Vs),b(Bs),o&&t(Gl),o&&t(co),b(Ss),o&&t(Jl),o&&t(S),b(Ks),o&&t(Zl),o&&t(mo),b(Gs),o&&t(ec),o&&t(fo),b(Js),b(Zs),o&&t(oc),o&&t(po),b(er),o&&t(tc),o&&t(j),b(or)}}}const cy={local:"models",sections:[{local:"diffusers.ModelMixin",title:"ModelMixin"},{local:"diffusers.models.unet_2d.UNet2DOutput",title:"UNet2DOutput"},{local:"diffusers.UNet2DModel",title:"UNet2DModel"},{local:"diffusers.models.unet_1d.UNet1DOutput",title:"UNet1DOutput"},{local:"diffusers.UNet1DModel",title:"UNet1DModel"},{local:"diffusers.models.unet_2d_condition.UNet2DConditionOutput",title:"UNet2DConditionOutput"},{local:"diffusers.UNet2DConditionModel",title:"UNet2DConditionModel"},{local:"diffusers.models.unet_3d_condition.UNet3DConditionOutput",title:"UNet3DConditionOutput"},{local:"diffusers.UNet3DConditionModel",title:"UNet3DConditionModel"},{local:"diffusers.models.vae.DecoderOutput",title:"DecoderOutput"},{local:"diffusers.models.vq_model.VQEncoderOutput",title:"VQEncoderOutput"},{local:"diffusers.VQModel",title:"VQModel"},{local:"diffusers.models.autoencoder_kl.AutoencoderKLOutput",title:"AutoencoderKLOutput"},{local:"diffusers.AutoencoderKL",title:"AutoencoderKL"},{local:"diffusers.Transformer2DModel",title:"Transformer2DModel"},{local:"diffusers.models.transformer_2d.Transformer2DModelOutput",title:"Transformer2DModelOutput"},{local:"diffusers.models.transformer_temporal.TransformerTemporalModel",title:"TransformerTemporalModel"},{local:"diffusers.models.transformer_temporal.TransformerTemporalModelOutput",title:"Transformer2DModelOutput"},{local:"diffusers.PriorTransformer",title:"PriorTransformer"},{local:"diffusers.models.prior_transformer.PriorTransformerOutput",title:"PriorTransformerOutput"},{local:"diffusers.models.controlnet.ControlNetOutput",title:"ControlNetOutput"},{local:"diffusers.ControlNetModel",title:"ControlNetModel"},{local:"diffusers.FlaxModelMixin",title:"FlaxModelMixin"},{local:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput",title:"FlaxUNet2DConditionOutput"},{local:"diffusers.FlaxUNet2DConditionModel",title:"FlaxUNet2DConditionModel"},{local:"diffusers.models.vae_flax.FlaxDecoderOutput",title:"FlaxDecoderOutput"},{local:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput",title:"FlaxAutoencoderKLOutput"},{local:"diffusers.FlaxAutoencoderKL",title:"FlaxAutoencoderKL"},{local:"diffusers.models.controlnet_flax.FlaxControlNetOutput",title:"FlaxControlNetOutput"},{local:"diffusers.FlaxControlNetModel",title:"FlaxControlNetModel"}],title:"Models"};function my(I){return oy(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class by extends G0{constructor(x){super();J0(this,x,my,ly,Z0,{})}}export{by as default,cy as metadata};
