import{S as l_,i as c_,s as m_,e as n,k as d,w as u,t as a,M as p_,c as s,d as o,m as l,a as r,x as h,h as i,b as c,G as e,g as p,y as g,q as _,o as b,B as v,v as f_,L as bd}from"../../chunks/vendor-hf-doc-builder.js";import{T as d_}from"../../chunks/Tip-hf-doc-builder.js";import{D as $}from"../../chunks/Docstring-hf-doc-builder.js";import{C as vd}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as E}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as _d}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function u_(I){let x,M,w,y,k,f,D,G;return{c(){x=n("p"),M=a("It is required to be logged in ("),w=n("code"),y=a("huggingface-cli login"),k=a(") when you want to use private or "),f=n("a"),D=a(`gated
models`),G=a("."),this.h()},l(xe){x=s(xe,"P",{});var z=r(x);M=i(z,"It is required to be logged in ("),w=s(z,"CODE",{});var S=r(w);y=i(S,"huggingface-cli login"),S.forEach(o),k=i(z,") when you want to use private or "),f=s(z,"A",{href:!0,rel:!0});var jn=r(f);D=i(jn,`gated
models`),jn.forEach(o),G=i(z,"."),z.forEach(o),this.h()},h(){c(f,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),c(f,"rel","nofollow")},m(xe,z){p(xe,x,z),e(x,M),e(x,w),e(w,y),e(x,k),e(x,f),e(f,D),e(x,G)},d(xe){xe&&o(x)}}}function h_(I){let x,M,w,y,k;return{c(){x=n("p"),M=a("Activate the special "),w=n("a"),y=a("\u201Coffline-mode\u201D"),k=a(` to use
this method in a firewalled environment.`),this.h()},l(f){x=s(f,"P",{});var D=r(x);M=i(D,"Activate the special "),w=s(D,"A",{href:!0,rel:!0});var G=r(w);y=i(G,"\u201Coffline-mode\u201D"),G.forEach(o),k=i(D,` to use
this method in a firewalled environment.`),D.forEach(o),this.h()},h(){c(w,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),c(w,"rel","nofollow")},m(f,D){p(f,x,D),e(x,M),e(x,w),e(w,y),e(x,k)},d(f){f&&o(x)}}}function g_(I){let x,M,w,y,k;return y=new vd({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"),M=a("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var D=r(x);M=i(D,"Examples:"),D.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,D){p(f,x,D),e(x,M),p(f,w,D),g(y,f,D),k=!0},p:bd,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){b(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o(w),v(y,f)}}}function __(I){let x,M,w,y,k;return y=new vd({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"),M=a("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var D=r(x);M=i(D,"Examples:"),D.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,D){p(f,x,D),e(x,M),p(f,w,D),g(y,f,D),k=!0},p:bd,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){b(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o(w),v(y,f)}}}function b_(I){let x,M,w,y,k;return y=new vd({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"),M=a("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var D=r(x);M=i(D,"Examples:"),D.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,D){p(f,x,D),e(x,M),p(f,w,D),g(y,f,D),k=!0},p:bd,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){b(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o(w),v(y,f)}}}function v_(I){let x,M,w,y,k;return y=new vd({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"),M=a("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var D=r(x);M=i(D,"Examples:"),D.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,D){p(f,x,D),e(x,M),p(f,w,D),g(y,f,D),k=!0},p:bd,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){b(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o(w),v(y,f)}}}function x_(I){let x,M,w,y,k,f,D,G,xe,z,S,jn,us,xd,yd,hs,$d,wd,Na,ye,Ye,gs,It,Dd,_s,kd,Ua,T,Vt,Md,bs,Td,Ed,In,Vn,Nd,Ud,Ad,vs,de,xs,Fd,Cd,ys,Pd,Od,Bn,qd,Ld,jd,le,Bt,Id,$s,Vd,Bd,ws,zd,Sd,Ge,zt,Kd,Ds,Wd,Xd,ce,St,Qd,ks,Hd,Yd,Ms,Gd,Rd,R,Kt,Jd,Ts,Zd,el,Es,tl,ol,Ns,nl,sl,A,Wt,rl,Us,al,il,$e,dl,As,ll,cl,Fs,ml,pl,fl,Xt,ul,Cs,hl,gl,_l,Qt,bl,Ps,vl,xl,yl,Re,$l,Je,wl,Ze,Ht,Dl,Os,kl,Ml,et,Yt,Tl,Gt,El,qs,Nl,Ul,Aa,we,tt,Ls,Rt,Al,js,Fl,Fa,Jt,Zt,Ca,De,ot,Is,eo,Cl,Vs,Pl,Pa,K,to,Ol,Bs,ql,Ll,oo,jl,zn,Il,Vl,Bl,Sn,no,Oa,ke,nt,zs,so,zl,Ss,Sl,qa,ro,ao,La,Me,st,Ks,io,Kl,Ws,Wl,ja,W,lo,Xl,Xs,Ql,Hl,co,Yl,Kn,Gl,Rl,Jl,Wn,mo,Ia,Te,rt,Qs,po,Zl,Hs,ec,Va,fo,uo,Ba,Ee,at,Ys,ho,tc,Gs,oc,za,F,go,nc,Rs,sc,rc,_o,ac,Xn,ic,dc,lc,Qn,bo,cc,me,vo,mc,Js,pc,fc,Zs,uc,hc,Hn,xo,Sa,Ne,it,er,yo,gc,tr,_c,Ka,Ue,$o,bc,or,vc,Wa,Ae,dt,nr,wo,xc,sr,yc,Xa,Fe,Do,$c,rr,wc,Qa,Ce,lt,ar,ko,Dc,ir,kc,Ha,X,Mo,Mc,dr,Tc,Ec,To,Nc,Yn,Uc,Ac,Fc,Gn,Eo,Ya,Pe,ct,lr,No,Cc,cr,Pc,Ga,Oe,Uo,Oc,mr,qc,Ra,qe,mt,pr,Ao,Lc,fr,jc,Ja,C,Fo,Ic,ur,Vc,Bc,Co,zc,Rn,Sc,Kc,Wc,pt,Po,Xc,Oo,Qc,hr,Hc,Yc,Gc,pe,qo,Rc,gr,Jc,Zc,_r,em,tm,Jn,Lo,Za,Le,ft,br,jo,om,vr,nm,ei,P,Io,sm,xr,rm,am,yr,im,dm,Vo,lm,$r,cm,mm,pm,wr,fm,um,Zn,Bo,ti,je,ut,Dr,zo,hm,kr,gm,oi,So,Ko,ni,Ie,ht,Mr,Wo,_m,Tr,bm,si,L,Xo,vm,Er,xm,ym,Qo,$m,es,wm,Dm,km,ts,Mm,Ho,Tm,Em,os,Yo,ri,Ve,gt,Nr,Go,Nm,Ur,Um,ai,Ro,Jo,ii,Be,_t,Ar,Zo,Am,Fr,Fm,di,U,en,Cm,Cr,Pm,Om,ns,ss,qm,Lm,jm,V,tn,Im,Pr,Vm,Bm,on,zm,Or,Sm,Km,Wm,nn,Xm,qr,Qm,Hm,Ym,bt,Gm,vt,sn,Rm,rn,Jm,Lr,Zm,ep,tp,J,an,op,Q,np,jr,sp,rp,Ir,ap,ip,Vr,dp,lp,Br,cp,mp,pp,zr,fp,up,xt,hp,Z,dn,gp,H,_p,Sr,bp,vp,Kr,xp,yp,Wr,$p,wp,Xr,Dp,kp,Mp,Qr,Tp,Ep,yt,Np,fe,ln,Up,Y,Ap,Hr,Fp,Cp,Yr,Pp,Op,Gr,qp,Lp,Rr,jp,Ip,Vp,$t,li,ze,wt,Jr,cn,Bp,Zr,zp,ci,Se,mn,Sp,Dt,pn,Kp,ea,Wp,mi,Ke,kt,ta,fn,Xp,oa,Qp,pi,O,un,Hp,na,Yp,Gp,hn,Rp,rs,Jp,Zp,ef,gn,tf,_n,of,nf,sf,sa,rf,af,se,ra,bn,df,lf,aa,vn,cf,mf,ia,xn,pf,ff,da,yn,uf,fi,We,Mt,la,$n,hf,ca,gf,ui,re,wn,_f,ma,bf,vf,Tt,Dn,xf,pa,yf,hi,Xe,Et,fa,kn,$f,ua,wf,gi,ae,Mn,Df,ha,kf,Mf,Nt,Tn,Tf,ga,Ef,_i,Qe,Ut,_a,En,Nf,ba,Uf,bi,j,Nn,Af,va,Ff,Cf,Un,Pf,An,Of,qf,Lf,xa,jf,If,ie,ya,Fn,Vf,Bf,$a,Cn,zf,Sf,wa,Pn,Kf,Wf,Da,On,Xf,vi;return f=new E({}),It=new E({}),Vt=new $({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L145"}}),Bt=new $({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L183"}}),zt=new $({props:{name:"disable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.disable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L220"}}),St=new $({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L172"}}),Kt=new $({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L208"}}),Wt=new $({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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L280"}}),Re=new d_({props:{$$slots:{default:[u_]},$$scope:{ctx:I}}}),Je=new d_({props:{$$slots:{default:[h_]},$$scope:{ctx:I}}}),Ht=new $({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/main/src/diffusers/models/modeling_utils.py#L712",returnDescription:`
<p>The number of parameters.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Yt=new $({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"}],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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L226"}}),Rt=new E({}),Zt=new $({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/main/src/diffusers/models/unet_2d.py#L28"}}),eo=new E({}),to=new $({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:": 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"}],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.`,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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d.py#L38"}}),no=new $({props:{name:"forward",anchor:"diffusers.UNet2DModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{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.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/main/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/main/src/diffusers/models/unet_2d.py#L189",returnDescription:`
<p><a
  href="/docs/diffusers/main/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/main/en/api/models#diffusers.models.unet_2d.UNet2DOutput"
>UNet2DOutput</a> or <code>tuple</code></p>
`}}),so=new E({}),ao=new $({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/main/src/diffusers/models/unet_1d.py#L29"}}),io=new E({}),lo=new $({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.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 activitation 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/main/src/diffusers/models/unet_1d.py#L39"}}),mo=new $({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, sample_size, num_channels)</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/main/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/main/src/diffusers/models/unet_1d.py#L190",returnDescription:`
<p><a
  href="/docs/diffusers/main/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/main/en/api/models#diffusers.models.unet_1d.UNet1DOutput"
>UNet1DOutput</a> or <code>tuple</code></p>
`}}),po=new E({}),uo=new $({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/main/src/diffusers/models/unet_2d_condition.py#L43"}}),ho=new E({}),go=new $({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:": 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:": 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:": 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:"dual_cross_attention",val:": bool = False"},{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'"}],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>.`,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.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.",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>, <em>optional</em>, defaults to 1280) &#x2014; The dimension of the cross attention features.",name:"cross_attention_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>, or <code>&quot;identity&quot;</code>.`,name:"class_embed_type"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_condition.py#L53"}}),bo=new $({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:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = 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/main/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/main/src/diffusers/models/unet_2d_condition.py#L393",returnDescription:`
<p><a
  href="/docs/diffusers/main/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/main/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput"
>UNet2DConditionOutput</a> or <code>tuple</code></p>
`}}),vo=new $({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>, maxium amount of memory will be saved by running only one slice at a time. If a number is
provided, uses as many slices as <code>attention_head_dim // slice_size</code>. In this case, <code>attention_head_dim</code>
must be a multiple of <code>slice_size</code>.`,name:"slice_size"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_condition.py#L324"}}),xo=new $({props:{name:"set_attn_processor",anchor:"diffusers.UNet2DConditionModel.set_attn_processor",parameters:[{name:"processor",val:": typing.Union[diffusers.models.cross_attention.CrossAttnProcessor, diffusers.models.cross_attention.XFormersCrossAttnProcessor, diffusers.models.cross_attention.SlicedAttnProcessor, diffusers.models.cross_attention.CrossAttnAddedKVProcessor, diffusers.models.cross_attention.SlicedAttnAddedKVProcessor, typing.Dict[str, typing.Union[diffusers.models.cross_attention.CrossAttnProcessor, diffusers.models.cross_attention.XFormersCrossAttnProcessor, diffusers.models.cross_attention.SlicedAttnProcessor, diffusers.models.cross_attention.CrossAttnAddedKVProcessor, diffusers.models.cross_attention.SlicedAttnAddedKVProcessor]]]"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.set_attn_processor.`processor",description:`<strong>\`processor</strong> (<code>dict</code> of <code>AttnProcessor</code> or <code>AttnProcessor</code>) &#x2014;
The instantiated processor class or a dictionary of processor classes that will be set as the processor
of <strong>all</strong> <code>CrossAttention</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 trainablae attention processors. &#x2014;",name:"In"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_condition.py#L294"}}),yo=new E({}),$o=new $({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/main/src/diffusers/models/vae.py#L26"}}),wo=new E({}),Do=new $({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/main/src/diffusers/models/vq_model.py#L27"}}),ko=new E({}),Mo=new $({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"}],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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/vq_model.py#L39"}}),Eo=new $({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/main/src/diffusers/models/vq_model.py#L134"}}),No=new E({}),Uo=new $({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/main/src/diffusers/models/autoencoder_kl.py#L27"}}),Ao=new E({}),Fo=new $({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"}],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 <code>4</code>) &#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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L40"}}),Po=new $({props:{name:"disable_slicing",anchor:"diffusers.AutoencoderKL.disable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L132"}}),qo=new $({props:{name:"enable_slicing",anchor:"diffusers.AutoencoderKL.enable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L123"}}),Lo=new $({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/main/src/diffusers/models/autoencoder_kl.py#L151"}}),jo=new E({}),Io=new $({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/main/src/diffusers/models/transformer_2d.py#L41"}}),Bo=new $({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 continous, <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.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.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/main/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/main/src/diffusers/models/transformer_2d.py#L214",returnDescription:`
<p><a
  href="/docs/diffusers/main/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/main/en/api/models#diffusers.models.transformer_2d.Transformer2DModelOutput"
>Transformer2DModelOutput</a> or <code>tuple</code></p>
`}}),zo=new E({}),Ko=new $({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/main/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/main/src/diffusers/models/transformer_2d.py#L30"}}),Wo=new E({}),Xo=new $({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/main/src/diffusers/models/prior_transformer.py#L26"}}),Yo=new $({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/main/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/main/src/diffusers/models/prior_transformer.py#L107",returnDescription:`
<p><a
  href="/docs/diffusers/main/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/main/en/api/models#diffusers.models.prior_transformer.PriorTransformerOutput"
>PriorTransformerOutput</a> or <code>tuple</code></p>
`}}),Go=new E({}),Jo=new $({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/main/src/diffusers/models/prior_transformer.py#L16"}}),Zo=new E({}),en=new $({props:{name:"class diffusers.FlaxModelMixin",anchor:"diffusers.FlaxModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_flax_utils.py#L45"}}),tn=new $({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/main/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/main/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/main/src/diffusers/models/modeling_flax_utils.py#L195"}}),bt=new _d({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example",$$slots:{default:[g_]},$$scope:{ctx:I}}}),sn=new $({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/main/src/diffusers/models/modeling_flax_utils.py#L487"}}),an=new $({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/main/src/diffusers/models/modeling_flax_utils.py#L87"}}),xt=new _d({props:{anchor:"diffusers.FlaxModelMixin.to_bf16.example",$$slots:{default:[__]},$$scope:{ctx:I}}}),dn=new $({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/main/src/diffusers/models/modeling_flax_utils.py#L153"}}),yt=new _d({props:{anchor:"diffusers.FlaxModelMixin.to_fp16.example",$$slots:{default:[b_]},$$scope:{ctx:I}}}),ln=new $({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/main/src/diffusers/models/modeling_flax_utils.py#L126"}}),$t=new _d({props:{anchor:"diffusers.FlaxModelMixin.to_fp32.example",$$slots:{default:[v_]},$$scope:{ctx:I}}}),cn=new E({}),mn=new $({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/main/src/diffusers/models/unet_2d_condition_flax.py#L36"}}),pn=new $({props:{name:"replace",anchor:"diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/flax/struct.py#L109"}}),fn=new E({}),un=new $({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:"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 0x7f85a3c8dfa0>"},{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"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_condition_flax.py#L47"}}),$n=new E({}),wn=new $({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/main/src/diffusers/models/vae_flax.py#L33"}}),Dn=new $({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/flax/struct.py#L109"}}),kn=new E({}),Mn=new $({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/main/src/diffusers/models/vae_flax.py#L48"}}),Tn=new $({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/main/src/flax/struct.py#L109"}}),En=new E({}),Nn=new $({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:"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 0x7f85a3c8dfa0>"},{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 <em>32</em>) &#x2014;
Sample input size`,name:"sample_size"},{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/main/src/diffusers/models/vae_flax.py#L721"}}),{c(){x=n("meta"),M=d(),w=n("h1"),y=n("a"),k=n("span"),u(f.$$.fragment),D=d(),G=n("span"),xe=a("Models"),z=d(),S=n("p"),jn=a(`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`),us=n("em"),xd=a("\\theta(\\mathbf{x}"),yd=a(`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),hs=n("code"),$d=a("torch.nn.module"),wd=a(" with basic functionality for saving and loading models both locally and from the HuggingFace hub."),Na=d(),ye=n("h2"),Ye=n("a"),gs=n("span"),u(It.$$.fragment),Dd=d(),_s=n("span"),kd=a("ModelMixin"),Ua=d(),T=n("div"),u(Vt.$$.fragment),Md=d(),bs=n("p"),Td=a("Base class for all models."),Ed=d(),In=n("p"),Vn=n("a"),Nd=a("ModelMixin"),Ud=a(` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),Ad=d(),vs=n("ul"),de=n("li"),xs=n("strong"),Fd=a("config_name"),Cd=a(" ("),ys=n("code"),Pd=a("str"),Od=a(`) \u2014 A filename under which the model should be stored when calling
`),Bn=n("a"),qd=a("save_pretrained()"),Ld=a("."),jd=d(),le=n("div"),u(Bt.$$.fragment),Id=d(),$s=n("p"),Vd=a("Deactivates gradient checkpointing for the current model."),Bd=d(),ws=n("p"),zd=a(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Sd=d(),Ge=n("div"),u(zt.$$.fragment),Kd=d(),Ds=n("p"),Wd=a("Disable memory efficient attention as implemented in xformers."),Xd=d(),ce=n("div"),u(St.$$.fragment),Qd=d(),ks=n("p"),Hd=a("Activates gradient checkpointing for the current model."),Yd=d(),Ms=n("p"),Gd=a(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Rd=d(),R=n("div"),u(Kt.$$.fragment),Jd=d(),Ts=n("p"),Zd=a("Enable memory efficient attention as implemented in xformers."),el=d(),Es=n("p"),tl=a(`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.`),ol=d(),Ns=n("p"),nl=a(`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),sl=d(),A=n("div"),u(Wt.$$.fragment),rl=d(),Us=n("p"),al=a("Instantiate a pretrained pytorch model from a pre-trained model configuration."),il=d(),$e=n("p"),dl=a("The model is set in evaluation mode by default using "),As=n("code"),ll=a("model.eval()"),cl=a(` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Fs=n("code"),ml=a("model.train()"),pl=a("."),fl=d(),Xt=n("p"),ul=a("The warning "),Cs=n("em"),hl=a("Weights from XXX not initialized from pretrained model"),gl=a(` 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.`),_l=d(),Qt=n("p"),bl=a("The warning "),Ps=n("em"),vl=a("Weights from XXX not used in YYY"),xl=a(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),yl=d(),u(Re.$$.fragment),$l=d(),u(Je.$$.fragment),wl=d(),Ze=n("div"),u(Ht.$$.fragment),Dl=d(),Os=n("p"),kl=a("Get number of (optionally, trainable or non-embeddings) parameters in the module."),Ml=d(),et=n("div"),u(Yt.$$.fragment),Tl=d(),Gt=n("p"),El=a(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),qs=n("code"),Nl=a("[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.ModelMixin.from_pretrained)"),Ul=a(" class method."),Aa=d(),we=n("h2"),tt=n("a"),Ls=n("span"),u(Rt.$$.fragment),Al=d(),js=n("span"),Fl=a("UNet2DOutput"),Fa=d(),Jt=n("div"),u(Zt.$$.fragment),Ca=d(),De=n("h2"),ot=n("a"),Is=n("span"),u(eo.$$.fragment),Cl=d(),Vs=n("span"),Pl=a("UNet2DModel"),Pa=d(),K=n("div"),u(to.$$.fragment),Ol=d(),Bs=n("p"),ql=a("UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Ll=d(),oo=n("p"),jl=a("This model inherits from "),zn=n("a"),Il=a("ModelMixin"),Vl=a(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Bl=d(),Sn=n("div"),u(no.$$.fragment),Oa=d(),ke=n("h2"),nt=n("a"),zs=n("span"),u(so.$$.fragment),zl=d(),Ss=n("span"),Sl=a("UNet1DOutput"),qa=d(),ro=n("div"),u(ao.$$.fragment),La=d(),Me=n("h2"),st=n("a"),Ks=n("span"),u(io.$$.fragment),Kl=d(),Ws=n("span"),Wl=a("UNet1DModel"),ja=d(),W=n("div"),u(lo.$$.fragment),Xl=d(),Xs=n("p"),Ql=a("UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Hl=d(),co=n("p"),Yl=a("This model inherits from "),Kn=n("a"),Gl=a("ModelMixin"),Rl=a(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Jl=d(),Wn=n("div"),u(mo.$$.fragment),Ia=d(),Te=n("h2"),rt=n("a"),Qs=n("span"),u(po.$$.fragment),Zl=d(),Hs=n("span"),ec=a("UNet2DConditionOutput"),Va=d(),fo=n("div"),u(uo.$$.fragment),Ba=d(),Ee=n("h2"),at=n("a"),Ys=n("span"),u(ho.$$.fragment),tc=d(),Gs=n("span"),oc=a("UNet2DConditionModel"),za=d(),F=n("div"),u(go.$$.fragment),nc=d(),Rs=n("p"),sc=a(`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),rc=d(),_o=n("p"),ac=a("This model inherits from "),Xn=n("a"),ic=a("ModelMixin"),dc=a(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),lc=d(),Qn=n("div"),u(bo.$$.fragment),cc=d(),me=n("div"),u(vo.$$.fragment),mc=d(),Js=n("p"),pc=a("Enable sliced attention computation."),fc=d(),Zs=n("p"),uc=a(`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.`),hc=d(),Hn=n("div"),u(xo.$$.fragment),Sa=d(),Ne=n("h2"),it=n("a"),er=n("span"),u(yo.$$.fragment),gc=d(),tr=n("span"),_c=a("DecoderOutput"),Ka=d(),Ue=n("div"),u($o.$$.fragment),bc=d(),or=n("p"),vc=a("Output of decoding method."),Wa=d(),Ae=n("h2"),dt=n("a"),nr=n("span"),u(wo.$$.fragment),xc=d(),sr=n("span"),yc=a("VQEncoderOutput"),Xa=d(),Fe=n("div"),u(Do.$$.fragment),$c=d(),rr=n("p"),wc=a("Output of VQModel encoding method."),Qa=d(),Ce=n("h2"),lt=n("a"),ar=n("span"),u(ko.$$.fragment),Dc=d(),ir=n("span"),kc=a("VQModel"),Ha=d(),X=n("div"),u(Mo.$$.fragment),Mc=d(),dr=n("p"),Tc=a(`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),Ec=d(),To=n("p"),Nc=a("This model inherits from "),Yn=n("a"),Uc=a("ModelMixin"),Ac=a(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Fc=d(),Gn=n("div"),u(Eo.$$.fragment),Ya=d(),Pe=n("h2"),ct=n("a"),lr=n("span"),u(No.$$.fragment),Cc=d(),cr=n("span"),Pc=a("AutoencoderKLOutput"),Ga=d(),Oe=n("div"),u(Uo.$$.fragment),Oc=d(),mr=n("p"),qc=a("Output of AutoencoderKL encoding method."),Ra=d(),qe=n("h2"),mt=n("a"),pr=n("span"),u(Ao.$$.fragment),Lc=d(),fr=n("span"),jc=a("AutoencoderKL"),Ja=d(),C=n("div"),u(Fo.$$.fragment),Ic=d(),ur=n("p"),Vc=a(`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),Bc=d(),Co=n("p"),zc=a("This model inherits from "),Rn=n("a"),Sc=a("ModelMixin"),Kc=a(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Wc=d(),pt=n("div"),u(Po.$$.fragment),Xc=d(),Oo=n("p"),Qc=a("Disable sliced VAE decoding. If "),hr=n("code"),Hc=a("enable_slicing"),Yc=a(` was previously invoked, this method will go back to computing
decoding in one step.`),Gc=d(),pe=n("div"),u(qo.$$.fragment),Rc=d(),gr=n("p"),Jc=a("Enable sliced VAE decoding."),Zc=d(),_r=n("p"),em=a(`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.`),tm=d(),Jn=n("div"),u(Lo.$$.fragment),Za=d(),Le=n("h2"),ft=n("a"),br=n("span"),u(jo.$$.fragment),om=d(),vr=n("span"),nm=a("Transformer2DModel"),ei=d(),P=n("div"),u(Io.$$.fragment),sm=d(),xr=n("p"),rm=a(`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),am=d(),yr=n("p"),im=a(`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.`),dm=d(),Vo=n("p"),lm=a(`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),$r=n("code"),cm=a("ImagePositionalEmbeddings"),mm=a(`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),pm=d(),wr=n("p"),fm=a(`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.`),um=d(),Zn=n("div"),u(Bo.$$.fragment),ti=d(),je=n("h2"),ut=n("a"),Dr=n("span"),u(zo.$$.fragment),hm=d(),kr=n("span"),gm=a("Transformer2DModelOutput"),oi=d(),So=n("div"),u(Ko.$$.fragment),ni=d(),Ie=n("h2"),ht=n("a"),Mr=n("span"),u(Wo.$$.fragment),_m=d(),Tr=n("span"),bm=a("PriorTransformer"),si=d(),L=n("div"),u(Xo.$$.fragment),vm=d(),Er=n("p"),xm=a(`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.`),ym=d(),Qo=n("p"),$m=a("This model inherits from "),es=n("a"),wm=a("ModelMixin"),Dm=a(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),km=d(),ts=n("p"),Mm=a("For more details, see the original paper: "),Ho=n("a"),Tm=a("https://arxiv.org/abs/2204.06125"),Em=d(),os=n("div"),u(Yo.$$.fragment),ri=d(),Ve=n("h2"),gt=n("a"),Nr=n("span"),u(Go.$$.fragment),Nm=d(),Ur=n("span"),Um=a("PriorTransformerOutput"),ai=d(),Ro=n("div"),u(Jo.$$.fragment),ii=d(),Be=n("h2"),_t=n("a"),Ar=n("span"),u(Zo.$$.fragment),Am=d(),Fr=n("span"),Fm=a("FlaxModelMixin"),di=d(),U=n("div"),u(en.$$.fragment),Cm=d(),Cr=n("p"),Pm=a("Base class for all flax models."),Om=d(),ns=n("p"),ss=n("a"),qm=a("FlaxModelMixin"),Lm=a(` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),jm=d(),V=n("div"),u(tn.$$.fragment),Im=d(),Pr=n("p"),Vm=a("Instantiate a pretrained flax model from a pre-trained model configuration."),Bm=d(),on=n("p"),zm=a("The warning "),Or=n("em"),Sm=a("Weights from XXX not initialized from pretrained model"),Km=a(` 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.`),Wm=d(),nn=n("p"),Xm=a("The warning "),qr=n("em"),Qm=a("Weights from XXX not used in YYY"),Hm=a(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Ym=d(),u(bt.$$.fragment),Gm=d(),vt=n("div"),u(sn.$$.fragment),Rm=d(),rn=n("p"),Jm=a(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Lr=n("code"),Zm=a("[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.FlaxModelMixin.from_pretrained)"),ep=a(" class method"),tp=d(),J=n("div"),u(an.$$.fragment),op=d(),Q=n("p"),np=a("Cast the floating-point "),jr=n("code"),sp=a("params"),rp=a(" to "),Ir=n("code"),ap=a("jax.numpy.bfloat16"),ip=a(". This returns a new "),Vr=n("code"),dp=a("params"),lp=a(` tree and does not cast
the `),Br=n("code"),cp=a("params"),mp=a(" in place."),pp=d(),zr=n("p"),fp=a(`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.`),up=d(),u(xt.$$.fragment),hp=d(),Z=n("div"),u(dn.$$.fragment),gp=d(),H=n("p"),_p=a("Cast the floating-point "),Sr=n("code"),bp=a("params"),vp=a(" to "),Kr=n("code"),xp=a("jax.numpy.float16"),yp=a(". This returns a new "),Wr=n("code"),$p=a("params"),wp=a(` tree and does not cast the
`),Xr=n("code"),Dp=a("params"),kp=a(" in place."),Mp=d(),Qr=n("p"),Tp=a(`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.`),Ep=d(),u(yt.$$.fragment),Np=d(),fe=n("div"),u(ln.$$.fragment),Up=d(),Y=n("p"),Ap=a("Cast the floating-point "),Hr=n("code"),Fp=a("params"),Cp=a(" to "),Yr=n("code"),Pp=a("jax.numpy.float32"),Op=a(`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Gr=n("code"),qp=a("params"),Lp=a(" tree and does not cast the "),Rr=n("code"),jp=a("params"),Ip=a(" in place."),Vp=d(),u($t.$$.fragment),li=d(),ze=n("h2"),wt=n("a"),Jr=n("span"),u(cn.$$.fragment),Bp=d(),Zr=n("span"),zp=a("FlaxUNet2DConditionOutput"),ci=d(),Se=n("div"),u(mn.$$.fragment),Sp=d(),Dt=n("div"),u(pn.$$.fragment),Kp=d(),ea=n("p"),Wp=a("\u201CReturns a new object replacing the specified fields with new values."),mi=d(),Ke=n("h2"),kt=n("a"),ta=n("span"),u(fn.$$.fragment),Xp=d(),oa=n("span"),Qp=a("FlaxUNet2DConditionModel"),pi=d(),O=n("div"),u(un.$$.fragment),Hp=d(),na=n("p"),Yp=a(`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),Gp=d(),hn=n("p"),Rp=a("This model inherits from "),rs=n("a"),Jp=a("FlaxModelMixin"),Zp=a(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),ef=d(),gn=n("p"),tf=a("Also, this model is a Flax Linen "),_n=n("a"),of=a("flax.linen.Module"),nf=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),sf=d(),sa=n("p"),rf=a("Finally, this model supports inherent JAX features such as:"),af=d(),se=n("ul"),ra=n("li"),bn=n("a"),df=a("Just-In-Time (JIT) compilation"),lf=d(),aa=n("li"),vn=n("a"),cf=a("Automatic Differentiation"),mf=d(),ia=n("li"),xn=n("a"),pf=a("Vectorization"),ff=d(),da=n("li"),yn=n("a"),uf=a("Parallelization"),fi=d(),We=n("h2"),Mt=n("a"),la=n("span"),u($n.$$.fragment),hf=d(),ca=n("span"),gf=a("FlaxDecoderOutput"),ui=d(),re=n("div"),u(wn.$$.fragment),_f=d(),ma=n("p"),bf=a("Output of decoding method."),vf=d(),Tt=n("div"),u(Dn.$$.fragment),xf=d(),pa=n("p"),yf=a("\u201CReturns a new object replacing the specified fields with new values."),hi=d(),Xe=n("h2"),Et=n("a"),fa=n("span"),u(kn.$$.fragment),$f=d(),ua=n("span"),wf=a("FlaxAutoencoderKLOutput"),gi=d(),ae=n("div"),u(Mn.$$.fragment),Df=d(),ha=n("p"),kf=a("Output of AutoencoderKL encoding method."),Mf=d(),Nt=n("div"),u(Tn.$$.fragment),Tf=d(),ga=n("p"),Ef=a("\u201CReturns a new object replacing the specified fields with new values."),_i=d(),Qe=n("h2"),Ut=n("a"),_a=n("span"),u(En.$$.fragment),Nf=d(),ba=n("span"),Uf=a("FlaxAutoencoderKL"),bi=d(),j=n("div"),u(Nn.$$.fragment),Af=d(),va=n("p"),Ff=a(`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),Cf=d(),Un=n("p"),Pf=a("This model is a Flax Linen "),An=n("a"),Of=a("flax.linen.Module"),qf=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Lf=d(),xa=n("p"),jf=a("Finally, this model supports inherent JAX features such as:"),If=d(),ie=n("ul"),ya=n("li"),Fn=n("a"),Vf=a("Just-In-Time (JIT) compilation"),Bf=d(),$a=n("li"),Cn=n("a"),zf=a("Automatic Differentiation"),Sf=d(),wa=n("li"),Pn=n("a"),Kf=a("Vectorization"),Wf=d(),Da=n("li"),On=n("a"),Xf=a("Parallelization"),this.h()},l(t){const m=p_('[data-svelte="svelte-1phssyn"]',document.head);x=s(m,"META",{name:!0,content:!0}),m.forEach(o),M=l(t),w=s(t,"H1",{class:!0});var qn=r(w);y=s(qn,"A",{id:!0,class:!0,href:!0});var ka=r(y);k=s(ka,"SPAN",{});var Ma=r(k);h(f.$$.fragment,Ma),Ma.forEach(o),ka.forEach(o),D=l(qn),G=s(qn,"SPAN",{});var Ta=r(G);xe=i(Ta,"Models"),Ta.forEach(o),qn.forEach(o),z=l(t),S=s(t,"P",{});var He=r(S);jn=i(He,`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`),us=s(He,"EM",{});var Ea=r(us);xd=i(Ea,"\\theta(\\mathbf{x}"),Ea.forEach(o),yd=i(He,`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),hs=s(He,"CODE",{});var Gf=r(hs);$d=i(Gf,"torch.nn.module"),Gf.forEach(o),wd=i(He," with basic functionality for saving and loading models both locally and from the HuggingFace hub."),He.forEach(o),Na=l(t),ye=s(t,"H2",{class:!0});var xi=r(ye);Ye=s(xi,"A",{id:!0,class:!0,href:!0});var Rf=r(Ye);gs=s(Rf,"SPAN",{});var Jf=r(gs);h(It.$$.fragment,Jf),Jf.forEach(o),Rf.forEach(o),Dd=l(xi),_s=s(xi,"SPAN",{});var Zf=r(_s);kd=i(Zf,"ModelMixin"),Zf.forEach(o),xi.forEach(o),Ua=l(t),T=s(t,"DIV",{class:!0});var N=r(T);h(Vt.$$.fragment,N),Md=l(N),bs=s(N,"P",{});var eu=r(bs);Td=i(eu,"Base class for all models."),eu.forEach(o),Ed=l(N),In=s(N,"P",{});var Qf=r(In);Vn=s(Qf,"A",{href:!0});var tu=r(Vn);Nd=i(tu,"ModelMixin"),tu.forEach(o),Ud=i(Qf,` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),Qf.forEach(o),Ad=l(N),vs=s(N,"UL",{});var ou=r(vs);de=s(ou,"LI",{});var Ln=r(de);xs=s(Ln,"STRONG",{});var nu=r(xs);Fd=i(nu,"config_name"),nu.forEach(o),Cd=i(Ln," ("),ys=s(Ln,"CODE",{});var su=r(ys);Pd=i(su,"str"),su.forEach(o),Od=i(Ln,`) \u2014 A filename under which the model should be stored when calling
`),Bn=s(Ln,"A",{href:!0});var ru=r(Bn);qd=i(ru,"save_pretrained()"),ru.forEach(o),Ld=i(Ln,"."),Ln.forEach(o),ou.forEach(o),jd=l(N),le=s(N,"DIV",{class:!0});var as=r(le);h(Bt.$$.fragment,as),Id=l(as),$s=s(as,"P",{});var au=r($s);Vd=i(au,"Deactivates gradient checkpointing for the current model."),au.forEach(o),Bd=l(as),ws=s(as,"P",{});var iu=r(ws);zd=i(iu,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),iu.forEach(o),as.forEach(o),Sd=l(N),Ge=s(N,"DIV",{class:!0});var yi=r(Ge);h(zt.$$.fragment,yi),Kd=l(yi),Ds=s(yi,"P",{});var du=r(Ds);Wd=i(du,"Disable memory efficient attention as implemented in xformers."),du.forEach(o),yi.forEach(o),Xd=l(N),ce=s(N,"DIV",{class:!0});var is=r(ce);h(St.$$.fragment,is),Qd=l(is),ks=s(is,"P",{});var lu=r(ks);Hd=i(lu,"Activates gradient checkpointing for the current model."),lu.forEach(o),Yd=l(is),Ms=s(is,"P",{});var cu=r(Ms);Gd=i(cu,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),cu.forEach(o),is.forEach(o),Rd=l(N),R=s(N,"DIV",{class:!0});var At=r(R);h(Kt.$$.fragment,At),Jd=l(At),Ts=s(At,"P",{});var mu=r(Ts);Zd=i(mu,"Enable memory efficient attention as implemented in xformers."),mu.forEach(o),el=l(At),Es=s(At,"P",{});var pu=r(Es);tl=i(pu,`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.`),pu.forEach(o),ol=l(At),Ns=s(At,"P",{});var fu=r(Ns);nl=i(fu,`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),fu.forEach(o),At.forEach(o),sl=l(N),A=s(N,"DIV",{class:!0});var B=r(A);h(Wt.$$.fragment,B),rl=l(B),Us=s(B,"P",{});var uu=r(Us);al=i(uu,"Instantiate a pretrained pytorch model from a pre-trained model configuration."),uu.forEach(o),il=l(B),$e=s(B,"P",{});var ds=r($e);dl=i(ds,"The model is set in evaluation mode by default using "),As=s(ds,"CODE",{});var hu=r(As);ll=i(hu,"model.eval()"),hu.forEach(o),cl=i(ds,` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Fs=s(ds,"CODE",{});var gu=r(Fs);ml=i(gu,"model.train()"),gu.forEach(o),pl=i(ds,"."),ds.forEach(o),fl=l(B),Xt=s(B,"P",{});var $i=r(Xt);ul=i($i,"The warning "),Cs=s($i,"EM",{});var _u=r(Cs);hl=i(_u,"Weights from XXX not initialized from pretrained model"),_u.forEach(o),gl=i($i,` 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.`),$i.forEach(o),_l=l(B),Qt=s(B,"P",{});var wi=r(Qt);bl=i(wi,"The warning "),Ps=s(wi,"EM",{});var bu=r(Ps);vl=i(bu,"Weights from XXX not used in YYY"),bu.forEach(o),xl=i(wi,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),wi.forEach(o),yl=l(B),h(Re.$$.fragment,B),$l=l(B),h(Je.$$.fragment,B),B.forEach(o),wl=l(N),Ze=s(N,"DIV",{class:!0});var Di=r(Ze);h(Ht.$$.fragment,Di),Dl=l(Di),Os=s(Di,"P",{});var vu=r(Os);kl=i(vu,"Get number of (optionally, trainable or non-embeddings) parameters in the module."),vu.forEach(o),Di.forEach(o),Ml=l(N),et=s(N,"DIV",{class:!0});var ki=r(et);h(Yt.$$.fragment,ki),Tl=l(ki),Gt=s(ki,"P",{});var Mi=r(Gt);El=i(Mi,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),qs=s(Mi,"CODE",{});var xu=r(qs);Nl=i(xu,"[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.ModelMixin.from_pretrained)"),xu.forEach(o),Ul=i(Mi," class method."),Mi.forEach(o),ki.forEach(o),N.forEach(o),Aa=l(t),we=s(t,"H2",{class:!0});var Ti=r(we);tt=s(Ti,"A",{id:!0,class:!0,href:!0});var yu=r(tt);Ls=s(yu,"SPAN",{});var $u=r(Ls);h(Rt.$$.fragment,$u),$u.forEach(o),yu.forEach(o),Al=l(Ti),js=s(Ti,"SPAN",{});var wu=r(js);Fl=i(wu,"UNet2DOutput"),wu.forEach(o),Ti.forEach(o),Fa=l(t),Jt=s(t,"DIV",{class:!0});var Du=r(Jt);h(Zt.$$.fragment,Du),Du.forEach(o),Ca=l(t),De=s(t,"H2",{class:!0});var Ei=r(De);ot=s(Ei,"A",{id:!0,class:!0,href:!0});var ku=r(ot);Is=s(ku,"SPAN",{});var Mu=r(Is);h(eo.$$.fragment,Mu),Mu.forEach(o),ku.forEach(o),Cl=l(Ei),Vs=s(Ei,"SPAN",{});var Tu=r(Vs);Pl=i(Tu,"UNet2DModel"),Tu.forEach(o),Ei.forEach(o),Pa=l(t),K=s(t,"DIV",{class:!0});var Ft=r(K);h(to.$$.fragment,Ft),Ol=l(Ft),Bs=s(Ft,"P",{});var Eu=r(Bs);ql=i(Eu,"UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Eu.forEach(o),Ll=l(Ft),oo=s(Ft,"P",{});var Ni=r(oo);jl=i(Ni,"This model inherits from "),zn=s(Ni,"A",{href:!0});var Nu=r(zn);Il=i(Nu,"ModelMixin"),Nu.forEach(o),Vl=i(Ni,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Ni.forEach(o),Bl=l(Ft),Sn=s(Ft,"DIV",{class:!0});var Uu=r(Sn);h(no.$$.fragment,Uu),Uu.forEach(o),Ft.forEach(o),Oa=l(t),ke=s(t,"H2",{class:!0});var Ui=r(ke);nt=s(Ui,"A",{id:!0,class:!0,href:!0});var Au=r(nt);zs=s(Au,"SPAN",{});var Fu=r(zs);h(so.$$.fragment,Fu),Fu.forEach(o),Au.forEach(o),zl=l(Ui),Ss=s(Ui,"SPAN",{});var Cu=r(Ss);Sl=i(Cu,"UNet1DOutput"),Cu.forEach(o),Ui.forEach(o),qa=l(t),ro=s(t,"DIV",{class:!0});var Pu=r(ro);h(ao.$$.fragment,Pu),Pu.forEach(o),La=l(t),Me=s(t,"H2",{class:!0});var Ai=r(Me);st=s(Ai,"A",{id:!0,class:!0,href:!0});var Ou=r(st);Ks=s(Ou,"SPAN",{});var qu=r(Ks);h(io.$$.fragment,qu),qu.forEach(o),Ou.forEach(o),Kl=l(Ai),Ws=s(Ai,"SPAN",{});var Lu=r(Ws);Wl=i(Lu,"UNet1DModel"),Lu.forEach(o),Ai.forEach(o),ja=l(t),W=s(t,"DIV",{class:!0});var Ct=r(W);h(lo.$$.fragment,Ct),Xl=l(Ct),Xs=s(Ct,"P",{});var ju=r(Xs);Ql=i(ju,"UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),ju.forEach(o),Hl=l(Ct),co=s(Ct,"P",{});var Fi=r(co);Yl=i(Fi,"This model inherits from "),Kn=s(Fi,"A",{href:!0});var Iu=r(Kn);Gl=i(Iu,"ModelMixin"),Iu.forEach(o),Rl=i(Fi,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Fi.forEach(o),Jl=l(Ct),Wn=s(Ct,"DIV",{class:!0});var Vu=r(Wn);h(mo.$$.fragment,Vu),Vu.forEach(o),Ct.forEach(o),Ia=l(t),Te=s(t,"H2",{class:!0});var Ci=r(Te);rt=s(Ci,"A",{id:!0,class:!0,href:!0});var Bu=r(rt);Qs=s(Bu,"SPAN",{});var zu=r(Qs);h(po.$$.fragment,zu),zu.forEach(o),Bu.forEach(o),Zl=l(Ci),Hs=s(Ci,"SPAN",{});var Su=r(Hs);ec=i(Su,"UNet2DConditionOutput"),Su.forEach(o),Ci.forEach(o),Va=l(t),fo=s(t,"DIV",{class:!0});var Ku=r(fo);h(uo.$$.fragment,Ku),Ku.forEach(o),Ba=l(t),Ee=s(t,"H2",{class:!0});var Pi=r(Ee);at=s(Pi,"A",{id:!0,class:!0,href:!0});var Wu=r(at);Ys=s(Wu,"SPAN",{});var Xu=r(Ys);h(ho.$$.fragment,Xu),Xu.forEach(o),Wu.forEach(o),tc=l(Pi),Gs=s(Pi,"SPAN",{});var Qu=r(Gs);oc=i(Qu,"UNet2DConditionModel"),Qu.forEach(o),Pi.forEach(o),za=l(t),F=s(t,"DIV",{class:!0});var ee=r(F);h(go.$$.fragment,ee),nc=l(ee),Rs=s(ee,"P",{});var Hu=r(Rs);sc=i(Hu,`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Hu.forEach(o),rc=l(ee),_o=s(ee,"P",{});var Oi=r(_o);ac=i(Oi,"This model inherits from "),Xn=s(Oi,"A",{href:!0});var Yu=r(Xn);ic=i(Yu,"ModelMixin"),Yu.forEach(o),dc=i(Oi,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Oi.forEach(o),lc=l(ee),Qn=s(ee,"DIV",{class:!0});var Gu=r(Qn);h(bo.$$.fragment,Gu),Gu.forEach(o),cc=l(ee),me=s(ee,"DIV",{class:!0});var ls=r(me);h(vo.$$.fragment,ls),mc=l(ls),Js=s(ls,"P",{});var Ru=r(Js);pc=i(Ru,"Enable sliced attention computation."),Ru.forEach(o),fc=l(ls),Zs=s(ls,"P",{});var Ju=r(Zs);uc=i(Ju,`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.`),Ju.forEach(o),ls.forEach(o),hc=l(ee),Hn=s(ee,"DIV",{class:!0});var Zu=r(Hn);h(xo.$$.fragment,Zu),Zu.forEach(o),ee.forEach(o),Sa=l(t),Ne=s(t,"H2",{class:!0});var qi=r(Ne);it=s(qi,"A",{id:!0,class:!0,href:!0});var eh=r(it);er=s(eh,"SPAN",{});var th=r(er);h(yo.$$.fragment,th),th.forEach(o),eh.forEach(o),gc=l(qi),tr=s(qi,"SPAN",{});var oh=r(tr);_c=i(oh,"DecoderOutput"),oh.forEach(o),qi.forEach(o),Ka=l(t),Ue=s(t,"DIV",{class:!0});var Li=r(Ue);h($o.$$.fragment,Li),bc=l(Li),or=s(Li,"P",{});var nh=r(or);vc=i(nh,"Output of decoding method."),nh.forEach(o),Li.forEach(o),Wa=l(t),Ae=s(t,"H2",{class:!0});var ji=r(Ae);dt=s(ji,"A",{id:!0,class:!0,href:!0});var sh=r(dt);nr=s(sh,"SPAN",{});var rh=r(nr);h(wo.$$.fragment,rh),rh.forEach(o),sh.forEach(o),xc=l(ji),sr=s(ji,"SPAN",{});var ah=r(sr);yc=i(ah,"VQEncoderOutput"),ah.forEach(o),ji.forEach(o),Xa=l(t),Fe=s(t,"DIV",{class:!0});var Ii=r(Fe);h(Do.$$.fragment,Ii),$c=l(Ii),rr=s(Ii,"P",{});var ih=r(rr);wc=i(ih,"Output of VQModel encoding method."),ih.forEach(o),Ii.forEach(o),Qa=l(t),Ce=s(t,"H2",{class:!0});var Vi=r(Ce);lt=s(Vi,"A",{id:!0,class:!0,href:!0});var dh=r(lt);ar=s(dh,"SPAN",{});var lh=r(ar);h(ko.$$.fragment,lh),lh.forEach(o),dh.forEach(o),Dc=l(Vi),ir=s(Vi,"SPAN",{});var ch=r(ir);kc=i(ch,"VQModel"),ch.forEach(o),Vi.forEach(o),Ha=l(t),X=s(t,"DIV",{class:!0});var Pt=r(X);h(Mo.$$.fragment,Pt),Mc=l(Pt),dr=s(Pt,"P",{});var mh=r(dr);Tc=i(mh,`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),mh.forEach(o),Ec=l(Pt),To=s(Pt,"P",{});var Bi=r(To);Nc=i(Bi,"This model inherits from "),Yn=s(Bi,"A",{href:!0});var ph=r(Yn);Uc=i(ph,"ModelMixin"),ph.forEach(o),Ac=i(Bi,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Bi.forEach(o),Fc=l(Pt),Gn=s(Pt,"DIV",{class:!0});var fh=r(Gn);h(Eo.$$.fragment,fh),fh.forEach(o),Pt.forEach(o),Ya=l(t),Pe=s(t,"H2",{class:!0});var zi=r(Pe);ct=s(zi,"A",{id:!0,class:!0,href:!0});var uh=r(ct);lr=s(uh,"SPAN",{});var hh=r(lr);h(No.$$.fragment,hh),hh.forEach(o),uh.forEach(o),Cc=l(zi),cr=s(zi,"SPAN",{});var gh=r(cr);Pc=i(gh,"AutoencoderKLOutput"),gh.forEach(o),zi.forEach(o),Ga=l(t),Oe=s(t,"DIV",{class:!0});var Si=r(Oe);h(Uo.$$.fragment,Si),Oc=l(Si),mr=s(Si,"P",{});var _h=r(mr);qc=i(_h,"Output of AutoencoderKL encoding method."),_h.forEach(o),Si.forEach(o),Ra=l(t),qe=s(t,"H2",{class:!0});var Ki=r(qe);mt=s(Ki,"A",{id:!0,class:!0,href:!0});var bh=r(mt);pr=s(bh,"SPAN",{});var vh=r(pr);h(Ao.$$.fragment,vh),vh.forEach(o),bh.forEach(o),Lc=l(Ki),fr=s(Ki,"SPAN",{});var xh=r(fr);jc=i(xh,"AutoencoderKL"),xh.forEach(o),Ki.forEach(o),Ja=l(t),C=s(t,"DIV",{class:!0});var te=r(C);h(Fo.$$.fragment,te),Ic=l(te),ur=s(te,"P",{});var yh=r(ur);Vc=i(yh,`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),yh.forEach(o),Bc=l(te),Co=s(te,"P",{});var Wi=r(Co);zc=i(Wi,"This model inherits from "),Rn=s(Wi,"A",{href:!0});var $h=r(Rn);Sc=i($h,"ModelMixin"),$h.forEach(o),Kc=i(Wi,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Wi.forEach(o),Wc=l(te),pt=s(te,"DIV",{class:!0});var Xi=r(pt);h(Po.$$.fragment,Xi),Xc=l(Xi),Oo=s(Xi,"P",{});var Qi=r(Oo);Qc=i(Qi,"Disable sliced VAE decoding. If "),hr=s(Qi,"CODE",{});var wh=r(hr);Hc=i(wh,"enable_slicing"),wh.forEach(o),Yc=i(Qi,` was previously invoked, this method will go back to computing
decoding in one step.`),Qi.forEach(o),Xi.forEach(o),Gc=l(te),pe=s(te,"DIV",{class:!0});var cs=r(pe);h(qo.$$.fragment,cs),Rc=l(cs),gr=s(cs,"P",{});var Dh=r(gr);Jc=i(Dh,"Enable sliced VAE decoding."),Dh.forEach(o),Zc=l(cs),_r=s(cs,"P",{});var kh=r(_r);em=i(kh,`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.`),kh.forEach(o),cs.forEach(o),tm=l(te),Jn=s(te,"DIV",{class:!0});var Mh=r(Jn);h(Lo.$$.fragment,Mh),Mh.forEach(o),te.forEach(o),Za=l(t),Le=s(t,"H2",{class:!0});var Hi=r(Le);ft=s(Hi,"A",{id:!0,class:!0,href:!0});var Th=r(ft);br=s(Th,"SPAN",{});var Eh=r(br);h(jo.$$.fragment,Eh),Eh.forEach(o),Th.forEach(o),om=l(Hi),vr=s(Hi,"SPAN",{});var Nh=r(vr);nm=i(Nh,"Transformer2DModel"),Nh.forEach(o),Hi.forEach(o),ei=l(t),P=s(t,"DIV",{class:!0});var oe=r(P);h(Io.$$.fragment,oe),sm=l(oe),xr=s(oe,"P",{});var Uh=r(xr);rm=i(Uh,`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),Uh.forEach(o),am=l(oe),yr=s(oe,"P",{});var Ah=r(yr);im=i(Ah,`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.`),Ah.forEach(o),dm=l(oe),Vo=s(oe,"P",{});var Yi=r(Vo);lm=i(Yi,`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),$r=s(Yi,"CODE",{});var Fh=r($r);cm=i(Fh,"ImagePositionalEmbeddings"),Fh.forEach(o),mm=i(Yi,`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),Yi.forEach(o),pm=l(oe),wr=s(oe,"P",{});var Ch=r(wr);fm=i(Ch,`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.`),Ch.forEach(o),um=l(oe),Zn=s(oe,"DIV",{class:!0});var Ph=r(Zn);h(Bo.$$.fragment,Ph),Ph.forEach(o),oe.forEach(o),ti=l(t),je=s(t,"H2",{class:!0});var Gi=r(je);ut=s(Gi,"A",{id:!0,class:!0,href:!0});var Oh=r(ut);Dr=s(Oh,"SPAN",{});var qh=r(Dr);h(zo.$$.fragment,qh),qh.forEach(o),Oh.forEach(o),hm=l(Gi),kr=s(Gi,"SPAN",{});var Lh=r(kr);gm=i(Lh,"Transformer2DModelOutput"),Lh.forEach(o),Gi.forEach(o),oi=l(t),So=s(t,"DIV",{class:!0});var jh=r(So);h(Ko.$$.fragment,jh),jh.forEach(o),ni=l(t),Ie=s(t,"H2",{class:!0});var Ri=r(Ie);ht=s(Ri,"A",{id:!0,class:!0,href:!0});var Ih=r(ht);Mr=s(Ih,"SPAN",{});var Vh=r(Mr);h(Wo.$$.fragment,Vh),Vh.forEach(o),Ih.forEach(o),_m=l(Ri),Tr=s(Ri,"SPAN",{});var Bh=r(Tr);bm=i(Bh,"PriorTransformer"),Bh.forEach(o),Ri.forEach(o),si=l(t),L=s(t,"DIV",{class:!0});var ue=r(L);h(Xo.$$.fragment,ue),vm=l(ue),Er=s(ue,"P",{});var zh=r(Er);xm=i(zh,`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.`),zh.forEach(o),ym=l(ue),Qo=s(ue,"P",{});var Ji=r(Qo);$m=i(Ji,"This model inherits from "),es=s(Ji,"A",{href:!0});var Sh=r(es);wm=i(Sh,"ModelMixin"),Sh.forEach(o),Dm=i(Ji,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Ji.forEach(o),km=l(ue),ts=s(ue,"P",{});var Hf=r(ts);Mm=i(Hf,"For more details, see the original paper: "),Ho=s(Hf,"A",{href:!0,rel:!0});var Kh=r(Ho);Tm=i(Kh,"https://arxiv.org/abs/2204.06125"),Kh.forEach(o),Hf.forEach(o),Em=l(ue),os=s(ue,"DIV",{class:!0});var Wh=r(os);h(Yo.$$.fragment,Wh),Wh.forEach(o),ue.forEach(o),ri=l(t),Ve=s(t,"H2",{class:!0});var Zi=r(Ve);gt=s(Zi,"A",{id:!0,class:!0,href:!0});var Xh=r(gt);Nr=s(Xh,"SPAN",{});var Qh=r(Nr);h(Go.$$.fragment,Qh),Qh.forEach(o),Xh.forEach(o),Nm=l(Zi),Ur=s(Zi,"SPAN",{});var Hh=r(Ur);Um=i(Hh,"PriorTransformerOutput"),Hh.forEach(o),Zi.forEach(o),ai=l(t),Ro=s(t,"DIV",{class:!0});var Yh=r(Ro);h(Jo.$$.fragment,Yh),Yh.forEach(o),ii=l(t),Be=s(t,"H2",{class:!0});var ed=r(Be);_t=s(ed,"A",{id:!0,class:!0,href:!0});var Gh=r(_t);Ar=s(Gh,"SPAN",{});var Rh=r(Ar);h(Zo.$$.fragment,Rh),Rh.forEach(o),Gh.forEach(o),Am=l(ed),Fr=s(ed,"SPAN",{});var Jh=r(Fr);Fm=i(Jh,"FlaxModelMixin"),Jh.forEach(o),ed.forEach(o),di=l(t),U=s(t,"DIV",{class:!0});var q=r(U);h(en.$$.fragment,q),Cm=l(q),Cr=s(q,"P",{});var Zh=r(Cr);Pm=i(Zh,"Base class for all flax models."),Zh.forEach(o),Om=l(q),ns=s(q,"P",{});var Yf=r(ns);ss=s(Yf,"A",{href:!0});var eg=r(ss);qm=i(eg,"FlaxModelMixin"),eg.forEach(o),Lm=i(Yf,` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Yf.forEach(o),jm=l(q),V=s(q,"DIV",{class:!0});var he=r(V);h(tn.$$.fragment,he),Im=l(he),Pr=s(he,"P",{});var tg=r(Pr);Vm=i(tg,"Instantiate a pretrained flax model from a pre-trained model configuration."),tg.forEach(o),Bm=l(he),on=s(he,"P",{});var td=r(on);zm=i(td,"The warning "),Or=s(td,"EM",{});var og=r(Or);Sm=i(og,"Weights from XXX not initialized from pretrained model"),og.forEach(o),Km=i(td,` 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.`),td.forEach(o),Wm=l(he),nn=s(he,"P",{});var od=r(nn);Xm=i(od,"The warning "),qr=s(od,"EM",{});var ng=r(qr);Qm=i(ng,"Weights from XXX not used in YYY"),ng.forEach(o),Hm=i(od,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),od.forEach(o),Ym=l(he),h(bt.$$.fragment,he),he.forEach(o),Gm=l(q),vt=s(q,"DIV",{class:!0});var nd=r(vt);h(sn.$$.fragment,nd),Rm=l(nd),rn=s(nd,"P",{});var sd=r(rn);Jm=i(sd,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Lr=s(sd,"CODE",{});var sg=r(Lr);Zm=i(sg,"[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.FlaxModelMixin.from_pretrained)"),sg.forEach(o),ep=i(sd," class method"),sd.forEach(o),nd.forEach(o),tp=l(q),J=s(q,"DIV",{class:!0});var Ot=r(J);h(an.$$.fragment,Ot),op=l(Ot),Q=s(Ot,"P",{});var ge=r(Q);np=i(ge,"Cast the floating-point "),jr=s(ge,"CODE",{});var rg=r(jr);sp=i(rg,"params"),rg.forEach(o),rp=i(ge," to "),Ir=s(ge,"CODE",{});var ag=r(Ir);ap=i(ag,"jax.numpy.bfloat16"),ag.forEach(o),ip=i(ge,". This returns a new "),Vr=s(ge,"CODE",{});var ig=r(Vr);dp=i(ig,"params"),ig.forEach(o),lp=i(ge,` tree and does not cast
the `),Br=s(ge,"CODE",{});var dg=r(Br);cp=i(dg,"params"),dg.forEach(o),mp=i(ge," in place."),ge.forEach(o),pp=l(Ot),zr=s(Ot,"P",{});var lg=r(zr);fp=i(lg,`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.`),lg.forEach(o),up=l(Ot),h(xt.$$.fragment,Ot),Ot.forEach(o),hp=l(q),Z=s(q,"DIV",{class:!0});var qt=r(Z);h(dn.$$.fragment,qt),gp=l(qt),H=s(qt,"P",{});var _e=r(H);_p=i(_e,"Cast the floating-point "),Sr=s(_e,"CODE",{});var cg=r(Sr);bp=i(cg,"params"),cg.forEach(o),vp=i(_e," to "),Kr=s(_e,"CODE",{});var mg=r(Kr);xp=i(mg,"jax.numpy.float16"),mg.forEach(o),yp=i(_e,". This returns a new "),Wr=s(_e,"CODE",{});var pg=r(Wr);$p=i(pg,"params"),pg.forEach(o),wp=i(_e,` tree and does not cast the
`),Xr=s(_e,"CODE",{});var fg=r(Xr);Dp=i(fg,"params"),fg.forEach(o),kp=i(_e," in place."),_e.forEach(o),Mp=l(qt),Qr=s(qt,"P",{});var ug=r(Qr);Tp=i(ug,`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.`),ug.forEach(o),Ep=l(qt),h(yt.$$.fragment,qt),qt.forEach(o),Np=l(q),fe=s(q,"DIV",{class:!0});var ms=r(fe);h(ln.$$.fragment,ms),Up=l(ms),Y=s(ms,"P",{});var be=r(Y);Ap=i(be,"Cast the floating-point "),Hr=s(be,"CODE",{});var hg=r(Hr);Fp=i(hg,"params"),hg.forEach(o),Cp=i(be," to "),Yr=s(be,"CODE",{});var gg=r(Yr);Pp=i(gg,"jax.numpy.float32"),gg.forEach(o),Op=i(be,`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Gr=s(be,"CODE",{});var _g=r(Gr);qp=i(_g,"params"),_g.forEach(o),Lp=i(be," tree and does not cast the "),Rr=s(be,"CODE",{});var bg=r(Rr);jp=i(bg,"params"),bg.forEach(o),Ip=i(be," in place."),be.forEach(o),Vp=l(ms),h($t.$$.fragment,ms),ms.forEach(o),q.forEach(o),li=l(t),ze=s(t,"H2",{class:!0});var rd=r(ze);wt=s(rd,"A",{id:!0,class:!0,href:!0});var vg=r(wt);Jr=s(vg,"SPAN",{});var xg=r(Jr);h(cn.$$.fragment,xg),xg.forEach(o),vg.forEach(o),Bp=l(rd),Zr=s(rd,"SPAN",{});var yg=r(Zr);zp=i(yg,"FlaxUNet2DConditionOutput"),yg.forEach(o),rd.forEach(o),ci=l(t),Se=s(t,"DIV",{class:!0});var ad=r(Se);h(mn.$$.fragment,ad),Sp=l(ad),Dt=s(ad,"DIV",{class:!0});var id=r(Dt);h(pn.$$.fragment,id),Kp=l(id),ea=s(id,"P",{});var $g=r(ea);Wp=i($g,"\u201CReturns a new object replacing the specified fields with new values."),$g.forEach(o),id.forEach(o),ad.forEach(o),mi=l(t),Ke=s(t,"H2",{class:!0});var dd=r(Ke);kt=s(dd,"A",{id:!0,class:!0,href:!0});var wg=r(kt);ta=s(wg,"SPAN",{});var Dg=r(ta);h(fn.$$.fragment,Dg),Dg.forEach(o),wg.forEach(o),Xp=l(dd),oa=s(dd,"SPAN",{});var kg=r(oa);Qp=i(kg,"FlaxUNet2DConditionModel"),kg.forEach(o),dd.forEach(o),pi=l(t),O=s(t,"DIV",{class:!0});var ne=r(O);h(un.$$.fragment,ne),Hp=l(ne),na=s(ne,"P",{});var Mg=r(na);Yp=i(Mg,`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),Mg.forEach(o),Gp=l(ne),hn=s(ne,"P",{});var ld=r(hn);Rp=i(ld,"This model inherits from "),rs=s(ld,"A",{href:!0});var Tg=r(rs);Jp=i(Tg,"FlaxModelMixin"),Tg.forEach(o),Zp=i(ld,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),ld.forEach(o),ef=l(ne),gn=s(ne,"P",{});var cd=r(gn);tf=i(cd,"Also, this model is a Flax Linen "),_n=s(cd,"A",{href:!0,rel:!0});var Eg=r(_n);of=i(Eg,"flax.linen.Module"),Eg.forEach(o),nf=i(cd,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),cd.forEach(o),sf=l(ne),sa=s(ne,"P",{});var Ng=r(sa);rf=i(Ng,"Finally, this model supports inherent JAX features such as:"),Ng.forEach(o),af=l(ne),se=s(ne,"UL",{});var Lt=r(se);ra=s(Lt,"LI",{});var Ug=r(ra);bn=s(Ug,"A",{href:!0,rel:!0});var Ag=r(bn);df=i(Ag,"Just-In-Time (JIT) compilation"),Ag.forEach(o),Ug.forEach(o),lf=l(Lt),aa=s(Lt,"LI",{});var Fg=r(aa);vn=s(Fg,"A",{href:!0,rel:!0});var Cg=r(vn);cf=i(Cg,"Automatic Differentiation"),Cg.forEach(o),Fg.forEach(o),mf=l(Lt),ia=s(Lt,"LI",{});var Pg=r(ia);xn=s(Pg,"A",{href:!0,rel:!0});var Og=r(xn);pf=i(Og,"Vectorization"),Og.forEach(o),Pg.forEach(o),ff=l(Lt),da=s(Lt,"LI",{});var qg=r(da);yn=s(qg,"A",{href:!0,rel:!0});var Lg=r(yn);uf=i(Lg,"Parallelization"),Lg.forEach(o),qg.forEach(o),Lt.forEach(o),ne.forEach(o),fi=l(t),We=s(t,"H2",{class:!0});var md=r(We);Mt=s(md,"A",{id:!0,class:!0,href:!0});var jg=r(Mt);la=s(jg,"SPAN",{});var Ig=r(la);h($n.$$.fragment,Ig),Ig.forEach(o),jg.forEach(o),hf=l(md),ca=s(md,"SPAN",{});var Vg=r(ca);gf=i(Vg,"FlaxDecoderOutput"),Vg.forEach(o),md.forEach(o),ui=l(t),re=s(t,"DIV",{class:!0});var ps=r(re);h(wn.$$.fragment,ps),_f=l(ps),ma=s(ps,"P",{});var Bg=r(ma);bf=i(Bg,"Output of decoding method."),Bg.forEach(o),vf=l(ps),Tt=s(ps,"DIV",{class:!0});var pd=r(Tt);h(Dn.$$.fragment,pd),xf=l(pd),pa=s(pd,"P",{});var zg=r(pa);yf=i(zg,"\u201CReturns a new object replacing the specified fields with new values."),zg.forEach(o),pd.forEach(o),ps.forEach(o),hi=l(t),Xe=s(t,"H2",{class:!0});var fd=r(Xe);Et=s(fd,"A",{id:!0,class:!0,href:!0});var Sg=r(Et);fa=s(Sg,"SPAN",{});var Kg=r(fa);h(kn.$$.fragment,Kg),Kg.forEach(o),Sg.forEach(o),$f=l(fd),ua=s(fd,"SPAN",{});var Wg=r(ua);wf=i(Wg,"FlaxAutoencoderKLOutput"),Wg.forEach(o),fd.forEach(o),gi=l(t),ae=s(t,"DIV",{class:!0});var fs=r(ae);h(Mn.$$.fragment,fs),Df=l(fs),ha=s(fs,"P",{});var Xg=r(ha);kf=i(Xg,"Output of AutoencoderKL encoding method."),Xg.forEach(o),Mf=l(fs),Nt=s(fs,"DIV",{class:!0});var ud=r(Nt);h(Tn.$$.fragment,ud),Tf=l(ud),ga=s(ud,"P",{});var Qg=r(ga);Ef=i(Qg,"\u201CReturns a new object replacing the specified fields with new values."),Qg.forEach(o),ud.forEach(o),fs.forEach(o),_i=l(t),Qe=s(t,"H2",{class:!0});var hd=r(Qe);Ut=s(hd,"A",{id:!0,class:!0,href:!0});var Hg=r(Ut);_a=s(Hg,"SPAN",{});var Yg=r(_a);h(En.$$.fragment,Yg),Yg.forEach(o),Hg.forEach(o),Nf=l(hd),ba=s(hd,"SPAN",{});var Gg=r(ba);Uf=i(Gg,"FlaxAutoencoderKL"),Gg.forEach(o),hd.forEach(o),bi=l(t),j=s(t,"DIV",{class:!0});var ve=r(j);h(Nn.$$.fragment,ve),Af=l(ve),va=s(ve,"P",{});var Rg=r(va);Ff=i(Rg,`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),Rg.forEach(o),Cf=l(ve),Un=s(ve,"P",{});var gd=r(Un);Pf=i(gd,"This model is a Flax Linen "),An=s(gd,"A",{href:!0,rel:!0});var Jg=r(An);Of=i(Jg,"flax.linen.Module"),Jg.forEach(o),qf=i(gd,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),gd.forEach(o),Lf=l(ve),xa=s(ve,"P",{});var Zg=r(xa);jf=i(Zg,"Finally, this model supports inherent JAX features such as:"),Zg.forEach(o),If=l(ve),ie=s(ve,"UL",{});var jt=r(ie);ya=s(jt,"LI",{});var e_=r(ya);Fn=s(e_,"A",{href:!0,rel:!0});var t_=r(Fn);Vf=i(t_,"Just-In-Time (JIT) compilation"),t_.forEach(o),e_.forEach(o),Bf=l(jt),$a=s(jt,"LI",{});var o_=r($a);Cn=s(o_,"A",{href:!0,rel:!0});var n_=r(Cn);zf=i(n_,"Automatic Differentiation"),n_.forEach(o),o_.forEach(o),Sf=l(jt),wa=s(jt,"LI",{});var s_=r(wa);Pn=s(s_,"A",{href:!0,rel:!0});var r_=r(Pn);Kf=i(r_,"Vectorization"),r_.forEach(o),s_.forEach(o),Wf=l(jt),Da=s(jt,"LI",{});var a_=r(Da);On=s(a_,"A",{href:!0,rel:!0});var i_=r(On);Xf=i(i_,"Parallelization"),i_.forEach(o),a_.forEach(o),jt.forEach(o),ve.forEach(o),this.h()},h(){c(x,"name","hf:doc:metadata"),c(x,"content",JSON.stringify(y_)),c(y,"id","models"),c(y,"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"),c(y,"href","#models"),c(w,"class","relative group"),c(Ye,"id","diffusers.ModelMixin"),c(Ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ye,"href","#diffusers.ModelMixin"),c(ye,"class","relative group"),c(Vn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Bn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin.save_pretrained"),c(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(tt,"id","diffusers.models.unet_2d.UNet2DOutput"),c(tt,"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"),c(tt,"href","#diffusers.models.unet_2d.UNet2DOutput"),c(we,"class","relative group"),c(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ot,"id","diffusers.UNet2DModel"),c(ot,"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"),c(ot,"href","#diffusers.UNet2DModel"),c(De,"class","relative group"),c(zn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Sn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(nt,"id","diffusers.models.unet_1d.UNet1DOutput"),c(nt,"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"),c(nt,"href","#diffusers.models.unet_1d.UNet1DOutput"),c(ke,"class","relative group"),c(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(st,"id","diffusers.UNet1DModel"),c(st,"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"),c(st,"href","#diffusers.UNet1DModel"),c(Me,"class","relative group"),c(Kn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Wn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(rt,"id","diffusers.models.unet_2d_condition.UNet2DConditionOutput"),c(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"),c(rt,"href","#diffusers.models.unet_2d_condition.UNet2DConditionOutput"),c(Te,"class","relative group"),c(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(at,"id","diffusers.UNet2DConditionModel"),c(at,"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"),c(at,"href","#diffusers.UNet2DConditionModel"),c(Ee,"class","relative group"),c(Xn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Qn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(it,"id","diffusers.models.vae.DecoderOutput"),c(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"),c(it,"href","#diffusers.models.vae.DecoderOutput"),c(Ne,"class","relative group"),c(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(dt,"id","diffusers.models.vq_model.VQEncoderOutput"),c(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"),c(dt,"href","#diffusers.models.vq_model.VQEncoderOutput"),c(Ae,"class","relative group"),c(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lt,"id","diffusers.VQModel"),c(lt,"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"),c(lt,"href","#diffusers.VQModel"),c(Ce,"class","relative group"),c(Yn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Gn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ct,"id","diffusers.models.autoencoder_kl.AutoencoderKLOutput"),c(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"),c(ct,"href","#diffusers.models.autoencoder_kl.AutoencoderKLOutput"),c(Pe,"class","relative group"),c(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(mt,"id","diffusers.AutoencoderKL"),c(mt,"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"),c(mt,"href","#diffusers.AutoencoderKL"),c(qe,"class","relative group"),c(Rn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Jn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ft,"id","diffusers.Transformer2DModel"),c(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"),c(ft,"href","#diffusers.Transformer2DModel"),c(Le,"class","relative group"),c(Zn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ut,"id","diffusers.models.transformer_2d.Transformer2DModelOutput"),c(ut,"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"),c(ut,"href","#diffusers.models.transformer_2d.Transformer2DModelOutput"),c(je,"class","relative group"),c(So,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ht,"id","diffusers.PriorTransformer"),c(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"),c(ht,"href","#diffusers.PriorTransformer"),c(Ie,"class","relative group"),c(es,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Ho,"href","https://arxiv.org/abs/2204.06125"),c(Ho,"rel","nofollow"),c(os,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(gt,"id","diffusers.models.prior_transformer.PriorTransformerOutput"),c(gt,"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"),c(gt,"href","#diffusers.models.prior_transformer.PriorTransformerOutput"),c(Ve,"class","relative group"),c(Ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(_t,"id","diffusers.FlaxModelMixin"),c(_t,"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"),c(_t,"href","#diffusers.FlaxModelMixin"),c(Be,"class","relative group"),c(ss,"href","/docs/diffusers/main/en/api/models#diffusers.FlaxModelMixin"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wt,"id","diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),c(wt,"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"),c(wt,"href","#diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),c(ze,"class","relative group"),c(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(kt,"id","diffusers.FlaxUNet2DConditionModel"),c(kt,"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"),c(kt,"href","#diffusers.FlaxUNet2DConditionModel"),c(Ke,"class","relative group"),c(rs,"href","/docs/diffusers/main/en/api/models#diffusers.FlaxModelMixin"),c(_n,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(_n,"rel","nofollow"),c(bn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(bn,"rel","nofollow"),c(vn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(vn,"rel","nofollow"),c(xn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(xn,"rel","nofollow"),c(yn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(yn,"rel","nofollow"),c(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Mt,"id","diffusers.models.vae_flax.FlaxDecoderOutput"),c(Mt,"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"),c(Mt,"href","#diffusers.models.vae_flax.FlaxDecoderOutput"),c(We,"class","relative group"),c(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Et,"id","diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),c(Et,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Et,"href","#diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),c(Xe,"class","relative group"),c(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ut,"id","diffusers.FlaxAutoencoderKL"),c(Ut,"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"),c(Ut,"href","#diffusers.FlaxAutoencoderKL"),c(Qe,"class","relative group"),c(An,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(An,"rel","nofollow"),c(Fn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Fn,"rel","nofollow"),c(Cn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Cn,"rel","nofollow"),c(Pn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Pn,"rel","nofollow"),c(On,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(On,"rel","nofollow"),c(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(t,m){e(document.head,x),p(t,M,m),p(t,w,m),e(w,y),e(y,k),g(f,k,null),e(w,D),e(w,G),e(G,xe),p(t,z,m),p(t,S,m),e(S,jn),e(S,us),e(us,xd),e(S,yd),e(S,hs),e(hs,$d),e(S,wd),p(t,Na,m),p(t,ye,m),e(ye,Ye),e(Ye,gs),g(It,gs,null),e(ye,Dd),e(ye,_s),e(_s,kd),p(t,Ua,m),p(t,T,m),g(Vt,T,null),e(T,Md),e(T,bs),e(bs,Td),e(T,Ed),e(T,In),e(In,Vn),e(Vn,Nd),e(In,Ud),e(T,Ad),e(T,vs),e(vs,de),e(de,xs),e(xs,Fd),e(de,Cd),e(de,ys),e(ys,Pd),e(de,Od),e(de,Bn),e(Bn,qd),e(de,Ld),e(T,jd),e(T,le),g(Bt,le,null),e(le,Id),e(le,$s),e($s,Vd),e(le,Bd),e(le,ws),e(ws,zd),e(T,Sd),e(T,Ge),g(zt,Ge,null),e(Ge,Kd),e(Ge,Ds),e(Ds,Wd),e(T,Xd),e(T,ce),g(St,ce,null),e(ce,Qd),e(ce,ks),e(ks,Hd),e(ce,Yd),e(ce,Ms),e(Ms,Gd),e(T,Rd),e(T,R),g(Kt,R,null),e(R,Jd),e(R,Ts),e(Ts,Zd),e(R,el),e(R,Es),e(Es,tl),e(R,ol),e(R,Ns),e(Ns,nl),e(T,sl),e(T,A),g(Wt,A,null),e(A,rl),e(A,Us),e(Us,al),e(A,il),e(A,$e),e($e,dl),e($e,As),e(As,ll),e($e,cl),e($e,Fs),e(Fs,ml),e($e,pl),e(A,fl),e(A,Xt),e(Xt,ul),e(Xt,Cs),e(Cs,hl),e(Xt,gl),e(A,_l),e(A,Qt),e(Qt,bl),e(Qt,Ps),e(Ps,vl),e(Qt,xl),e(A,yl),g(Re,A,null),e(A,$l),g(Je,A,null),e(T,wl),e(T,Ze),g(Ht,Ze,null),e(Ze,Dl),e(Ze,Os),e(Os,kl),e(T,Ml),e(T,et),g(Yt,et,null),e(et,Tl),e(et,Gt),e(Gt,El),e(Gt,qs),e(qs,Nl),e(Gt,Ul),p(t,Aa,m),p(t,we,m),e(we,tt),e(tt,Ls),g(Rt,Ls,null),e(we,Al),e(we,js),e(js,Fl),p(t,Fa,m),p(t,Jt,m),g(Zt,Jt,null),p(t,Ca,m),p(t,De,m),e(De,ot),e(ot,Is),g(eo,Is,null),e(De,Cl),e(De,Vs),e(Vs,Pl),p(t,Pa,m),p(t,K,m),g(to,K,null),e(K,Ol),e(K,Bs),e(Bs,ql),e(K,Ll),e(K,oo),e(oo,jl),e(oo,zn),e(zn,Il),e(oo,Vl),e(K,Bl),e(K,Sn),g(no,Sn,null),p(t,Oa,m),p(t,ke,m),e(ke,nt),e(nt,zs),g(so,zs,null),e(ke,zl),e(ke,Ss),e(Ss,Sl),p(t,qa,m),p(t,ro,m),g(ao,ro,null),p(t,La,m),p(t,Me,m),e(Me,st),e(st,Ks),g(io,Ks,null),e(Me,Kl),e(Me,Ws),e(Ws,Wl),p(t,ja,m),p(t,W,m),g(lo,W,null),e(W,Xl),e(W,Xs),e(Xs,Ql),e(W,Hl),e(W,co),e(co,Yl),e(co,Kn),e(Kn,Gl),e(co,Rl),e(W,Jl),e(W,Wn),g(mo,Wn,null),p(t,Ia,m),p(t,Te,m),e(Te,rt),e(rt,Qs),g(po,Qs,null),e(Te,Zl),e(Te,Hs),e(Hs,ec),p(t,Va,m),p(t,fo,m),g(uo,fo,null),p(t,Ba,m),p(t,Ee,m),e(Ee,at),e(at,Ys),g(ho,Ys,null),e(Ee,tc),e(Ee,Gs),e(Gs,oc),p(t,za,m),p(t,F,m),g(go,F,null),e(F,nc),e(F,Rs),e(Rs,sc),e(F,rc),e(F,_o),e(_o,ac),e(_o,Xn),e(Xn,ic),e(_o,dc),e(F,lc),e(F,Qn),g(bo,Qn,null),e(F,cc),e(F,me),g(vo,me,null),e(me,mc),e(me,Js),e(Js,pc),e(me,fc),e(me,Zs),e(Zs,uc),e(F,hc),e(F,Hn),g(xo,Hn,null),p(t,Sa,m),p(t,Ne,m),e(Ne,it),e(it,er),g(yo,er,null),e(Ne,gc),e(Ne,tr),e(tr,_c),p(t,Ka,m),p(t,Ue,m),g($o,Ue,null),e(Ue,bc),e(Ue,or),e(or,vc),p(t,Wa,m),p(t,Ae,m),e(Ae,dt),e(dt,nr),g(wo,nr,null),e(Ae,xc),e(Ae,sr),e(sr,yc),p(t,Xa,m),p(t,Fe,m),g(Do,Fe,null),e(Fe,$c),e(Fe,rr),e(rr,wc),p(t,Qa,m),p(t,Ce,m),e(Ce,lt),e(lt,ar),g(ko,ar,null),e(Ce,Dc),e(Ce,ir),e(ir,kc),p(t,Ha,m),p(t,X,m),g(Mo,X,null),e(X,Mc),e(X,dr),e(dr,Tc),e(X,Ec),e(X,To),e(To,Nc),e(To,Yn),e(Yn,Uc),e(To,Ac),e(X,Fc),e(X,Gn),g(Eo,Gn,null),p(t,Ya,m),p(t,Pe,m),e(Pe,ct),e(ct,lr),g(No,lr,null),e(Pe,Cc),e(Pe,cr),e(cr,Pc),p(t,Ga,m),p(t,Oe,m),g(Uo,Oe,null),e(Oe,Oc),e(Oe,mr),e(mr,qc),p(t,Ra,m),p(t,qe,m),e(qe,mt),e(mt,pr),g(Ao,pr,null),e(qe,Lc),e(qe,fr),e(fr,jc),p(t,Ja,m),p(t,C,m),g(Fo,C,null),e(C,Ic),e(C,ur),e(ur,Vc),e(C,Bc),e(C,Co),e(Co,zc),e(Co,Rn),e(Rn,Sc),e(Co,Kc),e(C,Wc),e(C,pt),g(Po,pt,null),e(pt,Xc),e(pt,Oo),e(Oo,Qc),e(Oo,hr),e(hr,Hc),e(Oo,Yc),e(C,Gc),e(C,pe),g(qo,pe,null),e(pe,Rc),e(pe,gr),e(gr,Jc),e(pe,Zc),e(pe,_r),e(_r,em),e(C,tm),e(C,Jn),g(Lo,Jn,null),p(t,Za,m),p(t,Le,m),e(Le,ft),e(ft,br),g(jo,br,null),e(Le,om),e(Le,vr),e(vr,nm),p(t,ei,m),p(t,P,m),g(Io,P,null),e(P,sm),e(P,xr),e(xr,rm),e(P,am),e(P,yr),e(yr,im),e(P,dm),e(P,Vo),e(Vo,lm),e(Vo,$r),e($r,cm),e(Vo,mm),e(P,pm),e(P,wr),e(wr,fm),e(P,um),e(P,Zn),g(Bo,Zn,null),p(t,ti,m),p(t,je,m),e(je,ut),e(ut,Dr),g(zo,Dr,null),e(je,hm),e(je,kr),e(kr,gm),p(t,oi,m),p(t,So,m),g(Ko,So,null),p(t,ni,m),p(t,Ie,m),e(Ie,ht),e(ht,Mr),g(Wo,Mr,null),e(Ie,_m),e(Ie,Tr),e(Tr,bm),p(t,si,m),p(t,L,m),g(Xo,L,null),e(L,vm),e(L,Er),e(Er,xm),e(L,ym),e(L,Qo),e(Qo,$m),e(Qo,es),e(es,wm),e(Qo,Dm),e(L,km),e(L,ts),e(ts,Mm),e(ts,Ho),e(Ho,Tm),e(L,Em),e(L,os),g(Yo,os,null),p(t,ri,m),p(t,Ve,m),e(Ve,gt),e(gt,Nr),g(Go,Nr,null),e(Ve,Nm),e(Ve,Ur),e(Ur,Um),p(t,ai,m),p(t,Ro,m),g(Jo,Ro,null),p(t,ii,m),p(t,Be,m),e(Be,_t),e(_t,Ar),g(Zo,Ar,null),e(Be,Am),e(Be,Fr),e(Fr,Fm),p(t,di,m),p(t,U,m),g(en,U,null),e(U,Cm),e(U,Cr),e(Cr,Pm),e(U,Om),e(U,ns),e(ns,ss),e(ss,qm),e(ns,Lm),e(U,jm),e(U,V),g(tn,V,null),e(V,Im),e(V,Pr),e(Pr,Vm),e(V,Bm),e(V,on),e(on,zm),e(on,Or),e(Or,Sm),e(on,Km),e(V,Wm),e(V,nn),e(nn,Xm),e(nn,qr),e(qr,Qm),e(nn,Hm),e(V,Ym),g(bt,V,null),e(U,Gm),e(U,vt),g(sn,vt,null),e(vt,Rm),e(vt,rn),e(rn,Jm),e(rn,Lr),e(Lr,Zm),e(rn,ep),e(U,tp),e(U,J),g(an,J,null),e(J,op),e(J,Q),e(Q,np),e(Q,jr),e(jr,sp),e(Q,rp),e(Q,Ir),e(Ir,ap),e(Q,ip),e(Q,Vr),e(Vr,dp),e(Q,lp),e(Q,Br),e(Br,cp),e(Q,mp),e(J,pp),e(J,zr),e(zr,fp),e(J,up),g(xt,J,null),e(U,hp),e(U,Z),g(dn,Z,null),e(Z,gp),e(Z,H),e(H,_p),e(H,Sr),e(Sr,bp),e(H,vp),e(H,Kr),e(Kr,xp),e(H,yp),e(H,Wr),e(Wr,$p),e(H,wp),e(H,Xr),e(Xr,Dp),e(H,kp),e(Z,Mp),e(Z,Qr),e(Qr,Tp),e(Z,Ep),g(yt,Z,null),e(U,Np),e(U,fe),g(ln,fe,null),e(fe,Up),e(fe,Y),e(Y,Ap),e(Y,Hr),e(Hr,Fp),e(Y,Cp),e(Y,Yr),e(Yr,Pp),e(Y,Op),e(Y,Gr),e(Gr,qp),e(Y,Lp),e(Y,Rr),e(Rr,jp),e(Y,Ip),e(fe,Vp),g($t,fe,null),p(t,li,m),p(t,ze,m),e(ze,wt),e(wt,Jr),g(cn,Jr,null),e(ze,Bp),e(ze,Zr),e(Zr,zp),p(t,ci,m),p(t,Se,m),g(mn,Se,null),e(Se,Sp),e(Se,Dt),g(pn,Dt,null),e(Dt,Kp),e(Dt,ea),e(ea,Wp),p(t,mi,m),p(t,Ke,m),e(Ke,kt),e(kt,ta),g(fn,ta,null),e(Ke,Xp),e(Ke,oa),e(oa,Qp),p(t,pi,m),p(t,O,m),g(un,O,null),e(O,Hp),e(O,na),e(na,Yp),e(O,Gp),e(O,hn),e(hn,Rp),e(hn,rs),e(rs,Jp),e(hn,Zp),e(O,ef),e(O,gn),e(gn,tf),e(gn,_n),e(_n,of),e(gn,nf),e(O,sf),e(O,sa),e(sa,rf),e(O,af),e(O,se),e(se,ra),e(ra,bn),e(bn,df),e(se,lf),e(se,aa),e(aa,vn),e(vn,cf),e(se,mf),e(se,ia),e(ia,xn),e(xn,pf),e(se,ff),e(se,da),e(da,yn),e(yn,uf),p(t,fi,m),p(t,We,m),e(We,Mt),e(Mt,la),g($n,la,null),e(We,hf),e(We,ca),e(ca,gf),p(t,ui,m),p(t,re,m),g(wn,re,null),e(re,_f),e(re,ma),e(ma,bf),e(re,vf),e(re,Tt),g(Dn,Tt,null),e(Tt,xf),e(Tt,pa),e(pa,yf),p(t,hi,m),p(t,Xe,m),e(Xe,Et),e(Et,fa),g(kn,fa,null),e(Xe,$f),e(Xe,ua),e(ua,wf),p(t,gi,m),p(t,ae,m),g(Mn,ae,null),e(ae,Df),e(ae,ha),e(ha,kf),e(ae,Mf),e(ae,Nt),g(Tn,Nt,null),e(Nt,Tf),e(Nt,ga),e(ga,Ef),p(t,_i,m),p(t,Qe,m),e(Qe,Ut),e(Ut,_a),g(En,_a,null),e(Qe,Nf),e(Qe,ba),e(ba,Uf),p(t,bi,m),p(t,j,m),g(Nn,j,null),e(j,Af),e(j,va),e(va,Ff),e(j,Cf),e(j,Un),e(Un,Pf),e(Un,An),e(An,Of),e(Un,qf),e(j,Lf),e(j,xa),e(xa,jf),e(j,If),e(j,ie),e(ie,ya),e(ya,Fn),e(Fn,Vf),e(ie,Bf),e(ie,$a),e($a,Cn),e(Cn,zf),e(ie,Sf),e(ie,wa),e(wa,Pn),e(Pn,Kf),e(ie,Wf),e(ie,Da),e(Da,On),e(On,Xf),vi=!0},p(t,[m]){const qn={};m&2&&(qn.$$scope={dirty:m,ctx:t}),Re.$set(qn);const ka={};m&2&&(ka.$$scope={dirty:m,ctx:t}),Je.$set(ka);const Ma={};m&2&&(Ma.$$scope={dirty:m,ctx:t}),bt.$set(Ma);const Ta={};m&2&&(Ta.$$scope={dirty:m,ctx:t}),xt.$set(Ta);const He={};m&2&&(He.$$scope={dirty:m,ctx:t}),yt.$set(He);const Ea={};m&2&&(Ea.$$scope={dirty:m,ctx:t}),$t.$set(Ea)},i(t){vi||(_(f.$$.fragment,t),_(It.$$.fragment,t),_(Vt.$$.fragment,t),_(Bt.$$.fragment,t),_(zt.$$.fragment,t),_(St.$$.fragment,t),_(Kt.$$.fragment,t),_(Wt.$$.fragment,t),_(Re.$$.fragment,t),_(Je.$$.fragment,t),_(Ht.$$.fragment,t),_(Yt.$$.fragment,t),_(Rt.$$.fragment,t),_(Zt.$$.fragment,t),_(eo.$$.fragment,t),_(to.$$.fragment,t),_(no.$$.fragment,t),_(so.$$.fragment,t),_(ao.$$.fragment,t),_(io.$$.fragment,t),_(lo.$$.fragment,t),_(mo.$$.fragment,t),_(po.$$.fragment,t),_(uo.$$.fragment,t),_(ho.$$.fragment,t),_(go.$$.fragment,t),_(bo.$$.fragment,t),_(vo.$$.fragment,t),_(xo.$$.fragment,t),_(yo.$$.fragment,t),_($o.$$.fragment,t),_(wo.$$.fragment,t),_(Do.$$.fragment,t),_(ko.$$.fragment,t),_(Mo.$$.fragment,t),_(Eo.$$.fragment,t),_(No.$$.fragment,t),_(Uo.$$.fragment,t),_(Ao.$$.fragment,t),_(Fo.$$.fragment,t),_(Po.$$.fragment,t),_(qo.$$.fragment,t),_(Lo.$$.fragment,t),_(jo.$$.fragment,t),_(Io.$$.fragment,t),_(Bo.$$.fragment,t),_(zo.$$.fragment,t),_(Ko.$$.fragment,t),_(Wo.$$.fragment,t),_(Xo.$$.fragment,t),_(Yo.$$.fragment,t),_(Go.$$.fragment,t),_(Jo.$$.fragment,t),_(Zo.$$.fragment,t),_(en.$$.fragment,t),_(tn.$$.fragment,t),_(bt.$$.fragment,t),_(sn.$$.fragment,t),_(an.$$.fragment,t),_(xt.$$.fragment,t),_(dn.$$.fragment,t),_(yt.$$.fragment,t),_(ln.$$.fragment,t),_($t.$$.fragment,t),_(cn.$$.fragment,t),_(mn.$$.fragment,t),_(pn.$$.fragment,t),_(fn.$$.fragment,t),_(un.$$.fragment,t),_($n.$$.fragment,t),_(wn.$$.fragment,t),_(Dn.$$.fragment,t),_(kn.$$.fragment,t),_(Mn.$$.fragment,t),_(Tn.$$.fragment,t),_(En.$$.fragment,t),_(Nn.$$.fragment,t),vi=!0)},o(t){b(f.$$.fragment,t),b(It.$$.fragment,t),b(Vt.$$.fragment,t),b(Bt.$$.fragment,t),b(zt.$$.fragment,t),b(St.$$.fragment,t),b(Kt.$$.fragment,t),b(Wt.$$.fragment,t),b(Re.$$.fragment,t),b(Je.$$.fragment,t),b(Ht.$$.fragment,t),b(Yt.$$.fragment,t),b(Rt.$$.fragment,t),b(Zt.$$.fragment,t),b(eo.$$.fragment,t),b(to.$$.fragment,t),b(no.$$.fragment,t),b(so.$$.fragment,t),b(ao.$$.fragment,t),b(io.$$.fragment,t),b(lo.$$.fragment,t),b(mo.$$.fragment,t),b(po.$$.fragment,t),b(uo.$$.fragment,t),b(ho.$$.fragment,t),b(go.$$.fragment,t),b(bo.$$.fragment,t),b(vo.$$.fragment,t),b(xo.$$.fragment,t),b(yo.$$.fragment,t),b($o.$$.fragment,t),b(wo.$$.fragment,t),b(Do.$$.fragment,t),b(ko.$$.fragment,t),b(Mo.$$.fragment,t),b(Eo.$$.fragment,t),b(No.$$.fragment,t),b(Uo.$$.fragment,t),b(Ao.$$.fragment,t),b(Fo.$$.fragment,t),b(Po.$$.fragment,t),b(qo.$$.fragment,t),b(Lo.$$.fragment,t),b(jo.$$.fragment,t),b(Io.$$.fragment,t),b(Bo.$$.fragment,t),b(zo.$$.fragment,t),b(Ko.$$.fragment,t),b(Wo.$$.fragment,t),b(Xo.$$.fragment,t),b(Yo.$$.fragment,t),b(Go.$$.fragment,t),b(Jo.$$.fragment,t),b(Zo.$$.fragment,t),b(en.$$.fragment,t),b(tn.$$.fragment,t),b(bt.$$.fragment,t),b(sn.$$.fragment,t),b(an.$$.fragment,t),b(xt.$$.fragment,t),b(dn.$$.fragment,t),b(yt.$$.fragment,t),b(ln.$$.fragment,t),b($t.$$.fragment,t),b(cn.$$.fragment,t),b(mn.$$.fragment,t),b(pn.$$.fragment,t),b(fn.$$.fragment,t),b(un.$$.fragment,t),b($n.$$.fragment,t),b(wn.$$.fragment,t),b(Dn.$$.fragment,t),b(kn.$$.fragment,t),b(Mn.$$.fragment,t),b(Tn.$$.fragment,t),b(En.$$.fragment,t),b(Nn.$$.fragment,t),vi=!1},d(t){o(x),t&&o(M),t&&o(w),v(f),t&&o(z),t&&o(S),t&&o(Na),t&&o(ye),v(It),t&&o(Ua),t&&o(T),v(Vt),v(Bt),v(zt),v(St),v(Kt),v(Wt),v(Re),v(Je),v(Ht),v(Yt),t&&o(Aa),t&&o(we),v(Rt),t&&o(Fa),t&&o(Jt),v(Zt),t&&o(Ca),t&&o(De),v(eo),t&&o(Pa),t&&o(K),v(to),v(no),t&&o(Oa),t&&o(ke),v(so),t&&o(qa),t&&o(ro),v(ao),t&&o(La),t&&o(Me),v(io),t&&o(ja),t&&o(W),v(lo),v(mo),t&&o(Ia),t&&o(Te),v(po),t&&o(Va),t&&o(fo),v(uo),t&&o(Ba),t&&o(Ee),v(ho),t&&o(za),t&&o(F),v(go),v(bo),v(vo),v(xo),t&&o(Sa),t&&o(Ne),v(yo),t&&o(Ka),t&&o(Ue),v($o),t&&o(Wa),t&&o(Ae),v(wo),t&&o(Xa),t&&o(Fe),v(Do),t&&o(Qa),t&&o(Ce),v(ko),t&&o(Ha),t&&o(X),v(Mo),v(Eo),t&&o(Ya),t&&o(Pe),v(No),t&&o(Ga),t&&o(Oe),v(Uo),t&&o(Ra),t&&o(qe),v(Ao),t&&o(Ja),t&&o(C),v(Fo),v(Po),v(qo),v(Lo),t&&o(Za),t&&o(Le),v(jo),t&&o(ei),t&&o(P),v(Io),v(Bo),t&&o(ti),t&&o(je),v(zo),t&&o(oi),t&&o(So),v(Ko),t&&o(ni),t&&o(Ie),v(Wo),t&&o(si),t&&o(L),v(Xo),v(Yo),t&&o(ri),t&&o(Ve),v(Go),t&&o(ai),t&&o(Ro),v(Jo),t&&o(ii),t&&o(Be),v(Zo),t&&o(di),t&&o(U),v(en),v(tn),v(bt),v(sn),v(an),v(xt),v(dn),v(yt),v(ln),v($t),t&&o(li),t&&o(ze),v(cn),t&&o(ci),t&&o(Se),v(mn),v(pn),t&&o(mi),t&&o(Ke),v(fn),t&&o(pi),t&&o(O),v(un),t&&o(fi),t&&o(We),v($n),t&&o(ui),t&&o(re),v(wn),v(Dn),t&&o(hi),t&&o(Xe),v(kn),t&&o(gi),t&&o(ae),v(Mn),v(Tn),t&&o(_i),t&&o(Qe),v(En),t&&o(bi),t&&o(j),v(Nn)}}}const y_={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.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.PriorTransformer",title:"PriorTransformer"},{local:"diffusers.models.prior_transformer.PriorTransformerOutput",title:"PriorTransformerOutput"},{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"}],title:"Models"};function $_(I){return f_(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class N_ extends l_{constructor(x){super();c_(this,x,$_,x_,m_,{})}}export{N_ as default,y_ as metadata};
