import{S as m_,i as p_,s as f_,e as n,k as d,w as u,t as r,M as u_,c as s,d as o,m as l,a,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 h_,L as Fr}from"../../chunks/vendor-hf-doc-builder.js";import{T as c_}from"../../chunks/Tip-hf-doc-builder.js";import{D}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Cr}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as N}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ar}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function g_(q){let x,M,w,y,k;return y=new Cr({props:{code:`import torch
from diffusers import UNet2DConditionModel
from xformers.ops import MemoryEfficientAttentionFlashAttentionOp

model = UNet2DConditionModel.from_pretrained(
    "stabilityai/stable-diffusion-2-1", subfolder="unet", torch_dtype=torch.float16
)
model = model.to("cuda")
model.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> UNet2DConditionModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> xformers.ops <span class="hljs-keyword">import</span> MemoryEfficientAttentionFlashAttentionOp

<span class="hljs-meta">&gt;&gt;&gt; </span>model = UNet2DConditionModel.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;stabilityai/stable-diffusion-2-1&quot;</span>, subfolder=<span class="hljs-string">&quot;unet&quot;</span>, torch_dtype=torch.float16
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = model.to(<span class="hljs-string">&quot;cuda&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model.enable_xformers_memory_efficient_attention(attention_op=MemoryEfficientAttentionFlashAttentionOp)`}}),{c(){x=n("p"),M=r("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var $=a(x);M=i($,"Examples:"),$.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,$){p(f,x,$),e(x,M),p(f,w,$),g(y,f,$),k=!0},p:Fr,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 __(q){let x,M,w,y,k,f,$,G;return{c(){x=n("p"),M=r("It is required to be logged in ("),w=n("code"),y=r("huggingface-cli login"),k=r(") when you want to use private or "),f=n("a"),$=r(`gated
models`),G=r("."),this.h()},l(ye){x=s(ye,"P",{});var S=a(x);M=i(S,"It is required to be logged in ("),w=s(S,"CODE",{});var K=a(w);y=i(K,"huggingface-cli login"),K.forEach(o),k=i(S,") when you want to use private or "),f=s(S,"A",{href:!0,rel:!0});var In=a(f);$=i(In,`gated
models`),In.forEach(o),G=i(S,"."),S.forEach(o),this.h()},h(){c(f,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),c(f,"rel","nofollow")},m(ye,S){p(ye,x,S),e(x,M),e(x,w),e(w,y),e(x,k),e(x,f),e(f,$),e(x,G)},d(ye){ye&&o(x)}}}function b_(q){let x,M,w,y,k;return{c(){x=n("p"),M=r("Activate the special "),w=n("a"),y=r("\u201Coffline-mode\u201D"),k=r(` to use
this method in a firewalled environment.`),this.h()},l(f){x=s(f,"P",{});var $=a(x);M=i($,"Activate the special "),w=s($,"A",{href:!0,rel:!0});var G=a(w);y=i(G,"\u201Coffline-mode\u201D"),G.forEach(o),k=i($,` to use
this method in a firewalled environment.`),$.forEach(o),this.h()},h(){c(w,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),c(w,"rel","nofollow")},m(f,$){p(f,x,$),e(x,M),e(x,w),e(w,y),e(x,k)},d(f){f&&o(x)}}}function v_(q){let x,M,w,y,k;return y=new Cr({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=r("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var $=a(x);M=i($,"Examples:"),$.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,$){p(f,x,$),e(x,M),p(f,w,$),g(y,f,$),k=!0},p:Fr,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_(q){let x,M,w,y,k;return y=new Cr({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=r("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var $=a(x);M=i($,"Examples:"),$.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,$){p(f,x,$),e(x,M),p(f,w,$),g(y,f,$),k=!0},p:Fr,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 y_(q){let x,M,w,y,k;return y=new Cr({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=r("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var $=a(x);M=i($,"Examples:"),$.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,$){p(f,x,$),e(x,M),p(f,w,$),g(y,f,$),k=!0},p:Fr,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 $_(q){let x,M,w,y,k;return y=new Cr({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=r("Examples:"),w=d(),u(y.$$.fragment)},l(f){x=s(f,"P",{});var $=a(x);M=i($,"Examples:"),$.forEach(o),w=l(f),h(y.$$.fragment,f)},m(f,$){p(f,x,$),e(x,M),p(f,w,$),g(y,f,$),k=!0},p:Fr,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 w_(q){let x,M,w,y,k,f,$,G,ye,S,K,In,hs,$d,wd,gs,Dd,kd,Pr,$e,Re,_s,zt,Md,bs,Td,Or,T,Vt,Nd,vs,Ed,Ud,zn,Vn,Ad,Fd,Cd,xs,de,ys,Pd,Od,$s,qd,jd,Bn,Ld,Id,zd,le,Bt,Vd,ws,Bd,Sd,Ds,Kd,Wd,Ge,St,Xd,ks,Hd,Qd,ce,Kt,Yd,Ms,Rd,Gd,Ts,Jd,Zd,z,Wt,el,Ns,tl,ol,Es,nl,sl,Us,al,rl,Je,il,A,Xt,dl,As,ll,cl,we,ml,Fs,pl,fl,Cs,ul,hl,gl,Ht,_l,Ps,bl,vl,xl,Qt,yl,Os,$l,wl,Dl,Ze,kl,et,Ml,tt,Yt,Tl,qs,Nl,El,ot,Rt,Ul,Gt,Al,js,Fl,Cl,qr,De,nt,Ls,Jt,Pl,Is,Ol,jr,Zt,eo,Lr,ke,st,zs,to,ql,Vs,jl,Ir,W,oo,Ll,Bs,Il,zl,no,Vl,Sn,Bl,Sl,Kl,Kn,so,zr,Me,at,Ss,ao,Wl,Ks,Xl,Vr,ro,io,Br,Te,rt,Ws,lo,Hl,Xs,Ql,Sr,X,co,Yl,Hs,Rl,Gl,mo,Jl,Wn,Zl,ec,tc,Xn,po,Kr,Ne,it,Qs,fo,oc,Ys,nc,Wr,uo,ho,Xr,Ee,dt,Rs,go,sc,Gs,ac,Hr,F,_o,rc,Js,ic,dc,bo,lc,Hn,cc,mc,pc,Qn,vo,fc,me,xo,uc,Zs,hc,gc,ea,_c,bc,Yn,yo,Qr,Ue,lt,ta,$o,vc,oa,xc,Yr,Ae,wo,yc,na,$c,Rr,Fe,ct,sa,Do,wc,aa,Dc,Gr,Ce,ko,kc,ra,Mc,Jr,Pe,mt,ia,Mo,Tc,da,Nc,Zr,H,To,Ec,la,Uc,Ac,No,Fc,Rn,Cc,Pc,Oc,Gn,Eo,ei,Oe,pt,ca,Uo,qc,ma,jc,ti,qe,Ao,Lc,pa,Ic,oi,je,ft,fa,Fo,zc,ua,Vc,ni,C,Co,Bc,ha,Sc,Kc,Po,Wc,Jn,Xc,Hc,Qc,ut,Oo,Yc,qo,Rc,ga,Gc,Jc,Zc,pe,jo,em,_a,tm,om,ba,nm,sm,Zn,Lo,si,Le,ht,va,Io,am,xa,rm,ai,P,zo,im,ya,dm,lm,$a,cm,mm,Vo,pm,wa,fm,um,hm,Da,gm,_m,es,Bo,ri,Ie,gt,ka,So,bm,Ma,vm,ii,Ko,Wo,di,ze,_t,Ta,Xo,xm,Na,ym,li,L,Ho,$m,Ea,wm,Dm,Qo,km,ts,Mm,Tm,Nm,os,Em,Yo,Um,Am,ns,Ro,ci,Ve,bt,Ua,Go,Fm,Aa,Cm,mi,Jo,Zo,pi,Be,vt,Fa,en,Pm,Ca,Om,fi,U,tn,qm,Pa,jm,Lm,ss,as,Im,zm,Vm,V,on,Bm,Oa,Sm,Km,nn,Wm,qa,Xm,Hm,Qm,sn,Ym,ja,Rm,Gm,Jm,xt,Zm,yt,an,ep,rn,tp,La,op,np,sp,J,dn,ap,Q,rp,Ia,ip,dp,za,lp,cp,Va,mp,pp,Ba,fp,up,hp,Sa,gp,_p,$t,bp,Z,ln,vp,Y,xp,Ka,yp,$p,Wa,wp,Dp,Xa,kp,Mp,Ha,Tp,Np,Ep,Qa,Up,Ap,wt,Fp,fe,cn,Cp,R,Pp,Ya,Op,qp,Ra,jp,Lp,Ga,Ip,zp,Ja,Vp,Bp,Sp,Dt,ui,Se,kt,Za,mn,Kp,er,Wp,hi,Ke,pn,Xp,Mt,fn,Hp,tr,Qp,gi,We,Tt,or,un,Yp,nr,Rp,_i,O,hn,Gp,sr,Jp,Zp,gn,ef,rs,tf,of,nf,_n,sf,bn,af,rf,df,ar,lf,cf,se,rr,vn,mf,pf,ir,xn,ff,uf,dr,yn,hf,gf,lr,$n,_f,bi,Xe,Nt,cr,wn,bf,mr,vf,vi,ae,Dn,xf,pr,yf,$f,Et,kn,wf,fr,Df,xi,He,Ut,ur,Mn,kf,hr,Mf,yi,re,Tn,Tf,gr,Nf,Ef,At,Nn,Uf,_r,Af,$i,Qe,Ft,br,En,Ff,vr,Cf,wi,I,Un,Pf,xr,Of,qf,An,jf,Fn,Lf,If,zf,yr,Vf,Bf,ie,$r,Cn,Sf,Kf,wr,Pn,Wf,Xf,Dr,On,Hf,Qf,kr,qn,Yf,Di;return f=new N({}),zt=new N({}),Vt=new D({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L156"}}),Bt=new D({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#L194"}}),St=new D({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#L253"}}),Kt=new D({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#L183"}}),Wt=new D({props:{name:"enable_xformers_memory_efficient_attention",anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention",parameters:[{name:"attention_op",val:": typing.Optional[typing.Callable] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.attention_op",description:`<strong>attention_op</strong> (<code>Callable</code>, <em>optional</em>) &#x2014;
Override the default <code>None</code> operator for use as <code>op</code> argument to the
<a href="https://facebookresearch.github.io/xformers/components/ops.html#xformers.ops.memory_efficient_attention" rel="nofollow"><code>memory_efficient_attention()</code></a>
function of xFormers.`,name:"attention_op"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L221"}}),Je=new Ar({props:{anchor:"diffusers.ModelMixin.enable_xformers_memory_efficient_attention.example",$$slots:{default:[g_]},$$scope:{ctx:q}}}),Xt=new D({props:{name:"from_pretrained",anchor:"diffusers.ModelMixin.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike, NoneType]"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"diffusers.ModelMixin.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>, <em>optional</em>) &#x2014;
Can be either:</p>
<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids should have an organization name, like <code>google/ddpm-celebahq-256</code>.</li>
<li>A path to a <em>directory</em> containing model weights saved using <code>~ModelMixin.save_config</code>, e.g.,
<code>./my_model_directory/</code>.</li>
</ul>`,name:"pretrained_model_name_or_path"},{anchor:"diffusers.ModelMixin.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Union[str, os.PathLike]</code>, <em>optional</em>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"diffusers.ModelMixin.from_pretrained.torch_dtype",description:`<strong>torch_dtype</strong> (<code>str</code> or <code>torch.dtype</code>, <em>optional</em>) &#x2014;
Override the default <code>torch.dtype</code> and load the model under this dtype. If <code>&quot;auto&quot;</code> is passed the dtype
will be automatically derived from the model&#x2019;s weights.`,name:"torch_dtype"},{anchor:"diffusers.ModelMixin.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"diffusers.ModelMixin.from_pretrained.resume_download",description:`<strong>resume_download</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to delete incompletely received files. Will attempt to resume the download if such a
file exists.`,name:"resume_download"},{anchor:"diffusers.ModelMixin.from_pretrained.proxies",description:`<strong>proxies</strong> (<code>Dict[str, str]</code>, <em>optional</em>) &#x2014;
A dictionary of proxy servers to use by protocol or endpoint, e.g., <code>{&apos;http&apos;: &apos;foo.bar:3128&apos;, &apos;http://hostname&apos;: &apos;foo.bar:4012&apos;}</code>. The proxies are used on each request.`,name:"proxies"},{anchor:"diffusers.ModelMixin.from_pretrained.output_loading_info(bool,",description:`<strong>output_loading_info(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to also return a dictionary containing missing keys, unexpected keys and error messages.`,name:"output_loading_info(bool,"},{anchor:"diffusers.ModelMixin.from_pretrained.local_files_only(bool,",description:`<strong>local_files_only(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only(bool,"},{anchor:"diffusers.ModelMixin.from_pretrained.use_auth_token",description:`<strong>use_auth_token</strong> (<code>str</code> or <em>bool</em>, <em>optional</em>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>diffusers-cli login</code> (stored in <code>~/.huggingface</code>).`,name:"use_auth_token"},{anchor:"diffusers.ModelMixin.from_pretrained.revision",description:`<strong>revision</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;main&quot;</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"},{anchor:"diffusers.ModelMixin.from_pretrained.from_flax",description:`<strong>from_flax</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Load the model weights from a Flax checkpoint save file.`,name:"from_flax"},{anchor:"diffusers.ModelMixin.from_pretrained.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.ModelMixin.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"},{anchor:"diffusers.ModelMixin.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be refined to each
parameter/buffer name, once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>To have Accelerate compute the most optimized <code>device_map</code> automatically, set <code>device_map=&quot;auto&quot;</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.ModelMixin.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading by not initializing the weights and only loading the pre-trained weights. This
also tries to not use more than 1x model size in CPU memory (including peak memory) while loading the
model. This is only supported when torch version &gt;= 1.9.0. If you are using an older version of torch,
setting this argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"},{anchor:"diffusers.ModelMixin.from_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified load weights from <code>variant</code> filename, <em>e.g.</em> pytorch_model.<variant>.bin. <code>variant</code> is
ignored when using <code>from_flax</code>.</variant>`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L317"}}),Ze=new c_({props:{$$slots:{default:[__]},$$scope:{ctx:q}}}),et=new c_({props:{$$slots:{default:[b_]},$$scope:{ctx:q}}}),Yt=new D({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#L762",returnDescription:`
<p>The number of parameters.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Rt=new D({props:{name:"save_pretrained",anchor:"diffusers.ModelMixin.save_pretrained",parameters:[{name:"save_directory",val:": typing.Union[str, os.PathLike]"},{name:"is_main_process",val:": bool = True"},{name:"save_function",val:": typing.Callable = None"},{name:"safe_serialization",val:": bool = False"},{name:"variant",val:": typing.Optional[str] = None"}],parametersDescription:[{anchor:"diffusers.ModelMixin.save_pretrained.save_directory",description:`<strong>save_directory</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
Directory to which to save. Will be created if it doesn&#x2019;t exist.`,name:"save_directory"},{anchor:"diffusers.ModelMixin.save_pretrained.is_main_process",description:`<strong>is_main_process</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether the process calling this is the main process or not. Useful when in distributed training like
TPUs and need to call this function on all processes. In this case, set <code>is_main_process=True</code> only on
the main process to avoid race conditions.`,name:"is_main_process"},{anchor:"diffusers.ModelMixin.save_pretrained.save_function",description:`<strong>save_function</strong> (<code>Callable</code>) &#x2014;
The function to use to save the state dictionary. Useful on distributed training like TPUs when one
need to replace <code>torch.save</code> by another method. Can be configured with the environment variable
<code>DIFFUSERS_SAVE_MODE</code>.`,name:"save_function"},{anchor:"diffusers.ModelMixin.save_pretrained.safe_serialization",description:`<strong>safe_serialization</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to save the model using <code>safetensors</code> or the traditional PyTorch way (that uses <code>pickle</code>).`,name:"safe_serialization"},{anchor:"diffusers.ModelMixin.save_pretrained.variant",description:`<strong>variant</strong> (<code>str</code>, <em>optional</em>) &#x2014;
If specified, weights are saved in the format pytorch_model.<variant>.bin.</variant>`,name:"variant"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_utils.py#L259"}}),Jt=new N({}),eo=new D({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"}}),to=new N({}),oo=new D({props:{name:"class diffusers.UNet2DModel",anchor:"diffusers.UNet2DModel",parameters:[{name:"sample_size",val:": typing.Union[int, typing.Tuple[int, int], NoneType] = None"},{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"center_input_sample",val:": bool = False"},{name:"time_embedding_type",val:": str = 'positional'"},{name:"freq_shift",val:": int = 0"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownBlock2D', 'AttnDownBlock2D', 'AttnDownBlock2D', 'AttnDownBlock2D')"},{name:"up_block_types",val:": typing.Tuple[str] = ('AttnUpBlock2D', 'AttnUpBlock2D', 'AttnUpBlock2D', 'UpBlock2D')"},{name:"block_out_channels",val:": typing.Tuple[int] = (224, 448, 672, 896)"},{name:"layers_per_block",val:": int = 2"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"downsample_padding",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"attention_head_dim",val:": typing.Optional[int] = 8"},{name:"norm_num_groups",val:": int = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"resnet_time_scale_shift",val:": str = 'default'"},{name:"add_attention",val:": bool = True"},{name:"class_embed_type",val:": typing.Optional[str] = None"},{name:"num_class_embeds",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.UNet2DModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code> or <code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Height and width of input/output sample.`,name:"sample_size"},{anchor:"diffusers.UNet2DModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.UNet2DModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.UNet2DModel.center_input_sample",description:"<strong>center_input_sample</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to center the input sample.",name:"center_input_sample"},{anchor:"diffusers.UNet2DModel.time_embedding_type",description:"<strong>time_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;positional&quot;</code>) &#x2014; Type of time embedding to use.",name:"time_embedding_type"},{anchor:"diffusers.UNet2DModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; Frequency shift for fourier time embedding.",name:"freq_shift"},{anchor:"diffusers.UNet2DModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>True</code>): Whether to flip sin to cos for fourier time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.UNet2DModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownBlock2D&quot;, &quot;AttnDownBlock2D&quot;, &quot;AttnDownBlock2D&quot;, &quot;AttnDownBlock2D&quot;)</code>): Tuple of downsample block
types.`,name:"down_block_types"},{anchor:"diffusers.UNet2DModel.mid_block_type",description:`<strong>mid_block_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;UNetMidBlock2D&quot;</code>) &#x2014;
The mid block type. Choose from <code>UNetMidBlock2D</code> or <code>UnCLIPUNetMidBlock2D</code>.`,name:"mid_block_type"},{anchor:"diffusers.UNet2DModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;AttnUpBlock2D&quot;, &quot;AttnUpBlock2D&quot;, &quot;AttnUpBlock2D&quot;, &quot;UpBlock2D&quot;)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.UNet2DModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(224, 448, 672, 896)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.UNet2DModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to <code>2</code>) &#x2014; The number of layers per block.",name:"layers_per_block"},{anchor:"diffusers.UNet2DModel.mid_block_scale_factor",description:"<strong>mid_block_scale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014; The scale factor for the mid block.",name:"mid_block_scale_factor"},{anchor:"diffusers.UNet2DModel.downsample_padding",description:"<strong>downsample_padding</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) &#x2014; The padding for the downsample convolution.",name:"downsample_padding"},{anchor:"diffusers.UNet2DModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.UNet2DModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>8</code>) &#x2014; The attention head dimension.",name:"attention_head_dim"},{anchor:"diffusers.UNet2DModel.norm_num_groups",description:"<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; The number of groups for the normalization.",name:"norm_num_groups"},{anchor:"diffusers.UNet2DModel.norm_eps",description:"<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1e-5</code>) &#x2014; The epsilon for the normalization.",name:"norm_eps"},{anchor:"diffusers.UNet2DModel.resnet_time_scale_shift",description:`<strong>resnet_time_scale_shift</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;default&quot;</code>) &#x2014; Time scale shift config
for resnet blocks, see <code>ResnetBlock2D</code>. Choose from <code>default</code> or <code>scale_shift</code>.`,name:"resnet_time_scale_shift"},{anchor:"diffusers.UNet2DModel.class_embed_type",description:`<strong>class_embed_type</strong> (<code>str</code>, <em>optional</em>, defaults to None) &#x2014; The type of class embedding to use which is ultimately
summed with the time embeddings. Choose from <code>None</code>, <code>&quot;timestep&quot;</code>, or <code>&quot;identity&quot;</code>.`,name:"class_embed_type"},{anchor:"diffusers.UNet2DModel.num_class_embeds",description:`<strong>num_class_embeds</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Input dimension of the learnable embedding matrix to be projected to <code>time_embed_dim</code>, when performing
class conditioning with <code>class_embed_type</code> equal to <code>None</code>.`,name:"num_class_embeds"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d.py#L38"}}),so=new D({props:{name:"forward",anchor:"diffusers.UNet2DModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"class_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UNet2DModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; (batch, channel, height, width) noisy inputs tensor",name:"sample"},{anchor:"diffusers.UNet2DModel.forward.timestep",description:"<strong>timestep</strong> (<code>torch.FloatTensor</code> or <code>float</code> or `int) &#x2014; (batch) timesteps",name:"timestep"},{anchor:"diffusers.UNet2DModel.forward.class_labels",description:`<strong>class_labels</strong> (<code>torch.FloatTensor</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional class labels for conditioning. Their embeddings will be summed with the timestep embeddings.`,name:"class_labels"},{anchor:"diffusers.UNet2DModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/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#L217",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>
`}}),ao=new N({}),io=new D({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"}}),lo=new N({}),co=new D({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"}}),po=new D({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>
`}}),fo=new N({}),ho=new D({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"}}),go=new N({}),_o=new D({props:{name:"class diffusers.UNet2DConditionModel",anchor:"diffusers.UNet2DConditionModel",parameters:[{name:"sample_size",val:": typing.Optional[int] = None"},{name:"in_channels",val:": int = 4"},{name:"out_channels",val:": int = 4"},{name:"center_input_sample",val:": bool = False"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"freq_shift",val:": int = 0"},{name:"down_block_types",val:": typing.Tuple[str] = ('CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'CrossAttnDownBlock2D', 'DownBlock2D')"},{name:"mid_block_type",val:": typing.Optional[str] = 'UNetMidBlock2DCrossAttn'"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D')"},{name:"only_cross_attention",val:": typing.Union[bool, typing.Tuple[bool]] = False"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"downsample_padding",val:": int = 1"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"norm_num_groups",val:": typing.Optional[int] = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"cross_attention_dim",val:": int = 1280"},{name:"attention_head_dim",val:": typing.Union[int, typing.Tuple[int]] = 8"},{name:"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'"},{name:"time_embedding_type",val:": str = 'positional'"},{name:"timestep_post_act",val:": typing.Optional[str] = None"},{name:"time_cond_proj_dim",val:": typing.Optional[int] = None"},{name:"conv_in_kernel",val:": int = 3"},{name:"conv_out_kernel",val:": int = 3"},{name:"projection_class_embeddings_input_dim",val:": typing.Optional[int] = None"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code> or <code>Tuple[int, int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Height and width of input/output sample.`,name:"sample_size"},{anchor:"diffusers.UNet2DConditionModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; The number of channels in the input sample.",name:"in_channels"},{anchor:"diffusers.UNet2DConditionModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; The number of channels in the output.",name:"out_channels"},{anchor:"diffusers.UNet2DConditionModel.center_input_sample",description:"<strong>center_input_sample</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014; Whether to center the input sample.",name:"center_input_sample"},{anchor:"diffusers.UNet2DConditionModel.flip_sin_to_cos",description:`<strong>flip_sin_to_cos</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to flip the sin to cos in the time embedding.`,name:"flip_sin_to_cos"},{anchor:"diffusers.UNet2DConditionModel.freq_shift",description:"<strong>freq_shift</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The frequency shift to apply to the time embedding.",name:"freq_shift"},{anchor:"diffusers.UNet2DConditionModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;CrossAttnDownBlock2D&quot;, &quot;DownBlock2D&quot;)</code>) &#x2014;
The tuple of downsample blocks to use.`,name:"down_block_types"},{anchor:"diffusers.UNet2DConditionModel.mid_block_type",description:`<strong>mid_block_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;UNetMidBlock2DCrossAttn&quot;</code>) &#x2014;
The mid block type. Choose from <code>UNetMidBlock2DCrossAttn</code> or <code>UNetMidBlock2DSimpleCrossAttn</code>, will skip the
mid block layer if <code>None</code>.`,name:"mid_block_type"},{anchor:"diffusers.UNet2DConditionModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;UpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;,)</code>) &#x2014;
The tuple of upsample blocks to use.`,name:"up_block_types"},{anchor:"diffusers.UNet2DConditionModel.only_cross_attention(bool",description:`<strong>only_cross_attention(<code>bool</code></strong> or <code>Tuple[bool]</code>, <em>optional</em>, default to <code>False</code>) &#x2014;
Whether to include self-attention in the basic transformer blocks, see
<code>BasicTransformerBlock</code>.`,name:"only_cross_attention(bool"},{anchor:"diffusers.UNet2DConditionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.UNet2DConditionModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; The number of layers per block.",name:"layers_per_block"},{anchor:"diffusers.UNet2DConditionModel.downsample_padding",description:"<strong>downsample_padding</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The padding to use for the downsampling convolution.",name:"downsample_padding"},{anchor:"diffusers.UNet2DConditionModel.mid_block_scale_factor",description:"<strong>mid_block_scale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014; The scale factor to use for the mid block.",name:"mid_block_scale_factor"},{anchor:"diffusers.UNet2DConditionModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.UNet2DConditionModel.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014; The number of groups to use for the normalization.
If <code>None</code>, it will skip the normalization and activation layers in post-processing`,name:"norm_num_groups"},{anchor:"diffusers.UNet2DConditionModel.norm_eps",description:"<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014; The epsilon to use for the normalization.",name:"norm_eps"},{anchor:"diffusers.UNet2DConditionModel.cross_attention_dim",description:"<strong>cross_attention_dim</strong> (<code>int</code>, <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>, <code>&quot;identity&quot;</code>, or <code>&quot;projection&quot;</code>.`,name:"class_embed_type"},{anchor:"diffusers.UNet2DConditionModel.num_class_embeds",description:`<strong>num_class_embeds</strong> (<code>int</code>, <em>optional</em>, defaults to None) &#x2014;
Input dimension of the learnable embedding matrix to be projected to <code>time_embed_dim</code>, when performing
class conditioning with <code>class_embed_type</code> equal to <code>None</code>.`,name:"num_class_embeds"},{anchor:"diffusers.UNet2DConditionModel.time_embedding_type",description:`<strong>time_embedding_type</strong> (<code>str</code>, <em>optional</em>, default to <code>positional</code>) &#x2014;
The type of position embedding to use for timesteps. Choose from <code>positional</code> or <code>fourier</code>.`,name:"time_embedding_type"},{anchor:"diffusers.UNet2DConditionModel.timestep_post_act",description:"<strong>timestep_post_act</strong> (<code>str, *optional*, default to </code>None<code>) -- The second activation function to use in timestep embedding. Choose from </code>silu<code>, </code>mish<code>and</code>gelu`.",name:"timestep_post_act"},{anchor:"diffusers.UNet2DConditionModel.time_cond_proj_dim",description:`<strong>time_cond_proj_dim</strong> (<code>int</code>, <em>optional</em>, default to <code>None</code>) &#x2014;
The dimension of <code>cond_proj</code> layer in timestep embedding.`,name:"time_cond_proj_dim"},{anchor:"diffusers.UNet2DConditionModel.conv_in_kernel",description:"<strong>conv_in_kernel</strong> (<code>int</code>, <em>optional</em>, default to <code>3</code>) &#x2014; The kernel size of <code>conv_in</code> layer.",name:"conv_in_kernel"},{anchor:"diffusers.UNet2DConditionModel.conv_out_kernel",description:"<strong>conv_out_kernel</strong> (<code>int</code>, <em>optional</em>, default to <code>3</code>) &#x2014; The kernel size of <code>conv_out</code> layer.",name:"conv_out_kernel"},{anchor:"diffusers.UNet2DConditionModel.projection_class_embeddings_input_dim",description:`<strong>projection_class_embeddings_input_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The dimension of the <code>class_labels</code> input when
using the &#x201C;projection&#x201D; <code>class_embed_type</code>. Required when using the &#x201C;projection&#x201D; <code>class_embed_type</code>.`,name:"projection_class_embeddings_input_dim"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_condition.py#L53"}}),vo=new D({props:{name:"forward",anchor:"diffusers.UNet2DConditionModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"encoder_hidden_states",val:": Tensor"},{name:"class_labels",val:": typing.Optional[torch.Tensor] = None"},{name:"timestep_cond",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attention_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"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"},{anchor:"diffusers.UNet2DConditionModel.forward.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
A kwargs dictionary that if specified is passed along to the <code>AttnProcessor</code> as defined under
<code>self.processor</code> in
<a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/cross_attention.py" rel="nofollow">diffusers.cross_attention</a>.`,name:"cross_attention_kwargs"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/unet_2d_condition.py#L486",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>
`}}),xo=new D({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#L417"}}),yo=new D({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, diffusers.models.cross_attention.LoRACrossAttnProcessor, diffusers.models.cross_attention.LoRAXFormersCrossAttnProcessor, 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, diffusers.models.cross_attention.LoRACrossAttnProcessor, diffusers.models.cross_attention.LoRAXFormersCrossAttnProcessor]]]"}],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#L387"}}),$o=new N({}),wo=new D({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"}}),Do=new N({}),ko=new D({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"}}),Mo=new N({}),To=new D({props:{name:"class diffusers.VQModel",anchor:"diffusers.VQModel",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 3"},{name:"sample_size",val:": int = 32"},{name:"num_vq_embeddings",val:": int = 256"},{name:"norm_num_groups",val:": int = 32"},{name:"vq_embed_dim",val:": typing.Optional[int] = None"},{name:"scaling_factor",val:": float = 0.18215"}],parametersDescription:[{anchor:"diffusers.VQModel.in_channels",description:"<strong>in_channels</strong> (int, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.VQModel.out_channels",description:"<strong>out_channels</strong> (int,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.VQModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownEncoderBlock2D&quot;,)</code>): Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.VQModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;UpDecoderBlock2D&quot;,)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.VQModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(64,)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.VQModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.VQModel.latent_channels",description:"<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>3</code>) &#x2014; Number of channels in the latent space.",name:"latent_channels"},{anchor:"diffusers.VQModel.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; TODO",name:"sample_size"},{anchor:"diffusers.VQModel.num_vq_embeddings",description:"<strong>num_vq_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to <code>256</code>) &#x2014; Number of codebook vectors in the VQ-VAE.",name:"num_vq_embeddings"},{anchor:"diffusers.VQModel.vq_embed_dim",description:"<strong>vq_embed_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; Hidden dim of codebook vectors in the VQ-VAE.",name:"vq_embed_dim"},{anchor:"diffusers.VQModel.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.18215</code>) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <code>z = z * scaling_factor</code> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: <code>z = 1 / scaling_factor * z</code>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution Image
Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/vq_model.py#L39"}}),Eo=new D({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#L142"}}),Uo=new N({}),Ao=new D({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"}}),Fo=new N({}),Co=new D({props:{name:"class diffusers.AutoencoderKL",anchor:"diffusers.AutoencoderKL",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 4"},{name:"norm_num_groups",val:": int = 32"},{name:"sample_size",val:": int = 32"},{name:"scaling_factor",val:": float = 0.18215"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.in_channels",description:"<strong>in_channels</strong> (int, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.AutoencoderKL.out_channels",description:"<strong>out_channels</strong> (int,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.AutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownEncoderBlock2D&quot;,)</code>): Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.AutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;UpDecoderBlock2D&quot;,)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.AutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(64,)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.AutoencoderKL.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.AutoencoderKL.latent_channels",description:"<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014; Number of channels in the latent space.",name:"latent_channels"},{anchor:"diffusers.AutoencoderKL.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; TODO",name:"sample_size"},{anchor:"diffusers.AutoencoderKL.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 0.18215) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <code>z = z * scaling_factor</code> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: <code>z = 1 / scaling_factor * z</code>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution Image
Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L40"}}),Oo=new D({props:{name:"disable_slicing",anchor:"diffusers.AutoencoderKL.disable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L141"}}),jo=new D({props:{name:"enable_slicing",anchor:"diffusers.AutoencoderKL.enable_slicing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/autoencoder_kl.py#L132"}}),Lo=new D({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#L161"}}),Io=new N({}),zo=new D({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 D({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>
`}}),So=new N({}),Wo=new D({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"}}),Xo=new N({}),Ho=new D({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"}}),Ro=new D({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 N({}),Zo=new D({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"}}),en=new N({}),tn=new D({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"}}),on=new D({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"}}),xt=new Ar({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example",$$slots:{default:[v_]},$$scope:{ctx:q}}}),an=new D({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"}}),dn=new D({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"}}),$t=new Ar({props:{anchor:"diffusers.FlaxModelMixin.to_bf16.example",$$slots:{default:[x_]},$$scope:{ctx:q}}}),ln=new D({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"}}),wt=new Ar({props:{anchor:"diffusers.FlaxModelMixin.to_fp16.example",$$slots:{default:[y_]},$$scope:{ctx:q}}}),cn=new D({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"}}),Dt=new Ar({props:{anchor:"diffusers.FlaxModelMixin.to_fp32.example",$$slots:{default:[$_]},$$scope:{ctx:q}}}),mn=new N({}),pn=new D({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"}}),fn=new D({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#L108"}}),un=new N({}),hn=new D({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 0x7fc51a4c1a30>"},{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"}}),wn=new N({}),Dn=new D({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"}}),kn=new D({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#L108"}}),Mn=new N({}),Tn=new D({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"}}),Nn=new D({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#L108"}}),En=new N({}),Un=new D({props:{name:"class diffusers.FlaxAutoencoderKL",anchor:"diffusers.FlaxAutoencoderKL",parameters:[{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownEncoderBlock2D',)"},{name:"up_block_types",val:": typing.Tuple[str] = ('UpDecoderBlock2D',)"},{name:"block_out_channels",val:": typing.Tuple[int] = (64,)"},{name:"layers_per_block",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"latent_channels",val:": int = 4"},{name:"norm_num_groups",val:": int = 32"},{name:"sample_size",val:": int = 32"},{name:"scaling_factor",val:": float = 0.18215"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"parent",val:": typing.Union[typing.Type[flax.linen.module.Module], typing.Type[flax.core.scope.Scope], typing.Type[flax.linen.module._Sentinel], NoneType] = <flax.linen.module._Sentinel object at 0x7fc51a4c1a30>"},{name:"name",val:": str = None"}],parametersDescription:[{anchor:"diffusers.FlaxAutoencoderKL.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Input channels`,name:"in_channels"},{anchor:"diffusers.FlaxAutoencoderKL.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Output channels`,name:"out_channels"},{anchor:"diffusers.FlaxAutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(DownEncoderBlock2D)</em>) &#x2014;
DownEncoder block type`,name:"down_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(UpDecoderBlock2D)</em>) &#x2014;
UpDecoder block type`,name:"up_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(64,)</em>) &#x2014;
Tuple containing the number of output channels for each block`,name:"block_out_channels"},{anchor:"diffusers.FlaxAutoencoderKL.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to <em>2</em>) &#x2014;
Number of Resnet layer for each block`,name:"layers_per_block"},{anchor:"diffusers.FlaxAutoencoderKL.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <em>silu</em>) &#x2014;
Activation function`,name:"act_fn"},{anchor:"diffusers.FlaxAutoencoderKL.latent_channels",description:`<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <em>4</em>) &#x2014;
Latent space channels`,name:"latent_channels"},{anchor:"diffusers.FlaxAutoencoderKL.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to <em>32</em>) &#x2014;
Norm num group`,name:"norm_num_groups"},{anchor:"diffusers.FlaxAutoencoderKL.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Sample input size`,name:"sample_size"},{anchor:"diffusers.FlaxAutoencoderKL.scaling_factor",description:`<strong>scaling_factor</strong> (<em>float</em>, <em>optional</em>, defaults to 0.18215) &#x2014;
The component-wise standard deviation of the trained latent space computed using the first batch of the
training set. This is used to scale the latent space to have unit variance when training the diffusion
model. The latents are scaled with the formula <em>z = z </em> scaling_factor<em> before being passed to the
diffusion model. When decoding, the latents are scaled back to the original scale with the formula: </em>z = 1
/ scaling_factor <em> z</em>. For more details, refer to sections 4.3.2 and D.1 of the <a href="https://arxiv.org/abs/2112.10752" rel="nofollow">High-Resolution Image
Synthesis with Latent Diffusion Models</a> paper.`,name:"scaling_factor"},{anchor:"diffusers.FlaxAutoencoderKL.dtype",description:`<strong>dtype</strong> (<code>jnp.dtype</code>, <em>optional</em>, defaults to jnp.float32) &#x2014;
parameters <em>dtype</em>`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/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(),G=n("span"),ye=r("Models"),S=d(),K=n("p"),In=r(`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`),hs=n("em"),$d=r("\\theta(\\mathbf{x}"),wd=r(`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),gs=n("code"),Dd=r("torch.nn.module"),kd=r(" with basic functionality for saving and loading models both locally and from the HuggingFace hub."),Pr=d(),$e=n("h2"),Re=n("a"),_s=n("span"),u(zt.$$.fragment),Md=d(),bs=n("span"),Td=r("ModelMixin"),Or=d(),T=n("div"),u(Vt.$$.fragment),Nd=d(),vs=n("p"),Ed=r("Base class for all models."),Ud=d(),zn=n("p"),Vn=n("a"),Ad=r("ModelMixin"),Fd=r(` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),Cd=d(),xs=n("ul"),de=n("li"),ys=n("strong"),Pd=r("config_name"),Od=r(" ("),$s=n("code"),qd=r("str"),jd=r(`) \u2014 A filename under which the model should be stored when calling
`),Bn=n("a"),Ld=r("save_pretrained()"),Id=r("."),zd=d(),le=n("div"),u(Bt.$$.fragment),Vd=d(),ws=n("p"),Bd=r("Deactivates gradient checkpointing for the current model."),Sd=d(),Ds=n("p"),Kd=r(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Wd=d(),Ge=n("div"),u(St.$$.fragment),Xd=d(),ks=n("p"),Hd=r("Disable memory efficient attention as implemented in xformers."),Qd=d(),ce=n("div"),u(Kt.$$.fragment),Yd=d(),Ms=n("p"),Rd=r("Activates gradient checkpointing for the current model."),Gd=d(),Ts=n("p"),Jd=r(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Zd=d(),z=n("div"),u(Wt.$$.fragment),el=d(),Ns=n("p"),tl=r("Enable memory efficient attention as implemented in xformers."),ol=d(),Es=n("p"),nl=r(`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.`),sl=d(),Us=n("p"),al=r(`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),rl=d(),u(Je.$$.fragment),il=d(),A=n("div"),u(Xt.$$.fragment),dl=d(),As=n("p"),ll=r("Instantiate a pretrained pytorch model from a pre-trained model configuration."),cl=d(),we=n("p"),ml=r("The model is set in evaluation mode by default using "),Fs=n("code"),pl=r("model.eval()"),fl=r(` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Cs=n("code"),ul=r("model.train()"),hl=r("."),gl=d(),Ht=n("p"),_l=r("The warning "),Ps=n("em"),bl=r("Weights from XXX not initialized from pretrained model"),vl=r(` 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.`),xl=d(),Qt=n("p"),yl=r("The warning "),Os=n("em"),$l=r("Weights from XXX not used in YYY"),wl=r(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Dl=d(),u(Ze.$$.fragment),kl=d(),u(et.$$.fragment),Ml=d(),tt=n("div"),u(Yt.$$.fragment),Tl=d(),qs=n("p"),Nl=r("Get number of (optionally, trainable or non-embeddings) parameters in the module."),El=d(),ot=n("div"),u(Rt.$$.fragment),Ul=d(),Gt=n("p"),Al=r(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),js=n("code"),Fl=r("[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.ModelMixin.from_pretrained)"),Cl=r(" class method."),qr=d(),De=n("h2"),nt=n("a"),Ls=n("span"),u(Jt.$$.fragment),Pl=d(),Is=n("span"),Ol=r("UNet2DOutput"),jr=d(),Zt=n("div"),u(eo.$$.fragment),Lr=d(),ke=n("h2"),st=n("a"),zs=n("span"),u(to.$$.fragment),ql=d(),Vs=n("span"),jl=r("UNet2DModel"),Ir=d(),W=n("div"),u(oo.$$.fragment),Ll=d(),Bs=n("p"),Il=r("UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),zl=d(),no=n("p"),Vl=r("This model inherits from "),Sn=n("a"),Bl=r("ModelMixin"),Sl=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Kl=d(),Kn=n("div"),u(so.$$.fragment),zr=d(),Me=n("h2"),at=n("a"),Ss=n("span"),u(ao.$$.fragment),Wl=d(),Ks=n("span"),Xl=r("UNet1DOutput"),Vr=d(),ro=n("div"),u(io.$$.fragment),Br=d(),Te=n("h2"),rt=n("a"),Ws=n("span"),u(lo.$$.fragment),Hl=d(),Xs=n("span"),Ql=r("UNet1DModel"),Sr=d(),X=n("div"),u(co.$$.fragment),Yl=d(),Hs=n("p"),Rl=r("UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Gl=d(),mo=n("p"),Jl=r("This model inherits from "),Wn=n("a"),Zl=r("ModelMixin"),ec=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),tc=d(),Xn=n("div"),u(po.$$.fragment),Kr=d(),Ne=n("h2"),it=n("a"),Qs=n("span"),u(fo.$$.fragment),oc=d(),Ys=n("span"),nc=r("UNet2DConditionOutput"),Wr=d(),uo=n("div"),u(ho.$$.fragment),Xr=d(),Ee=n("h2"),dt=n("a"),Rs=n("span"),u(go.$$.fragment),sc=d(),Gs=n("span"),ac=r("UNet2DConditionModel"),Hr=d(),F=n("div"),u(_o.$$.fragment),rc=d(),Js=n("p"),ic=r(`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),dc=d(),bo=n("p"),lc=r("This model inherits from "),Hn=n("a"),cc=r("ModelMixin"),mc=r(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),pc=d(),Qn=n("div"),u(vo.$$.fragment),fc=d(),me=n("div"),u(xo.$$.fragment),uc=d(),Zs=n("p"),hc=r("Enable sliced attention computation."),gc=d(),ea=n("p"),_c=r(`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.`),bc=d(),Yn=n("div"),u(yo.$$.fragment),Qr=d(),Ue=n("h2"),lt=n("a"),ta=n("span"),u($o.$$.fragment),vc=d(),oa=n("span"),xc=r("DecoderOutput"),Yr=d(),Ae=n("div"),u(wo.$$.fragment),yc=d(),na=n("p"),$c=r("Output of decoding method."),Rr=d(),Fe=n("h2"),ct=n("a"),sa=n("span"),u(Do.$$.fragment),wc=d(),aa=n("span"),Dc=r("VQEncoderOutput"),Gr=d(),Ce=n("div"),u(ko.$$.fragment),kc=d(),ra=n("p"),Mc=r("Output of VQModel encoding method."),Jr=d(),Pe=n("h2"),mt=n("a"),ia=n("span"),u(Mo.$$.fragment),Tc=d(),da=n("span"),Nc=r("VQModel"),Zr=d(),H=n("div"),u(To.$$.fragment),Ec=d(),la=n("p"),Uc=r(`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),Ac=d(),No=n("p"),Fc=r("This model inherits from "),Rn=n("a"),Cc=r("ModelMixin"),Pc=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Oc=d(),Gn=n("div"),u(Eo.$$.fragment),ei=d(),Oe=n("h2"),pt=n("a"),ca=n("span"),u(Uo.$$.fragment),qc=d(),ma=n("span"),jc=r("AutoencoderKLOutput"),ti=d(),qe=n("div"),u(Ao.$$.fragment),Lc=d(),pa=n("p"),Ic=r("Output of AutoencoderKL encoding method."),oi=d(),je=n("h2"),ft=n("a"),fa=n("span"),u(Fo.$$.fragment),zc=d(),ua=n("span"),Vc=r("AutoencoderKL"),ni=d(),C=n("div"),u(Co.$$.fragment),Bc=d(),ha=n("p"),Sc=r(`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),Kc=d(),Po=n("p"),Wc=r("This model inherits from "),Jn=n("a"),Xc=r("ModelMixin"),Hc=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Qc=d(),ut=n("div"),u(Oo.$$.fragment),Yc=d(),qo=n("p"),Rc=r("Disable sliced VAE decoding. If "),ga=n("code"),Gc=r("enable_slicing"),Jc=r(` was previously invoked, this method will go back to computing
decoding in one step.`),Zc=d(),pe=n("div"),u(jo.$$.fragment),em=d(),_a=n("p"),tm=r("Enable sliced VAE decoding."),om=d(),ba=n("p"),nm=r(`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.`),sm=d(),Zn=n("div"),u(Lo.$$.fragment),si=d(),Le=n("h2"),ht=n("a"),va=n("span"),u(Io.$$.fragment),am=d(),xa=n("span"),rm=r("Transformer2DModel"),ai=d(),P=n("div"),u(zo.$$.fragment),im=d(),ya=n("p"),dm=r(`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),lm=d(),$a=n("p"),cm=r(`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.`),mm=d(),Vo=n("p"),pm=r(`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),wa=n("code"),fm=r("ImagePositionalEmbeddings"),um=r(`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),hm=d(),Da=n("p"),gm=r(`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.`),_m=d(),es=n("div"),u(Bo.$$.fragment),ri=d(),Ie=n("h2"),gt=n("a"),ka=n("span"),u(So.$$.fragment),bm=d(),Ma=n("span"),vm=r("Transformer2DModelOutput"),ii=d(),Ko=n("div"),u(Wo.$$.fragment),di=d(),ze=n("h2"),_t=n("a"),Ta=n("span"),u(Xo.$$.fragment),xm=d(),Na=n("span"),ym=r("PriorTransformer"),li=d(),L=n("div"),u(Ho.$$.fragment),$m=d(),Ea=n("p"),wm=r(`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.`),Dm=d(),Qo=n("p"),km=r("This model inherits from "),ts=n("a"),Mm=r("ModelMixin"),Tm=r(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Nm=d(),os=n("p"),Em=r("For more details, see the original paper: "),Yo=n("a"),Um=r("https://arxiv.org/abs/2204.06125"),Am=d(),ns=n("div"),u(Ro.$$.fragment),ci=d(),Ve=n("h2"),bt=n("a"),Ua=n("span"),u(Go.$$.fragment),Fm=d(),Aa=n("span"),Cm=r("PriorTransformerOutput"),mi=d(),Jo=n("div"),u(Zo.$$.fragment),pi=d(),Be=n("h2"),vt=n("a"),Fa=n("span"),u(en.$$.fragment),Pm=d(),Ca=n("span"),Om=r("FlaxModelMixin"),fi=d(),U=n("div"),u(tn.$$.fragment),qm=d(),Pa=n("p"),jm=r("Base class for all flax models."),Lm=d(),ss=n("p"),as=n("a"),Im=r("FlaxModelMixin"),zm=r(` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Vm=d(),V=n("div"),u(on.$$.fragment),Bm=d(),Oa=n("p"),Sm=r("Instantiate a pretrained flax model from a pre-trained model configuration."),Km=d(),nn=n("p"),Wm=r("The warning "),qa=n("em"),Xm=r("Weights from XXX not initialized from pretrained model"),Hm=r(` 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.`),Qm=d(),sn=n("p"),Ym=r("The warning "),ja=n("em"),Rm=r("Weights from XXX not used in YYY"),Gm=r(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Jm=d(),u(xt.$$.fragment),Zm=d(),yt=n("div"),u(an.$$.fragment),ep=d(),rn=n("p"),tp=r(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),La=n("code"),op=r("[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.FlaxModelMixin.from_pretrained)"),np=r(" class method"),sp=d(),J=n("div"),u(dn.$$.fragment),ap=d(),Q=n("p"),rp=r("Cast the floating-point "),Ia=n("code"),ip=r("params"),dp=r(" to "),za=n("code"),lp=r("jax.numpy.bfloat16"),cp=r(". This returns a new "),Va=n("code"),mp=r("params"),pp=r(` tree and does not cast
the `),Ba=n("code"),fp=r("params"),up=r(" in place."),hp=d(),Sa=n("p"),gp=r(`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.`),_p=d(),u($t.$$.fragment),bp=d(),Z=n("div"),u(ln.$$.fragment),vp=d(),Y=n("p"),xp=r("Cast the floating-point "),Ka=n("code"),yp=r("params"),$p=r(" to "),Wa=n("code"),wp=r("jax.numpy.float16"),Dp=r(". This returns a new "),Xa=n("code"),kp=r("params"),Mp=r(` tree and does not cast the
`),Ha=n("code"),Tp=r("params"),Np=r(" in place."),Ep=d(),Qa=n("p"),Up=r(`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.`),Ap=d(),u(wt.$$.fragment),Fp=d(),fe=n("div"),u(cn.$$.fragment),Cp=d(),R=n("p"),Pp=r("Cast the floating-point "),Ya=n("code"),Op=r("params"),qp=r(" to "),Ra=n("code"),jp=r("jax.numpy.float32"),Lp=r(`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Ga=n("code"),Ip=r("params"),zp=r(" tree and does not cast the "),Ja=n("code"),Vp=r("params"),Bp=r(" in place."),Sp=d(),u(Dt.$$.fragment),ui=d(),Se=n("h2"),kt=n("a"),Za=n("span"),u(mn.$$.fragment),Kp=d(),er=n("span"),Wp=r("FlaxUNet2DConditionOutput"),hi=d(),Ke=n("div"),u(pn.$$.fragment),Xp=d(),Mt=n("div"),u(fn.$$.fragment),Hp=d(),tr=n("p"),Qp=r("\u201CReturns a new object replacing the specified fields with new values."),gi=d(),We=n("h2"),Tt=n("a"),or=n("span"),u(un.$$.fragment),Yp=d(),nr=n("span"),Rp=r("FlaxUNet2DConditionModel"),_i=d(),O=n("div"),u(hn.$$.fragment),Gp=d(),sr=n("p"),Jp=r(`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),Zp=d(),gn=n("p"),ef=r("This model inherits from "),rs=n("a"),tf=r("FlaxModelMixin"),of=r(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),nf=d(),_n=n("p"),sf=r("Also, this model is a Flax Linen "),bn=n("a"),af=r("flax.linen.Module"),rf=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),df=d(),ar=n("p"),lf=r("Finally, this model supports inherent JAX features such as:"),cf=d(),se=n("ul"),rr=n("li"),vn=n("a"),mf=r("Just-In-Time (JIT) compilation"),pf=d(),ir=n("li"),xn=n("a"),ff=r("Automatic Differentiation"),uf=d(),dr=n("li"),yn=n("a"),hf=r("Vectorization"),gf=d(),lr=n("li"),$n=n("a"),_f=r("Parallelization"),bi=d(),Xe=n("h2"),Nt=n("a"),cr=n("span"),u(wn.$$.fragment),bf=d(),mr=n("span"),vf=r("FlaxDecoderOutput"),vi=d(),ae=n("div"),u(Dn.$$.fragment),xf=d(),pr=n("p"),yf=r("Output of decoding method."),$f=d(),Et=n("div"),u(kn.$$.fragment),wf=d(),fr=n("p"),Df=r("\u201CReturns a new object replacing the specified fields with new values."),xi=d(),He=n("h2"),Ut=n("a"),ur=n("span"),u(Mn.$$.fragment),kf=d(),hr=n("span"),Mf=r("FlaxAutoencoderKLOutput"),yi=d(),re=n("div"),u(Tn.$$.fragment),Tf=d(),gr=n("p"),Nf=r("Output of AutoencoderKL encoding method."),Ef=d(),At=n("div"),u(Nn.$$.fragment),Uf=d(),_r=n("p"),Af=r("\u201CReturns a new object replacing the specified fields with new values."),$i=d(),Qe=n("h2"),Ft=n("a"),br=n("span"),u(En.$$.fragment),Ff=d(),vr=n("span"),Cf=r("FlaxAutoencoderKL"),wi=d(),I=n("div"),u(Un.$$.fragment),Pf=d(),xr=n("p"),Of=r(`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),qf=d(),An=n("p"),jf=r("This model is a Flax Linen "),Fn=n("a"),Lf=r("flax.linen.Module"),If=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),zf=d(),yr=n("p"),Vf=r("Finally, this model supports inherent JAX features such as:"),Bf=d(),ie=n("ul"),$r=n("li"),Cn=n("a"),Sf=r("Just-In-Time (JIT) compilation"),Kf=d(),wr=n("li"),Pn=n("a"),Wf=r("Automatic Differentiation"),Xf=d(),Dr=n("li"),On=n("a"),Hf=r("Vectorization"),Qf=d(),kr=n("li"),qn=n("a"),Yf=r("Parallelization"),this.h()},l(t){const m=u_('[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 jn=a(w);y=s(jn,"A",{id:!0,class:!0,href:!0});var Mr=a(y);k=s(Mr,"SPAN",{});var Tr=a(k);h(f.$$.fragment,Tr),Tr.forEach(o),Mr.forEach(o),$=l(jn),G=s(jn,"SPAN",{});var Nr=a(G);ye=i(Nr,"Models"),Nr.forEach(o),jn.forEach(o),S=l(t),K=s(t,"P",{});var Ye=a(K);In=i(Ye,`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`),hs=s(Ye,"EM",{});var Er=a(hs);$d=i(Er,"\\theta(\\mathbf{x}"),Er.forEach(o),wd=i(Ye,`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),gs=s(Ye,"CODE",{});var Ur=a(gs);Dd=i(Ur,"torch.nn.module"),Ur.forEach(o),kd=i(Ye," with basic functionality for saving and loading models both locally and from the HuggingFace hub."),Ye.forEach(o),Pr=l(t),$e=s(t,"H2",{class:!0});var ki=a($e);Re=s(ki,"A",{id:!0,class:!0,href:!0});var Zf=a(Re);_s=s(Zf,"SPAN",{});var eu=a(_s);h(zt.$$.fragment,eu),eu.forEach(o),Zf.forEach(o),Md=l(ki),bs=s(ki,"SPAN",{});var tu=a(bs);Td=i(tu,"ModelMixin"),tu.forEach(o),ki.forEach(o),Or=l(t),T=s(t,"DIV",{class:!0});var E=a(T);h(Vt.$$.fragment,E),Nd=l(E),vs=s(E,"P",{});var ou=a(vs);Ed=i(ou,"Base class for all models."),ou.forEach(o),Ud=l(E),zn=s(E,"P",{});var Rf=a(zn);Vn=s(Rf,"A",{href:!0});var nu=a(Vn);Ad=i(nu,"ModelMixin"),nu.forEach(o),Fd=i(Rf,` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),Rf.forEach(o),Cd=l(E),xs=s(E,"UL",{});var su=a(xs);de=s(su,"LI",{});var Ln=a(de);ys=s(Ln,"STRONG",{});var au=a(ys);Pd=i(au,"config_name"),au.forEach(o),Od=i(Ln," ("),$s=s(Ln,"CODE",{});var ru=a($s);qd=i(ru,"str"),ru.forEach(o),jd=i(Ln,`) \u2014 A filename under which the model should be stored when calling
`),Bn=s(Ln,"A",{href:!0});var iu=a(Bn);Ld=i(iu,"save_pretrained()"),iu.forEach(o),Id=i(Ln,"."),Ln.forEach(o),su.forEach(o),zd=l(E),le=s(E,"DIV",{class:!0});var is=a(le);h(Bt.$$.fragment,is),Vd=l(is),ws=s(is,"P",{});var du=a(ws);Bd=i(du,"Deactivates gradient checkpointing for the current model."),du.forEach(o),Sd=l(is),Ds=s(is,"P",{});var lu=a(Ds);Kd=i(lu,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),lu.forEach(o),is.forEach(o),Wd=l(E),Ge=s(E,"DIV",{class:!0});var Mi=a(Ge);h(St.$$.fragment,Mi),Xd=l(Mi),ks=s(Mi,"P",{});var cu=a(ks);Hd=i(cu,"Disable memory efficient attention as implemented in xformers."),cu.forEach(o),Mi.forEach(o),Qd=l(E),ce=s(E,"DIV",{class:!0});var ds=a(ce);h(Kt.$$.fragment,ds),Yd=l(ds),Ms=s(ds,"P",{});var mu=a(Ms);Rd=i(mu,"Activates gradient checkpointing for the current model."),mu.forEach(o),Gd=l(ds),Ts=s(ds,"P",{});var pu=a(Ts);Jd=i(pu,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),pu.forEach(o),ds.forEach(o),Zd=l(E),z=s(E,"DIV",{class:!0});var ue=a(z);h(Wt.$$.fragment,ue),el=l(ue),Ns=s(ue,"P",{});var fu=a(Ns);tl=i(fu,"Enable memory efficient attention as implemented in xformers."),fu.forEach(o),ol=l(ue),Es=s(ue,"P",{});var uu=a(Es);nl=i(uu,`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.`),uu.forEach(o),sl=l(ue),Us=s(ue,"P",{});var hu=a(Us);al=i(hu,`Warning: When Memory Efficient Attention and Sliced attention are both enabled, the Memory Efficient Attention
is used.`),hu.forEach(o),rl=l(ue),h(Je.$$.fragment,ue),ue.forEach(o),il=l(E),A=s(E,"DIV",{class:!0});var B=a(A);h(Xt.$$.fragment,B),dl=l(B),As=s(B,"P",{});var gu=a(As);ll=i(gu,"Instantiate a pretrained pytorch model from a pre-trained model configuration."),gu.forEach(o),cl=l(B),we=s(B,"P",{});var ls=a(we);ml=i(ls,"The model is set in evaluation mode by default using "),Fs=s(ls,"CODE",{});var _u=a(Fs);pl=i(_u,"model.eval()"),_u.forEach(o),fl=i(ls,` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Cs=s(ls,"CODE",{});var bu=a(Cs);ul=i(bu,"model.train()"),bu.forEach(o),hl=i(ls,"."),ls.forEach(o),gl=l(B),Ht=s(B,"P",{});var Ti=a(Ht);_l=i(Ti,"The warning "),Ps=s(Ti,"EM",{});var vu=a(Ps);bl=i(vu,"Weights from XXX not initialized from pretrained model"),vu.forEach(o),vl=i(Ti,` 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.`),Ti.forEach(o),xl=l(B),Qt=s(B,"P",{});var Ni=a(Qt);yl=i(Ni,"The warning "),Os=s(Ni,"EM",{});var xu=a(Os);$l=i(xu,"Weights from XXX not used in YYY"),xu.forEach(o),wl=i(Ni,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Ni.forEach(o),Dl=l(B),h(Ze.$$.fragment,B),kl=l(B),h(et.$$.fragment,B),B.forEach(o),Ml=l(E),tt=s(E,"DIV",{class:!0});var Ei=a(tt);h(Yt.$$.fragment,Ei),Tl=l(Ei),qs=s(Ei,"P",{});var yu=a(qs);Nl=i(yu,"Get number of (optionally, trainable or non-embeddings) parameters in the module."),yu.forEach(o),Ei.forEach(o),El=l(E),ot=s(E,"DIV",{class:!0});var Ui=a(ot);h(Rt.$$.fragment,Ui),Ul=l(Ui),Gt=s(Ui,"P",{});var Ai=a(Gt);Al=i(Ai,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),js=s(Ai,"CODE",{});var $u=a(js);Fl=i($u,"[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.ModelMixin.from_pretrained)"),$u.forEach(o),Cl=i(Ai," class method."),Ai.forEach(o),Ui.forEach(o),E.forEach(o),qr=l(t),De=s(t,"H2",{class:!0});var Fi=a(De);nt=s(Fi,"A",{id:!0,class:!0,href:!0});var wu=a(nt);Ls=s(wu,"SPAN",{});var Du=a(Ls);h(Jt.$$.fragment,Du),Du.forEach(o),wu.forEach(o),Pl=l(Fi),Is=s(Fi,"SPAN",{});var ku=a(Is);Ol=i(ku,"UNet2DOutput"),ku.forEach(o),Fi.forEach(o),jr=l(t),Zt=s(t,"DIV",{class:!0});var Mu=a(Zt);h(eo.$$.fragment,Mu),Mu.forEach(o),Lr=l(t),ke=s(t,"H2",{class:!0});var Ci=a(ke);st=s(Ci,"A",{id:!0,class:!0,href:!0});var Tu=a(st);zs=s(Tu,"SPAN",{});var Nu=a(zs);h(to.$$.fragment,Nu),Nu.forEach(o),Tu.forEach(o),ql=l(Ci),Vs=s(Ci,"SPAN",{});var Eu=a(Vs);jl=i(Eu,"UNet2DModel"),Eu.forEach(o),Ci.forEach(o),Ir=l(t),W=s(t,"DIV",{class:!0});var Ct=a(W);h(oo.$$.fragment,Ct),Ll=l(Ct),Bs=s(Ct,"P",{});var Uu=a(Bs);Il=i(Uu,"UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Uu.forEach(o),zl=l(Ct),no=s(Ct,"P",{});var Pi=a(no);Vl=i(Pi,"This model inherits from "),Sn=s(Pi,"A",{href:!0});var Au=a(Sn);Bl=i(Au,"ModelMixin"),Au.forEach(o),Sl=i(Pi,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Pi.forEach(o),Kl=l(Ct),Kn=s(Ct,"DIV",{class:!0});var Fu=a(Kn);h(so.$$.fragment,Fu),Fu.forEach(o),Ct.forEach(o),zr=l(t),Me=s(t,"H2",{class:!0});var Oi=a(Me);at=s(Oi,"A",{id:!0,class:!0,href:!0});var Cu=a(at);Ss=s(Cu,"SPAN",{});var Pu=a(Ss);h(ao.$$.fragment,Pu),Pu.forEach(o),Cu.forEach(o),Wl=l(Oi),Ks=s(Oi,"SPAN",{});var Ou=a(Ks);Xl=i(Ou,"UNet1DOutput"),Ou.forEach(o),Oi.forEach(o),Vr=l(t),ro=s(t,"DIV",{class:!0});var qu=a(ro);h(io.$$.fragment,qu),qu.forEach(o),Br=l(t),Te=s(t,"H2",{class:!0});var qi=a(Te);rt=s(qi,"A",{id:!0,class:!0,href:!0});var ju=a(rt);Ws=s(ju,"SPAN",{});var Lu=a(Ws);h(lo.$$.fragment,Lu),Lu.forEach(o),ju.forEach(o),Hl=l(qi),Xs=s(qi,"SPAN",{});var Iu=a(Xs);Ql=i(Iu,"UNet1DModel"),Iu.forEach(o),qi.forEach(o),Sr=l(t),X=s(t,"DIV",{class:!0});var Pt=a(X);h(co.$$.fragment,Pt),Yl=l(Pt),Hs=s(Pt,"P",{});var zu=a(Hs);Rl=i(zu,"UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),zu.forEach(o),Gl=l(Pt),mo=s(Pt,"P",{});var ji=a(mo);Jl=i(ji,"This model inherits from "),Wn=s(ji,"A",{href:!0});var Vu=a(Wn);Zl=i(Vu,"ModelMixin"),Vu.forEach(o),ec=i(ji,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),ji.forEach(o),tc=l(Pt),Xn=s(Pt,"DIV",{class:!0});var Bu=a(Xn);h(po.$$.fragment,Bu),Bu.forEach(o),Pt.forEach(o),Kr=l(t),Ne=s(t,"H2",{class:!0});var Li=a(Ne);it=s(Li,"A",{id:!0,class:!0,href:!0});var Su=a(it);Qs=s(Su,"SPAN",{});var Ku=a(Qs);h(fo.$$.fragment,Ku),Ku.forEach(o),Su.forEach(o),oc=l(Li),Ys=s(Li,"SPAN",{});var Wu=a(Ys);nc=i(Wu,"UNet2DConditionOutput"),Wu.forEach(o),Li.forEach(o),Wr=l(t),uo=s(t,"DIV",{class:!0});var Xu=a(uo);h(ho.$$.fragment,Xu),Xu.forEach(o),Xr=l(t),Ee=s(t,"H2",{class:!0});var Ii=a(Ee);dt=s(Ii,"A",{id:!0,class:!0,href:!0});var Hu=a(dt);Rs=s(Hu,"SPAN",{});var Qu=a(Rs);h(go.$$.fragment,Qu),Qu.forEach(o),Hu.forEach(o),sc=l(Ii),Gs=s(Ii,"SPAN",{});var Yu=a(Gs);ac=i(Yu,"UNet2DConditionModel"),Yu.forEach(o),Ii.forEach(o),Hr=l(t),F=s(t,"DIV",{class:!0});var ee=a(F);h(_o.$$.fragment,ee),rc=l(ee),Js=s(ee,"P",{});var Ru=a(Js);ic=i(Ru,`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Ru.forEach(o),dc=l(ee),bo=s(ee,"P",{});var zi=a(bo);lc=i(zi,"This model inherits from "),Hn=s(zi,"A",{href:!0});var Gu=a(Hn);cc=i(Gu,"ModelMixin"),Gu.forEach(o),mc=i(zi,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),zi.forEach(o),pc=l(ee),Qn=s(ee,"DIV",{class:!0});var Ju=a(Qn);h(vo.$$.fragment,Ju),Ju.forEach(o),fc=l(ee),me=s(ee,"DIV",{class:!0});var cs=a(me);h(xo.$$.fragment,cs),uc=l(cs),Zs=s(cs,"P",{});var Zu=a(Zs);hc=i(Zu,"Enable sliced attention computation."),Zu.forEach(o),gc=l(cs),ea=s(cs,"P",{});var eh=a(ea);_c=i(eh,`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.`),eh.forEach(o),cs.forEach(o),bc=l(ee),Yn=s(ee,"DIV",{class:!0});var th=a(Yn);h(yo.$$.fragment,th),th.forEach(o),ee.forEach(o),Qr=l(t),Ue=s(t,"H2",{class:!0});var Vi=a(Ue);lt=s(Vi,"A",{id:!0,class:!0,href:!0});var oh=a(lt);ta=s(oh,"SPAN",{});var nh=a(ta);h($o.$$.fragment,nh),nh.forEach(o),oh.forEach(o),vc=l(Vi),oa=s(Vi,"SPAN",{});var sh=a(oa);xc=i(sh,"DecoderOutput"),sh.forEach(o),Vi.forEach(o),Yr=l(t),Ae=s(t,"DIV",{class:!0});var Bi=a(Ae);h(wo.$$.fragment,Bi),yc=l(Bi),na=s(Bi,"P",{});var ah=a(na);$c=i(ah,"Output of decoding method."),ah.forEach(o),Bi.forEach(o),Rr=l(t),Fe=s(t,"H2",{class:!0});var Si=a(Fe);ct=s(Si,"A",{id:!0,class:!0,href:!0});var rh=a(ct);sa=s(rh,"SPAN",{});var ih=a(sa);h(Do.$$.fragment,ih),ih.forEach(o),rh.forEach(o),wc=l(Si),aa=s(Si,"SPAN",{});var dh=a(aa);Dc=i(dh,"VQEncoderOutput"),dh.forEach(o),Si.forEach(o),Gr=l(t),Ce=s(t,"DIV",{class:!0});var Ki=a(Ce);h(ko.$$.fragment,Ki),kc=l(Ki),ra=s(Ki,"P",{});var lh=a(ra);Mc=i(lh,"Output of VQModel encoding method."),lh.forEach(o),Ki.forEach(o),Jr=l(t),Pe=s(t,"H2",{class:!0});var Wi=a(Pe);mt=s(Wi,"A",{id:!0,class:!0,href:!0});var ch=a(mt);ia=s(ch,"SPAN",{});var mh=a(ia);h(Mo.$$.fragment,mh),mh.forEach(o),ch.forEach(o),Tc=l(Wi),da=s(Wi,"SPAN",{});var ph=a(da);Nc=i(ph,"VQModel"),ph.forEach(o),Wi.forEach(o),Zr=l(t),H=s(t,"DIV",{class:!0});var Ot=a(H);h(To.$$.fragment,Ot),Ec=l(Ot),la=s(Ot,"P",{});var fh=a(la);Uc=i(fh,`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),fh.forEach(o),Ac=l(Ot),No=s(Ot,"P",{});var Xi=a(No);Fc=i(Xi,"This model inherits from "),Rn=s(Xi,"A",{href:!0});var uh=a(Rn);Cc=i(uh,"ModelMixin"),uh.forEach(o),Pc=i(Xi,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Xi.forEach(o),Oc=l(Ot),Gn=s(Ot,"DIV",{class:!0});var hh=a(Gn);h(Eo.$$.fragment,hh),hh.forEach(o),Ot.forEach(o),ei=l(t),Oe=s(t,"H2",{class:!0});var Hi=a(Oe);pt=s(Hi,"A",{id:!0,class:!0,href:!0});var gh=a(pt);ca=s(gh,"SPAN",{});var _h=a(ca);h(Uo.$$.fragment,_h),_h.forEach(o),gh.forEach(o),qc=l(Hi),ma=s(Hi,"SPAN",{});var bh=a(ma);jc=i(bh,"AutoencoderKLOutput"),bh.forEach(o),Hi.forEach(o),ti=l(t),qe=s(t,"DIV",{class:!0});var Qi=a(qe);h(Ao.$$.fragment,Qi),Lc=l(Qi),pa=s(Qi,"P",{});var vh=a(pa);Ic=i(vh,"Output of AutoencoderKL encoding method."),vh.forEach(o),Qi.forEach(o),oi=l(t),je=s(t,"H2",{class:!0});var Yi=a(je);ft=s(Yi,"A",{id:!0,class:!0,href:!0});var xh=a(ft);fa=s(xh,"SPAN",{});var yh=a(fa);h(Fo.$$.fragment,yh),yh.forEach(o),xh.forEach(o),zc=l(Yi),ua=s(Yi,"SPAN",{});var $h=a(ua);Vc=i($h,"AutoencoderKL"),$h.forEach(o),Yi.forEach(o),ni=l(t),C=s(t,"DIV",{class:!0});var te=a(C);h(Co.$$.fragment,te),Bc=l(te),ha=s(te,"P",{});var wh=a(ha);Sc=i(wh,`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),wh.forEach(o),Kc=l(te),Po=s(te,"P",{});var Ri=a(Po);Wc=i(Ri,"This model inherits from "),Jn=s(Ri,"A",{href:!0});var Dh=a(Jn);Xc=i(Dh,"ModelMixin"),Dh.forEach(o),Hc=i(Ri,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Ri.forEach(o),Qc=l(te),ut=s(te,"DIV",{class:!0});var Gi=a(ut);h(Oo.$$.fragment,Gi),Yc=l(Gi),qo=s(Gi,"P",{});var Ji=a(qo);Rc=i(Ji,"Disable sliced VAE decoding. If "),ga=s(Ji,"CODE",{});var kh=a(ga);Gc=i(kh,"enable_slicing"),kh.forEach(o),Jc=i(Ji,` was previously invoked, this method will go back to computing
decoding in one step.`),Ji.forEach(o),Gi.forEach(o),Zc=l(te),pe=s(te,"DIV",{class:!0});var ms=a(pe);h(jo.$$.fragment,ms),em=l(ms),_a=s(ms,"P",{});var Mh=a(_a);tm=i(Mh,"Enable sliced VAE decoding."),Mh.forEach(o),om=l(ms),ba=s(ms,"P",{});var Th=a(ba);nm=i(Th,`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.`),Th.forEach(o),ms.forEach(o),sm=l(te),Zn=s(te,"DIV",{class:!0});var Nh=a(Zn);h(Lo.$$.fragment,Nh),Nh.forEach(o),te.forEach(o),si=l(t),Le=s(t,"H2",{class:!0});var Zi=a(Le);ht=s(Zi,"A",{id:!0,class:!0,href:!0});var Eh=a(ht);va=s(Eh,"SPAN",{});var Uh=a(va);h(Io.$$.fragment,Uh),Uh.forEach(o),Eh.forEach(o),am=l(Zi),xa=s(Zi,"SPAN",{});var Ah=a(xa);rm=i(Ah,"Transformer2DModel"),Ah.forEach(o),Zi.forEach(o),ai=l(t),P=s(t,"DIV",{class:!0});var oe=a(P);h(zo.$$.fragment,oe),im=l(oe),ya=s(oe,"P",{});var Fh=a(ya);dm=i(Fh,`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),Fh.forEach(o),lm=l(oe),$a=s(oe,"P",{});var Ch=a($a);cm=i(Ch,`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.`),Ch.forEach(o),mm=l(oe),Vo=s(oe,"P",{});var ed=a(Vo);pm=i(ed,`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),wa=s(ed,"CODE",{});var Ph=a(wa);fm=i(Ph,"ImagePositionalEmbeddings"),Ph.forEach(o),um=i(ed,`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),ed.forEach(o),hm=l(oe),Da=s(oe,"P",{});var Oh=a(Da);gm=i(Oh,`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.`),Oh.forEach(o),_m=l(oe),es=s(oe,"DIV",{class:!0});var qh=a(es);h(Bo.$$.fragment,qh),qh.forEach(o),oe.forEach(o),ri=l(t),Ie=s(t,"H2",{class:!0});var td=a(Ie);gt=s(td,"A",{id:!0,class:!0,href:!0});var jh=a(gt);ka=s(jh,"SPAN",{});var Lh=a(ka);h(So.$$.fragment,Lh),Lh.forEach(o),jh.forEach(o),bm=l(td),Ma=s(td,"SPAN",{});var Ih=a(Ma);vm=i(Ih,"Transformer2DModelOutput"),Ih.forEach(o),td.forEach(o),ii=l(t),Ko=s(t,"DIV",{class:!0});var zh=a(Ko);h(Wo.$$.fragment,zh),zh.forEach(o),di=l(t),ze=s(t,"H2",{class:!0});var od=a(ze);_t=s(od,"A",{id:!0,class:!0,href:!0});var Vh=a(_t);Ta=s(Vh,"SPAN",{});var Bh=a(Ta);h(Xo.$$.fragment,Bh),Bh.forEach(o),Vh.forEach(o),xm=l(od),Na=s(od,"SPAN",{});var Sh=a(Na);ym=i(Sh,"PriorTransformer"),Sh.forEach(o),od.forEach(o),li=l(t),L=s(t,"DIV",{class:!0});var he=a(L);h(Ho.$$.fragment,he),$m=l(he),Ea=s(he,"P",{});var Kh=a(Ea);wm=i(Kh,`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.`),Kh.forEach(o),Dm=l(he),Qo=s(he,"P",{});var nd=a(Qo);km=i(nd,"This model inherits from "),ts=s(nd,"A",{href:!0});var Wh=a(ts);Mm=i(Wh,"ModelMixin"),Wh.forEach(o),Tm=i(nd,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),nd.forEach(o),Nm=l(he),os=s(he,"P",{});var Gf=a(os);Em=i(Gf,"For more details, see the original paper: "),Yo=s(Gf,"A",{href:!0,rel:!0});var Xh=a(Yo);Um=i(Xh,"https://arxiv.org/abs/2204.06125"),Xh.forEach(o),Gf.forEach(o),Am=l(he),ns=s(he,"DIV",{class:!0});var Hh=a(ns);h(Ro.$$.fragment,Hh),Hh.forEach(o),he.forEach(o),ci=l(t),Ve=s(t,"H2",{class:!0});var sd=a(Ve);bt=s(sd,"A",{id:!0,class:!0,href:!0});var Qh=a(bt);Ua=s(Qh,"SPAN",{});var Yh=a(Ua);h(Go.$$.fragment,Yh),Yh.forEach(o),Qh.forEach(o),Fm=l(sd),Aa=s(sd,"SPAN",{});var Rh=a(Aa);Cm=i(Rh,"PriorTransformerOutput"),Rh.forEach(o),sd.forEach(o),mi=l(t),Jo=s(t,"DIV",{class:!0});var Gh=a(Jo);h(Zo.$$.fragment,Gh),Gh.forEach(o),pi=l(t),Be=s(t,"H2",{class:!0});var ad=a(Be);vt=s(ad,"A",{id:!0,class:!0,href:!0});var Jh=a(vt);Fa=s(Jh,"SPAN",{});var Zh=a(Fa);h(en.$$.fragment,Zh),Zh.forEach(o),Jh.forEach(o),Pm=l(ad),Ca=s(ad,"SPAN",{});var eg=a(Ca);Om=i(eg,"FlaxModelMixin"),eg.forEach(o),ad.forEach(o),fi=l(t),U=s(t,"DIV",{class:!0});var j=a(U);h(tn.$$.fragment,j),qm=l(j),Pa=s(j,"P",{});var tg=a(Pa);jm=i(tg,"Base class for all flax models."),tg.forEach(o),Lm=l(j),ss=s(j,"P",{});var Jf=a(ss);as=s(Jf,"A",{href:!0});var og=a(as);Im=i(og,"FlaxModelMixin"),og.forEach(o),zm=i(Jf,` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Jf.forEach(o),Vm=l(j),V=s(j,"DIV",{class:!0});var ge=a(V);h(on.$$.fragment,ge),Bm=l(ge),Oa=s(ge,"P",{});var ng=a(Oa);Sm=i(ng,"Instantiate a pretrained flax model from a pre-trained model configuration."),ng.forEach(o),Km=l(ge),nn=s(ge,"P",{});var rd=a(nn);Wm=i(rd,"The warning "),qa=s(rd,"EM",{});var sg=a(qa);Xm=i(sg,"Weights from XXX not initialized from pretrained model"),sg.forEach(o),Hm=i(rd,` 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.`),rd.forEach(o),Qm=l(ge),sn=s(ge,"P",{});var id=a(sn);Ym=i(id,"The warning "),ja=s(id,"EM",{});var ag=a(ja);Rm=i(ag,"Weights from XXX not used in YYY"),ag.forEach(o),Gm=i(id,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),id.forEach(o),Jm=l(ge),h(xt.$$.fragment,ge),ge.forEach(o),Zm=l(j),yt=s(j,"DIV",{class:!0});var dd=a(yt);h(an.$$.fragment,dd),ep=l(dd),rn=s(dd,"P",{});var ld=a(rn);tp=i(ld,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),La=s(ld,"CODE",{});var rg=a(La);op=i(rg,"[from_pretrained()](/docs/diffusers/main/en/api/models#diffusers.FlaxModelMixin.from_pretrained)"),rg.forEach(o),np=i(ld," class method"),ld.forEach(o),dd.forEach(o),sp=l(j),J=s(j,"DIV",{class:!0});var qt=a(J);h(dn.$$.fragment,qt),ap=l(qt),Q=s(qt,"P",{});var _e=a(Q);rp=i(_e,"Cast the floating-point "),Ia=s(_e,"CODE",{});var ig=a(Ia);ip=i(ig,"params"),ig.forEach(o),dp=i(_e," to "),za=s(_e,"CODE",{});var dg=a(za);lp=i(dg,"jax.numpy.bfloat16"),dg.forEach(o),cp=i(_e,". This returns a new "),Va=s(_e,"CODE",{});var lg=a(Va);mp=i(lg,"params"),lg.forEach(o),pp=i(_e,` tree and does not cast
the `),Ba=s(_e,"CODE",{});var cg=a(Ba);fp=i(cg,"params"),cg.forEach(o),up=i(_e," in place."),_e.forEach(o),hp=l(qt),Sa=s(qt,"P",{});var mg=a(Sa);gp=i(mg,`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.`),mg.forEach(o),_p=l(qt),h($t.$$.fragment,qt),qt.forEach(o),bp=l(j),Z=s(j,"DIV",{class:!0});var jt=a(Z);h(ln.$$.fragment,jt),vp=l(jt),Y=s(jt,"P",{});var be=a(Y);xp=i(be,"Cast the floating-point "),Ka=s(be,"CODE",{});var pg=a(Ka);yp=i(pg,"params"),pg.forEach(o),$p=i(be," to "),Wa=s(be,"CODE",{});var fg=a(Wa);wp=i(fg,"jax.numpy.float16"),fg.forEach(o),Dp=i(be,". This returns a new "),Xa=s(be,"CODE",{});var ug=a(Xa);kp=i(ug,"params"),ug.forEach(o),Mp=i(be,` tree and does not cast the
`),Ha=s(be,"CODE",{});var hg=a(Ha);Tp=i(hg,"params"),hg.forEach(o),Np=i(be," in place."),be.forEach(o),Ep=l(jt),Qa=s(jt,"P",{});var gg=a(Qa);Up=i(gg,`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.`),gg.forEach(o),Ap=l(jt),h(wt.$$.fragment,jt),jt.forEach(o),Fp=l(j),fe=s(j,"DIV",{class:!0});var ps=a(fe);h(cn.$$.fragment,ps),Cp=l(ps),R=s(ps,"P",{});var ve=a(R);Pp=i(ve,"Cast the floating-point "),Ya=s(ve,"CODE",{});var _g=a(Ya);Op=i(_g,"params"),_g.forEach(o),qp=i(ve," to "),Ra=s(ve,"CODE",{});var bg=a(Ra);jp=i(bg,"jax.numpy.float32"),bg.forEach(o),Lp=i(ve,`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Ga=s(ve,"CODE",{});var vg=a(Ga);Ip=i(vg,"params"),vg.forEach(o),zp=i(ve," tree and does not cast the "),Ja=s(ve,"CODE",{});var xg=a(Ja);Vp=i(xg,"params"),xg.forEach(o),Bp=i(ve," in place."),ve.forEach(o),Sp=l(ps),h(Dt.$$.fragment,ps),ps.forEach(o),j.forEach(o),ui=l(t),Se=s(t,"H2",{class:!0});var cd=a(Se);kt=s(cd,"A",{id:!0,class:!0,href:!0});var yg=a(kt);Za=s(yg,"SPAN",{});var $g=a(Za);h(mn.$$.fragment,$g),$g.forEach(o),yg.forEach(o),Kp=l(cd),er=s(cd,"SPAN",{});var wg=a(er);Wp=i(wg,"FlaxUNet2DConditionOutput"),wg.forEach(o),cd.forEach(o),hi=l(t),Ke=s(t,"DIV",{class:!0});var md=a(Ke);h(pn.$$.fragment,md),Xp=l(md),Mt=s(md,"DIV",{class:!0});var pd=a(Mt);h(fn.$$.fragment,pd),Hp=l(pd),tr=s(pd,"P",{});var Dg=a(tr);Qp=i(Dg,"\u201CReturns a new object replacing the specified fields with new values."),Dg.forEach(o),pd.forEach(o),md.forEach(o),gi=l(t),We=s(t,"H2",{class:!0});var fd=a(We);Tt=s(fd,"A",{id:!0,class:!0,href:!0});var kg=a(Tt);or=s(kg,"SPAN",{});var Mg=a(or);h(un.$$.fragment,Mg),Mg.forEach(o),kg.forEach(o),Yp=l(fd),nr=s(fd,"SPAN",{});var Tg=a(nr);Rp=i(Tg,"FlaxUNet2DConditionModel"),Tg.forEach(o),fd.forEach(o),_i=l(t),O=s(t,"DIV",{class:!0});var ne=a(O);h(hn.$$.fragment,ne),Gp=l(ne),sr=s(ne,"P",{});var Ng=a(sr);Jp=i(Ng,`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),Ng.forEach(o),Zp=l(ne),gn=s(ne,"P",{});var ud=a(gn);ef=i(ud,"This model inherits from "),rs=s(ud,"A",{href:!0});var Eg=a(rs);tf=i(Eg,"FlaxModelMixin"),Eg.forEach(o),of=i(ud,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),ud.forEach(o),nf=l(ne),_n=s(ne,"P",{});var hd=a(_n);sf=i(hd,"Also, this model is a Flax Linen "),bn=s(hd,"A",{href:!0,rel:!0});var Ug=a(bn);af=i(Ug,"flax.linen.Module"),Ug.forEach(o),rf=i(hd,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hd.forEach(o),df=l(ne),ar=s(ne,"P",{});var Ag=a(ar);lf=i(Ag,"Finally, this model supports inherent JAX features such as:"),Ag.forEach(o),cf=l(ne),se=s(ne,"UL",{});var Lt=a(se);rr=s(Lt,"LI",{});var Fg=a(rr);vn=s(Fg,"A",{href:!0,rel:!0});var Cg=a(vn);mf=i(Cg,"Just-In-Time (JIT) compilation"),Cg.forEach(o),Fg.forEach(o),pf=l(Lt),ir=s(Lt,"LI",{});var Pg=a(ir);xn=s(Pg,"A",{href:!0,rel:!0});var Og=a(xn);ff=i(Og,"Automatic Differentiation"),Og.forEach(o),Pg.forEach(o),uf=l(Lt),dr=s(Lt,"LI",{});var qg=a(dr);yn=s(qg,"A",{href:!0,rel:!0});var jg=a(yn);hf=i(jg,"Vectorization"),jg.forEach(o),qg.forEach(o),gf=l(Lt),lr=s(Lt,"LI",{});var Lg=a(lr);$n=s(Lg,"A",{href:!0,rel:!0});var Ig=a($n);_f=i(Ig,"Parallelization"),Ig.forEach(o),Lg.forEach(o),Lt.forEach(o),ne.forEach(o),bi=l(t),Xe=s(t,"H2",{class:!0});var gd=a(Xe);Nt=s(gd,"A",{id:!0,class:!0,href:!0});var zg=a(Nt);cr=s(zg,"SPAN",{});var Vg=a(cr);h(wn.$$.fragment,Vg),Vg.forEach(o),zg.forEach(o),bf=l(gd),mr=s(gd,"SPAN",{});var Bg=a(mr);vf=i(Bg,"FlaxDecoderOutput"),Bg.forEach(o),gd.forEach(o),vi=l(t),ae=s(t,"DIV",{class:!0});var fs=a(ae);h(Dn.$$.fragment,fs),xf=l(fs),pr=s(fs,"P",{});var Sg=a(pr);yf=i(Sg,"Output of decoding method."),Sg.forEach(o),$f=l(fs),Et=s(fs,"DIV",{class:!0});var _d=a(Et);h(kn.$$.fragment,_d),wf=l(_d),fr=s(_d,"P",{});var Kg=a(fr);Df=i(Kg,"\u201CReturns a new object replacing the specified fields with new values."),Kg.forEach(o),_d.forEach(o),fs.forEach(o),xi=l(t),He=s(t,"H2",{class:!0});var bd=a(He);Ut=s(bd,"A",{id:!0,class:!0,href:!0});var Wg=a(Ut);ur=s(Wg,"SPAN",{});var Xg=a(ur);h(Mn.$$.fragment,Xg),Xg.forEach(o),Wg.forEach(o),kf=l(bd),hr=s(bd,"SPAN",{});var Hg=a(hr);Mf=i(Hg,"FlaxAutoencoderKLOutput"),Hg.forEach(o),bd.forEach(o),yi=l(t),re=s(t,"DIV",{class:!0});var us=a(re);h(Tn.$$.fragment,us),Tf=l(us),gr=s(us,"P",{});var Qg=a(gr);Nf=i(Qg,"Output of AutoencoderKL encoding method."),Qg.forEach(o),Ef=l(us),At=s(us,"DIV",{class:!0});var vd=a(At);h(Nn.$$.fragment,vd),Uf=l(vd),_r=s(vd,"P",{});var Yg=a(_r);Af=i(Yg,"\u201CReturns a new object replacing the specified fields with new values."),Yg.forEach(o),vd.forEach(o),us.forEach(o),$i=l(t),Qe=s(t,"H2",{class:!0});var xd=a(Qe);Ft=s(xd,"A",{id:!0,class:!0,href:!0});var Rg=a(Ft);br=s(Rg,"SPAN",{});var Gg=a(br);h(En.$$.fragment,Gg),Gg.forEach(o),Rg.forEach(o),Ff=l(xd),vr=s(xd,"SPAN",{});var Jg=a(vr);Cf=i(Jg,"FlaxAutoencoderKL"),Jg.forEach(o),xd.forEach(o),wi=l(t),I=s(t,"DIV",{class:!0});var xe=a(I);h(Un.$$.fragment,xe),Pf=l(xe),xr=s(xe,"P",{});var Zg=a(xr);Of=i(Zg,`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),Zg.forEach(o),qf=l(xe),An=s(xe,"P",{});var yd=a(An);jf=i(yd,"This model is a Flax Linen "),Fn=s(yd,"A",{href:!0,rel:!0});var e_=a(Fn);Lf=i(e_,"flax.linen.Module"),e_.forEach(o),If=i(yd,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),yd.forEach(o),zf=l(xe),yr=s(xe,"P",{});var t_=a(yr);Vf=i(t_,"Finally, this model supports inherent JAX features such as:"),t_.forEach(o),Bf=l(xe),ie=s(xe,"UL",{});var It=a(ie);$r=s(It,"LI",{});var o_=a($r);Cn=s(o_,"A",{href:!0,rel:!0});var n_=a(Cn);Sf=i(n_,"Just-In-Time (JIT) compilation"),n_.forEach(o),o_.forEach(o),Kf=l(It),wr=s(It,"LI",{});var s_=a(wr);Pn=s(s_,"A",{href:!0,rel:!0});var a_=a(Pn);Wf=i(a_,"Automatic Differentiation"),a_.forEach(o),s_.forEach(o),Xf=l(It),Dr=s(It,"LI",{});var r_=a(Dr);On=s(r_,"A",{href:!0,rel:!0});var i_=a(On);Hf=i(i_,"Vectorization"),i_.forEach(o),r_.forEach(o),Qf=l(It),kr=s(It,"LI",{});var d_=a(kr);qn=s(d_,"A",{href:!0,rel:!0});var l_=a(qn);Yf=i(l_,"Parallelization"),l_.forEach(o),d_.forEach(o),It.forEach(o),xe.forEach(o),this.h()},h(){c(x,"name","hf:doc:metadata"),c(x,"content",JSON.stringify(D_)),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(Re,"id","diffusers.ModelMixin"),c(Re,"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(Re,"href","#diffusers.ModelMixin"),c($e,"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(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(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(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(ot,"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(nt,"id","diffusers.models.unet_2d.UNet2DOutput"),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_2d.UNet2DOutput"),c(De,"class","relative group"),c(Zt,"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.UNet2DModel"),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.UNet2DModel"),c(ke,"class","relative group"),c(Sn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Kn,"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(at,"id","diffusers.models.unet_1d.UNet1DOutput"),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.models.unet_1d.UNet1DOutput"),c(Me,"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(rt,"id","diffusers.UNet1DModel"),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.UNet1DModel"),c(Te,"class","relative group"),c(Wn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Xn,"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(it,"id","diffusers.models.unet_2d_condition.UNet2DConditionOutput"),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.unet_2d_condition.UNet2DConditionOutput"),c(Ne,"class","relative group"),c(uo,"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.UNet2DConditionModel"),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.UNet2DConditionModel"),c(Ee,"class","relative group"),c(Hn,"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(Yn,"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(lt,"id","diffusers.models.vae.DecoderOutput"),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.models.vae.DecoderOutput"),c(Ue,"class","relative group"),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(ct,"id","diffusers.models.vq_model.VQEncoderOutput"),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.vq_model.VQEncoderOutput"),c(Fe,"class","relative group"),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(mt,"id","diffusers.VQModel"),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.VQModel"),c(Pe,"class","relative group"),c(Rn,"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(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pt,"id","diffusers.models.autoencoder_kl.AutoencoderKLOutput"),c(pt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(pt,"href","#diffusers.models.autoencoder_kl.AutoencoderKLOutput"),c(Oe,"class","relative group"),c(qe,"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.AutoencoderKL"),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.AutoencoderKL"),c(je,"class","relative group"),c(Jn,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(ut,"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(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(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(ht,"id","diffusers.Transformer2DModel"),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.Transformer2DModel"),c(Le,"class","relative group"),c(es,"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(gt,"id","diffusers.models.transformer_2d.Transformer2DModelOutput"),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.transformer_2d.Transformer2DModelOutput"),c(Ie,"class","relative group"),c(Ko,"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.PriorTransformer"),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.PriorTransformer"),c(ze,"class","relative group"),c(ts,"href","/docs/diffusers/main/en/api/models#diffusers.ModelMixin"),c(Yo,"href","https://arxiv.org/abs/2204.06125"),c(Yo,"rel","nofollow"),c(ns,"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(bt,"id","diffusers.models.prior_transformer.PriorTransformerOutput"),c(bt,"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(bt,"href","#diffusers.models.prior_transformer.PriorTransformerOutput"),c(Ve,"class","relative group"),c(Jo,"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,"id","diffusers.FlaxModelMixin"),c(vt,"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(vt,"href","#diffusers.FlaxModelMixin"),c(Be,"class","relative group"),c(as,"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(yt,"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(kt,"id","diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),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.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),c(Se,"class","relative group"),c(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ke,"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.FlaxUNet2DConditionModel"),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.FlaxUNet2DConditionModel"),c(We,"class","relative group"),c(rs,"href","/docs/diffusers/main/en/api/models#diffusers.FlaxModelMixin"),c(bn,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(bn,"rel","nofollow"),c(vn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(vn,"rel","nofollow"),c(xn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(xn,"rel","nofollow"),c(yn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(yn,"rel","nofollow"),c($n,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c($n,"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(Nt,"id","diffusers.models.vae_flax.FlaxDecoderOutput"),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.vae_flax.FlaxDecoderOutput"),c(Xe,"class","relative group"),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(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.models.vae_flax.FlaxAutoencoderKLOutput"),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.vae_flax.FlaxAutoencoderKLOutput"),c(He,"class","relative group"),c(At,"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(Ft,"id","diffusers.FlaxAutoencoderKL"),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.FlaxAutoencoderKL"),c(Qe,"class","relative group"),c(Fn,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Fn,"rel","nofollow"),c(Cn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Cn,"rel","nofollow"),c(Pn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Pn,"rel","nofollow"),c(On,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(On,"rel","nofollow"),c(qn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(qn,"rel","nofollow"),c(I,"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,$),e(w,G),e(G,ye),p(t,S,m),p(t,K,m),e(K,In),e(K,hs),e(hs,$d),e(K,wd),e(K,gs),e(gs,Dd),e(K,kd),p(t,Pr,m),p(t,$e,m),e($e,Re),e(Re,_s),g(zt,_s,null),e($e,Md),e($e,bs),e(bs,Td),p(t,Or,m),p(t,T,m),g(Vt,T,null),e(T,Nd),e(T,vs),e(vs,Ed),e(T,Ud),e(T,zn),e(zn,Vn),e(Vn,Ad),e(zn,Fd),e(T,Cd),e(T,xs),e(xs,de),e(de,ys),e(ys,Pd),e(de,Od),e(de,$s),e($s,qd),e(de,jd),e(de,Bn),e(Bn,Ld),e(de,Id),e(T,zd),e(T,le),g(Bt,le,null),e(le,Vd),e(le,ws),e(ws,Bd),e(le,Sd),e(le,Ds),e(Ds,Kd),e(T,Wd),e(T,Ge),g(St,Ge,null),e(Ge,Xd),e(Ge,ks),e(ks,Hd),e(T,Qd),e(T,ce),g(Kt,ce,null),e(ce,Yd),e(ce,Ms),e(Ms,Rd),e(ce,Gd),e(ce,Ts),e(Ts,Jd),e(T,Zd),e(T,z),g(Wt,z,null),e(z,el),e(z,Ns),e(Ns,tl),e(z,ol),e(z,Es),e(Es,nl),e(z,sl),e(z,Us),e(Us,al),e(z,rl),g(Je,z,null),e(T,il),e(T,A),g(Xt,A,null),e(A,dl),e(A,As),e(As,ll),e(A,cl),e(A,we),e(we,ml),e(we,Fs),e(Fs,pl),e(we,fl),e(we,Cs),e(Cs,ul),e(we,hl),e(A,gl),e(A,Ht),e(Ht,_l),e(Ht,Ps),e(Ps,bl),e(Ht,vl),e(A,xl),e(A,Qt),e(Qt,yl),e(Qt,Os),e(Os,$l),e(Qt,wl),e(A,Dl),g(Ze,A,null),e(A,kl),g(et,A,null),e(T,Ml),e(T,tt),g(Yt,tt,null),e(tt,Tl),e(tt,qs),e(qs,Nl),e(T,El),e(T,ot),g(Rt,ot,null),e(ot,Ul),e(ot,Gt),e(Gt,Al),e(Gt,js),e(js,Fl),e(Gt,Cl),p(t,qr,m),p(t,De,m),e(De,nt),e(nt,Ls),g(Jt,Ls,null),e(De,Pl),e(De,Is),e(Is,Ol),p(t,jr,m),p(t,Zt,m),g(eo,Zt,null),p(t,Lr,m),p(t,ke,m),e(ke,st),e(st,zs),g(to,zs,null),e(ke,ql),e(ke,Vs),e(Vs,jl),p(t,Ir,m),p(t,W,m),g(oo,W,null),e(W,Ll),e(W,Bs),e(Bs,Il),e(W,zl),e(W,no),e(no,Vl),e(no,Sn),e(Sn,Bl),e(no,Sl),e(W,Kl),e(W,Kn),g(so,Kn,null),p(t,zr,m),p(t,Me,m),e(Me,at),e(at,Ss),g(ao,Ss,null),e(Me,Wl),e(Me,Ks),e(Ks,Xl),p(t,Vr,m),p(t,ro,m),g(io,ro,null),p(t,Br,m),p(t,Te,m),e(Te,rt),e(rt,Ws),g(lo,Ws,null),e(Te,Hl),e(Te,Xs),e(Xs,Ql),p(t,Sr,m),p(t,X,m),g(co,X,null),e(X,Yl),e(X,Hs),e(Hs,Rl),e(X,Gl),e(X,mo),e(mo,Jl),e(mo,Wn),e(Wn,Zl),e(mo,ec),e(X,tc),e(X,Xn),g(po,Xn,null),p(t,Kr,m),p(t,Ne,m),e(Ne,it),e(it,Qs),g(fo,Qs,null),e(Ne,oc),e(Ne,Ys),e(Ys,nc),p(t,Wr,m),p(t,uo,m),g(ho,uo,null),p(t,Xr,m),p(t,Ee,m),e(Ee,dt),e(dt,Rs),g(go,Rs,null),e(Ee,sc),e(Ee,Gs),e(Gs,ac),p(t,Hr,m),p(t,F,m),g(_o,F,null),e(F,rc),e(F,Js),e(Js,ic),e(F,dc),e(F,bo),e(bo,lc),e(bo,Hn),e(Hn,cc),e(bo,mc),e(F,pc),e(F,Qn),g(vo,Qn,null),e(F,fc),e(F,me),g(xo,me,null),e(me,uc),e(me,Zs),e(Zs,hc),e(me,gc),e(me,ea),e(ea,_c),e(F,bc),e(F,Yn),g(yo,Yn,null),p(t,Qr,m),p(t,Ue,m),e(Ue,lt),e(lt,ta),g($o,ta,null),e(Ue,vc),e(Ue,oa),e(oa,xc),p(t,Yr,m),p(t,Ae,m),g(wo,Ae,null),e(Ae,yc),e(Ae,na),e(na,$c),p(t,Rr,m),p(t,Fe,m),e(Fe,ct),e(ct,sa),g(Do,sa,null),e(Fe,wc),e(Fe,aa),e(aa,Dc),p(t,Gr,m),p(t,Ce,m),g(ko,Ce,null),e(Ce,kc),e(Ce,ra),e(ra,Mc),p(t,Jr,m),p(t,Pe,m),e(Pe,mt),e(mt,ia),g(Mo,ia,null),e(Pe,Tc),e(Pe,da),e(da,Nc),p(t,Zr,m),p(t,H,m),g(To,H,null),e(H,Ec),e(H,la),e(la,Uc),e(H,Ac),e(H,No),e(No,Fc),e(No,Rn),e(Rn,Cc),e(No,Pc),e(H,Oc),e(H,Gn),g(Eo,Gn,null),p(t,ei,m),p(t,Oe,m),e(Oe,pt),e(pt,ca),g(Uo,ca,null),e(Oe,qc),e(Oe,ma),e(ma,jc),p(t,ti,m),p(t,qe,m),g(Ao,qe,null),e(qe,Lc),e(qe,pa),e(pa,Ic),p(t,oi,m),p(t,je,m),e(je,ft),e(ft,fa),g(Fo,fa,null),e(je,zc),e(je,ua),e(ua,Vc),p(t,ni,m),p(t,C,m),g(Co,C,null),e(C,Bc),e(C,ha),e(ha,Sc),e(C,Kc),e(C,Po),e(Po,Wc),e(Po,Jn),e(Jn,Xc),e(Po,Hc),e(C,Qc),e(C,ut),g(Oo,ut,null),e(ut,Yc),e(ut,qo),e(qo,Rc),e(qo,ga),e(ga,Gc),e(qo,Jc),e(C,Zc),e(C,pe),g(jo,pe,null),e(pe,em),e(pe,_a),e(_a,tm),e(pe,om),e(pe,ba),e(ba,nm),e(C,sm),e(C,Zn),g(Lo,Zn,null),p(t,si,m),p(t,Le,m),e(Le,ht),e(ht,va),g(Io,va,null),e(Le,am),e(Le,xa),e(xa,rm),p(t,ai,m),p(t,P,m),g(zo,P,null),e(P,im),e(P,ya),e(ya,dm),e(P,lm),e(P,$a),e($a,cm),e(P,mm),e(P,Vo),e(Vo,pm),e(Vo,wa),e(wa,fm),e(Vo,um),e(P,hm),e(P,Da),e(Da,gm),e(P,_m),e(P,es),g(Bo,es,null),p(t,ri,m),p(t,Ie,m),e(Ie,gt),e(gt,ka),g(So,ka,null),e(Ie,bm),e(Ie,Ma),e(Ma,vm),p(t,ii,m),p(t,Ko,m),g(Wo,Ko,null),p(t,di,m),p(t,ze,m),e(ze,_t),e(_t,Ta),g(Xo,Ta,null),e(ze,xm),e(ze,Na),e(Na,ym),p(t,li,m),p(t,L,m),g(Ho,L,null),e(L,$m),e(L,Ea),e(Ea,wm),e(L,Dm),e(L,Qo),e(Qo,km),e(Qo,ts),e(ts,Mm),e(Qo,Tm),e(L,Nm),e(L,os),e(os,Em),e(os,Yo),e(Yo,Um),e(L,Am),e(L,ns),g(Ro,ns,null),p(t,ci,m),p(t,Ve,m),e(Ve,bt),e(bt,Ua),g(Go,Ua,null),e(Ve,Fm),e(Ve,Aa),e(Aa,Cm),p(t,mi,m),p(t,Jo,m),g(Zo,Jo,null),p(t,pi,m),p(t,Be,m),e(Be,vt),e(vt,Fa),g(en,Fa,null),e(Be,Pm),e(Be,Ca),e(Ca,Om),p(t,fi,m),p(t,U,m),g(tn,U,null),e(U,qm),e(U,Pa),e(Pa,jm),e(U,Lm),e(U,ss),e(ss,as),e(as,Im),e(ss,zm),e(U,Vm),e(U,V),g(on,V,null),e(V,Bm),e(V,Oa),e(Oa,Sm),e(V,Km),e(V,nn),e(nn,Wm),e(nn,qa),e(qa,Xm),e(nn,Hm),e(V,Qm),e(V,sn),e(sn,Ym),e(sn,ja),e(ja,Rm),e(sn,Gm),e(V,Jm),g(xt,V,null),e(U,Zm),e(U,yt),g(an,yt,null),e(yt,ep),e(yt,rn),e(rn,tp),e(rn,La),e(La,op),e(rn,np),e(U,sp),e(U,J),g(dn,J,null),e(J,ap),e(J,Q),e(Q,rp),e(Q,Ia),e(Ia,ip),e(Q,dp),e(Q,za),e(za,lp),e(Q,cp),e(Q,Va),e(Va,mp),e(Q,pp),e(Q,Ba),e(Ba,fp),e(Q,up),e(J,hp),e(J,Sa),e(Sa,gp),e(J,_p),g($t,J,null),e(U,bp),e(U,Z),g(ln,Z,null),e(Z,vp),e(Z,Y),e(Y,xp),e(Y,Ka),e(Ka,yp),e(Y,$p),e(Y,Wa),e(Wa,wp),e(Y,Dp),e(Y,Xa),e(Xa,kp),e(Y,Mp),e(Y,Ha),e(Ha,Tp),e(Y,Np),e(Z,Ep),e(Z,Qa),e(Qa,Up),e(Z,Ap),g(wt,Z,null),e(U,Fp),e(U,fe),g(cn,fe,null),e(fe,Cp),e(fe,R),e(R,Pp),e(R,Ya),e(Ya,Op),e(R,qp),e(R,Ra),e(Ra,jp),e(R,Lp),e(R,Ga),e(Ga,Ip),e(R,zp),e(R,Ja),e(Ja,Vp),e(R,Bp),e(fe,Sp),g(Dt,fe,null),p(t,ui,m),p(t,Se,m),e(Se,kt),e(kt,Za),g(mn,Za,null),e(Se,Kp),e(Se,er),e(er,Wp),p(t,hi,m),p(t,Ke,m),g(pn,Ke,null),e(Ke,Xp),e(Ke,Mt),g(fn,Mt,null),e(Mt,Hp),e(Mt,tr),e(tr,Qp),p(t,gi,m),p(t,We,m),e(We,Tt),e(Tt,or),g(un,or,null),e(We,Yp),e(We,nr),e(nr,Rp),p(t,_i,m),p(t,O,m),g(hn,O,null),e(O,Gp),e(O,sr),e(sr,Jp),e(O,Zp),e(O,gn),e(gn,ef),e(gn,rs),e(rs,tf),e(gn,of),e(O,nf),e(O,_n),e(_n,sf),e(_n,bn),e(bn,af),e(_n,rf),e(O,df),e(O,ar),e(ar,lf),e(O,cf),e(O,se),e(se,rr),e(rr,vn),e(vn,mf),e(se,pf),e(se,ir),e(ir,xn),e(xn,ff),e(se,uf),e(se,dr),e(dr,yn),e(yn,hf),e(se,gf),e(se,lr),e(lr,$n),e($n,_f),p(t,bi,m),p(t,Xe,m),e(Xe,Nt),e(Nt,cr),g(wn,cr,null),e(Xe,bf),e(Xe,mr),e(mr,vf),p(t,vi,m),p(t,ae,m),g(Dn,ae,null),e(ae,xf),e(ae,pr),e(pr,yf),e(ae,$f),e(ae,Et),g(kn,Et,null),e(Et,wf),e(Et,fr),e(fr,Df),p(t,xi,m),p(t,He,m),e(He,Ut),e(Ut,ur),g(Mn,ur,null),e(He,kf),e(He,hr),e(hr,Mf),p(t,yi,m),p(t,re,m),g(Tn,re,null),e(re,Tf),e(re,gr),e(gr,Nf),e(re,Ef),e(re,At),g(Nn,At,null),e(At,Uf),e(At,_r),e(_r,Af),p(t,$i,m),p(t,Qe,m),e(Qe,Ft),e(Ft,br),g(En,br,null),e(Qe,Ff),e(Qe,vr),e(vr,Cf),p(t,wi,m),p(t,I,m),g(Un,I,null),e(I,Pf),e(I,xr),e(xr,Of),e(I,qf),e(I,An),e(An,jf),e(An,Fn),e(Fn,Lf),e(An,If),e(I,zf),e(I,yr),e(yr,Vf),e(I,Bf),e(I,ie),e(ie,$r),e($r,Cn),e(Cn,Sf),e(ie,Kf),e(ie,wr),e(wr,Pn),e(Pn,Wf),e(ie,Xf),e(ie,Dr),e(Dr,On),e(On,Hf),e(ie,Qf),e(ie,kr),e(kr,qn),e(qn,Yf),Di=!0},p(t,[m]){const jn={};m&2&&(jn.$$scope={dirty:m,ctx:t}),Je.$set(jn);const Mr={};m&2&&(Mr.$$scope={dirty:m,ctx:t}),Ze.$set(Mr);const Tr={};m&2&&(Tr.$$scope={dirty:m,ctx:t}),et.$set(Tr);const Nr={};m&2&&(Nr.$$scope={dirty:m,ctx:t}),xt.$set(Nr);const Ye={};m&2&&(Ye.$$scope={dirty:m,ctx:t}),$t.$set(Ye);const Er={};m&2&&(Er.$$scope={dirty:m,ctx:t}),wt.$set(Er);const Ur={};m&2&&(Ur.$$scope={dirty:m,ctx:t}),Dt.$set(Ur)},i(t){Di||(_(f.$$.fragment,t),_(zt.$$.fragment,t),_(Vt.$$.fragment,t),_(Bt.$$.fragment,t),_(St.$$.fragment,t),_(Kt.$$.fragment,t),_(Wt.$$.fragment,t),_(Je.$$.fragment,t),_(Xt.$$.fragment,t),_(Ze.$$.fragment,t),_(et.$$.fragment,t),_(Yt.$$.fragment,t),_(Rt.$$.fragment,t),_(Jt.$$.fragment,t),_(eo.$$.fragment,t),_(to.$$.fragment,t),_(oo.$$.fragment,t),_(so.$$.fragment,t),_(ao.$$.fragment,t),_(io.$$.fragment,t),_(lo.$$.fragment,t),_(co.$$.fragment,t),_(po.$$.fragment,t),_(fo.$$.fragment,t),_(ho.$$.fragment,t),_(go.$$.fragment,t),_(_o.$$.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),_(To.$$.fragment,t),_(Eo.$$.fragment,t),_(Uo.$$.fragment,t),_(Ao.$$.fragment,t),_(Fo.$$.fragment,t),_(Co.$$.fragment,t),_(Oo.$$.fragment,t),_(jo.$$.fragment,t),_(Lo.$$.fragment,t),_(Io.$$.fragment,t),_(zo.$$.fragment,t),_(Bo.$$.fragment,t),_(So.$$.fragment,t),_(Wo.$$.fragment,t),_(Xo.$$.fragment,t),_(Ho.$$.fragment,t),_(Ro.$$.fragment,t),_(Go.$$.fragment,t),_(Zo.$$.fragment,t),_(en.$$.fragment,t),_(tn.$$.fragment,t),_(on.$$.fragment,t),_(xt.$$.fragment,t),_(an.$$.fragment,t),_(dn.$$.fragment,t),_($t.$$.fragment,t),_(ln.$$.fragment,t),_(wt.$$.fragment,t),_(cn.$$.fragment,t),_(Dt.$$.fragment,t),_(mn.$$.fragment,t),_(pn.$$.fragment,t),_(fn.$$.fragment,t),_(un.$$.fragment,t),_(hn.$$.fragment,t),_(wn.$$.fragment,t),_(Dn.$$.fragment,t),_(kn.$$.fragment,t),_(Mn.$$.fragment,t),_(Tn.$$.fragment,t),_(Nn.$$.fragment,t),_(En.$$.fragment,t),_(Un.$$.fragment,t),Di=!0)},o(t){b(f.$$.fragment,t),b(zt.$$.fragment,t),b(Vt.$$.fragment,t),b(Bt.$$.fragment,t),b(St.$$.fragment,t),b(Kt.$$.fragment,t),b(Wt.$$.fragment,t),b(Je.$$.fragment,t),b(Xt.$$.fragment,t),b(Ze.$$.fragment,t),b(et.$$.fragment,t),b(Yt.$$.fragment,t),b(Rt.$$.fragment,t),b(Jt.$$.fragment,t),b(eo.$$.fragment,t),b(to.$$.fragment,t),b(oo.$$.fragment,t),b(so.$$.fragment,t),b(ao.$$.fragment,t),b(io.$$.fragment,t),b(lo.$$.fragment,t),b(co.$$.fragment,t),b(po.$$.fragment,t),b(fo.$$.fragment,t),b(ho.$$.fragment,t),b(go.$$.fragment,t),b(_o.$$.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(To.$$.fragment,t),b(Eo.$$.fragment,t),b(Uo.$$.fragment,t),b(Ao.$$.fragment,t),b(Fo.$$.fragment,t),b(Co.$$.fragment,t),b(Oo.$$.fragment,t),b(jo.$$.fragment,t),b(Lo.$$.fragment,t),b(Io.$$.fragment,t),b(zo.$$.fragment,t),b(Bo.$$.fragment,t),b(So.$$.fragment,t),b(Wo.$$.fragment,t),b(Xo.$$.fragment,t),b(Ho.$$.fragment,t),b(Ro.$$.fragment,t),b(Go.$$.fragment,t),b(Zo.$$.fragment,t),b(en.$$.fragment,t),b(tn.$$.fragment,t),b(on.$$.fragment,t),b(xt.$$.fragment,t),b(an.$$.fragment,t),b(dn.$$.fragment,t),b($t.$$.fragment,t),b(ln.$$.fragment,t),b(wt.$$.fragment,t),b(cn.$$.fragment,t),b(Dt.$$.fragment,t),b(mn.$$.fragment,t),b(pn.$$.fragment,t),b(fn.$$.fragment,t),b(un.$$.fragment,t),b(hn.$$.fragment,t),b(wn.$$.fragment,t),b(Dn.$$.fragment,t),b(kn.$$.fragment,t),b(Mn.$$.fragment,t),b(Tn.$$.fragment,t),b(Nn.$$.fragment,t),b(En.$$.fragment,t),b(Un.$$.fragment,t),Di=!1},d(t){o(x),t&&o(M),t&&o(w),v(f),t&&o(S),t&&o(K),t&&o(Pr),t&&o($e),v(zt),t&&o(Or),t&&o(T),v(Vt),v(Bt),v(St),v(Kt),v(Wt),v(Je),v(Xt),v(Ze),v(et),v(Yt),v(Rt),t&&o(qr),t&&o(De),v(Jt),t&&o(jr),t&&o(Zt),v(eo),t&&o(Lr),t&&o(ke),v(to),t&&o(Ir),t&&o(W),v(oo),v(so),t&&o(zr),t&&o(Me),v(ao),t&&o(Vr),t&&o(ro),v(io),t&&o(Br),t&&o(Te),v(lo),t&&o(Sr),t&&o(X),v(co),v(po),t&&o(Kr),t&&o(Ne),v(fo),t&&o(Wr),t&&o(uo),v(ho),t&&o(Xr),t&&o(Ee),v(go),t&&o(Hr),t&&o(F),v(_o),v(vo),v(xo),v(yo),t&&o(Qr),t&&o(Ue),v($o),t&&o(Yr),t&&o(Ae),v(wo),t&&o(Rr),t&&o(Fe),v(Do),t&&o(Gr),t&&o(Ce),v(ko),t&&o(Jr),t&&o(Pe),v(Mo),t&&o(Zr),t&&o(H),v(To),v(Eo),t&&o(ei),t&&o(Oe),v(Uo),t&&o(ti),t&&o(qe),v(Ao),t&&o(oi),t&&o(je),v(Fo),t&&o(ni),t&&o(C),v(Co),v(Oo),v(jo),v(Lo),t&&o(si),t&&o(Le),v(Io),t&&o(ai),t&&o(P),v(zo),v(Bo),t&&o(ri),t&&o(Ie),v(So),t&&o(ii),t&&o(Ko),v(Wo),t&&o(di),t&&o(ze),v(Xo),t&&o(li),t&&o(L),v(Ho),v(Ro),t&&o(ci),t&&o(Ve),v(Go),t&&o(mi),t&&o(Jo),v(Zo),t&&o(pi),t&&o(Be),v(en),t&&o(fi),t&&o(U),v(tn),v(on),v(xt),v(an),v(dn),v($t),v(ln),v(wt),v(cn),v(Dt),t&&o(ui),t&&o(Se),v(mn),t&&o(hi),t&&o(Ke),v(pn),v(fn),t&&o(gi),t&&o(We),v(un),t&&o(_i),t&&o(O),v(hn),t&&o(bi),t&&o(Xe),v(wn),t&&o(vi),t&&o(ae),v(Dn),v(kn),t&&o(xi),t&&o(He),v(Mn),t&&o(yi),t&&o(re),v(Tn),v(Nn),t&&o($i),t&&o(Qe),v(En),t&&o(wi),t&&o(I),v(Un)}}}const D_={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 k_(q){return h_(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class F_ extends m_{constructor(x){super();p_(this,x,k_,w_,f_,{})}}export{F_ as default,D_ as metadata};
