import{S as qu,i as Pu,s as Lu,e as n,k as d,w as u,t as r,M as Bu,c as s,d as o,m as c,a,x as h,h as i,b as l,G as e,g as f,y as g,q as _,o as v,B as b,v as Iu,L as ai}from"../../chunks/vendor-hf-doc-builder.js";import{T as ju}from"../../chunks/Tip-hf-doc-builder.js";import{D}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ri}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as N}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as si}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Vu(q){let x,M,$,y,k,m,w,Y;return{c(){x=n("p"),M=r("It is required to be logged in ("),$=n("code"),y=r("huggingface-cli login"),k=r(") when you want to use private or "),m=n("a"),w=r(`gated
models`),Y=r("."),this.h()},l(me){x=s(me,"P",{});var B=a(x);M=i(B,"It is required to be logged in ("),$=s(B,"CODE",{});var I=a($);y=i(I,"huggingface-cli login"),I.forEach(o),k=i(B,") when you want to use private or "),m=s(B,"A",{href:!0,rel:!0});var an=a(m);w=i(an,`gated
models`),an.forEach(o),Y=i(B,"."),B.forEach(o),this.h()},h(){l(m,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),l(m,"rel","nofollow")},m(me,B){f(me,x,B),e(x,M),e(x,$),e($,y),e(x,k),e(x,m),e(m,w),e(x,Y)},d(me){me&&o(x)}}}function zu(q){let x,M,$,y,k;return{c(){x=n("p"),M=r("Activate the special "),$=n("a"),y=r("\u201Coffline-mode\u201D"),k=r(` to use
this method in a firewalled environment.`),this.h()},l(m){x=s(m,"P",{});var w=a(x);M=i(w,"Activate the special "),$=s(w,"A",{href:!0,rel:!0});var Y=a($);y=i(Y,"\u201Coffline-mode\u201D"),Y.forEach(o),k=i(w,` to use
this method in a firewalled environment.`),w.forEach(o),this.h()},h(){l($,"href","https://huggingface.co/diffusers/installation.html#offline-mode"),l($,"rel","nofollow")},m(m,w){f(m,x,w),e(x,M),e(x,$),e($,y),e(x,k)},d(m){m&&o(x)}}}function Ku(q){let x,M,$,y,k;return y=new ri({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:"),$=d(),u(y.$$.fragment)},l(m){x=s(m,"P",{});var w=a(x);M=i(w,"Examples:"),w.forEach(o),$=c(m),h(y.$$.fragment,m)},m(m,w){f(m,x,w),e(x,M),f(m,$,w),g(y,m,w),k=!0},p:ai,i(m){k||(_(y.$$.fragment,m),k=!0)},o(m){v(y.$$.fragment,m),k=!1},d(m){m&&o(x),m&&o($),b(y,m)}}}function Su(q){let x,M,$,y,k;return y=new ri({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:"),$=d(),u(y.$$.fragment)},l(m){x=s(m,"P",{});var w=a(x);M=i(w,"Examples:"),w.forEach(o),$=c(m),h(y.$$.fragment,m)},m(m,w){f(m,x,w),e(x,M),f(m,$,w),g(y,m,w),k=!0},p:ai,i(m){k||(_(y.$$.fragment,m),k=!0)},o(m){v(y.$$.fragment,m),k=!1},d(m){m&&o(x),m&&o($),b(y,m)}}}function Xu(q){let x,M,$,y,k;return y=new ri({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:"),$=d(),u(y.$$.fragment)},l(m){x=s(m,"P",{});var w=a(x);M=i(w,"Examples:"),w.forEach(o),$=c(m),h(y.$$.fragment,m)},m(m,w){f(m,x,w),e(x,M),f(m,$,w),g(y,m,w),k=!0},p:ai,i(m){k||(_(y.$$.fragment,m),k=!0)},o(m){v(y.$$.fragment,m),k=!1},d(m){m&&o(x),m&&o($),b(y,m)}}}function Wu(q){let x,M,$,y,k;return y=new ri({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:"),$=d(),u(y.$$.fragment)},l(m){x=s(m,"P",{});var w=a(x);M=i(w,"Examples:"),w.forEach(o),$=c(m),h(y.$$.fragment,m)},m(m,w){f(m,x,w),e(x,M),f(m,$,w),g(y,m,w),k=!0},p:ai,i(m){k||(_(y.$$.fragment,m),k=!0)},o(m){v(y.$$.fragment,m),k=!1},d(m){m&&o(x),m&&o($),b(y,m)}}}function Qu(q){let x,M,$,y,k,m,w,Y,me,B,I,an,Un,ii,li,An,di,ci,Na,ue,Be,Fn,kt,pi,Cn,fi,Ua,T,Mt,mi,On,ui,hi,rn,ln,gi,_i,vi,jn,se,qn,bi,xi,Pn,yi,$i,dn,wi,Di,ki,ae,Tt,Mi,Ln,Ti,Ei,Bn,Ni,Ui,re,Et,Ai,In,Fi,Ci,Vn,Oi,ji,U,Nt,qi,zn,Pi,Li,he,Bi,Kn,Ii,Vi,Sn,zi,Ki,Si,Ut,Xi,Xn,Wi,Qi,Hi,At,Yi,Wn,Gi,Ji,Ri,Ie,Zi,Ve,el,ze,Ft,tl,Qn,ol,nl,Ke,Ct,sl,Ot,al,Hn,rl,il,Aa,ge,Se,Yn,jt,ll,Gn,dl,Fa,qt,Pt,Ca,_e,Xe,Jn,Lt,cl,Rn,pl,Oa,V,Bt,fl,Zn,ml,ul,It,hl,cn,gl,_l,vl,pn,Vt,ja,ve,We,es,zt,bl,ts,xl,qa,z,Kt,yl,os,$l,wl,St,Dl,fn,kl,Ml,Tl,mn,Xt,Pa,be,Qe,ns,Wt,El,ss,Nl,La,Qt,Ht,Ba,xe,He,as,Yt,Ul,rs,Al,Ia,K,Gt,Fl,is,Cl,Ol,Jt,jl,un,ql,Pl,Ll,hn,Rt,Va,ye,Ye,ls,Zt,Bl,ds,Il,za,$e,eo,Vl,cs,zl,Ka,we,Ge,ps,to,Kl,fs,Sl,Sa,De,oo,Xl,ms,Wl,Xa,ke,Je,us,no,Ql,hs,Hl,Wa,S,so,Yl,gs,Gl,Jl,ao,Rl,gn,Zl,ed,td,_n,ro,Qa,Me,Re,_s,io,od,vs,nd,Ha,Te,lo,sd,bs,ad,Ya,Ee,Ze,xs,co,rd,ys,id,Ga,X,po,ld,$s,dd,cd,fo,pd,vn,fd,md,ud,bn,mo,Ja,Ne,et,ws,uo,hd,Ds,gd,Ra,F,ho,_d,ks,vd,bd,Ms,xd,yd,go,$d,Ts,wd,Dd,kd,Es,Md,Td,xn,_o,Za,Ue,tt,Ns,vo,Ed,Us,Nd,er,bo,xo,tr,Ae,ot,As,yo,Ud,Fs,Ad,or,E,$o,Fd,Cs,Cd,Od,yn,$n,jd,qd,Pd,P,wo,Ld,Os,Bd,Id,Do,Vd,js,zd,Kd,Sd,ko,Xd,qs,Wd,Qd,Hd,nt,Yd,st,Mo,Gd,To,Jd,Ps,Rd,Zd,ec,G,Eo,tc,W,oc,Ls,nc,sc,Bs,ac,rc,Is,ic,lc,Vs,dc,cc,pc,zs,fc,mc,at,uc,J,No,hc,Q,gc,Ks,_c,vc,Ss,bc,xc,Xs,yc,$c,Ws,wc,Dc,kc,Qs,Mc,Tc,rt,Ec,ie,Uo,Nc,H,Uc,Hs,Ac,Fc,Ys,Cc,Oc,Gs,jc,qc,Js,Pc,Lc,Bc,it,nr,Fe,lt,Rs,Ao,Ic,Zs,Vc,sr,Ce,Fo,zc,dt,Co,Kc,ea,Sc,ar,Oe,ct,ta,Oo,Xc,oa,Wc,rr,C,jo,Qc,na,Hc,Yc,qo,Gc,wn,Jc,Rc,Zc,Po,ep,Lo,tp,op,np,sa,sp,ap,ee,aa,Bo,rp,ip,ra,Io,lp,dp,ia,Vo,cp,pp,la,zo,fp,ir,je,pt,da,Ko,mp,ca,up,lr,te,So,hp,pa,gp,_p,ft,Xo,vp,fa,bp,dr,qe,mt,ma,Wo,xp,ua,yp,cr,oe,Qo,$p,ha,wp,Dp,ut,Ho,kp,ga,Mp,pr,Pe,ht,_a,Yo,Tp,va,Ep,fr,j,Go,Np,ba,Up,Ap,Jo,Fp,Ro,Cp,Op,jp,xa,qp,Pp,ne,ya,Zo,Lp,Bp,$a,en,Ip,Vp,wa,tn,zp,Kp,Da,on,Sp,mr;return m=new N({}),kt=new N({}),Mt=new D({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/modeling_utils.py#L134"}}),Tt=new D({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/modeling_utils.py#L172"}}),Et=new D({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/modeling_utils.py#L161"}}),Nt=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.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo (either remote in
huggingface.co or downloaded locally), you can specify the folder name here.`,name:"subfolder"},{anchor:"diffusers.ModelMixin.from_pretrained.mirror",description:`<strong>mirror</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Mirror source to accelerate downloads in China. If you are from China and have an accessibility
problem, you can set this option to resolve it. Note that we do not guarantee the timeliness or safety.
Please refer to the mirror site for more information.`,name:"mirror"},{anchor:"diffusers.ModelMixin.from_pretrained.device_map",description:`<strong>device_map</strong> (<code>str</code> or <code>Dict[str, Union[int, str, torch.device]]</code>, <em>optional</em>) &#x2014;
A map that specifies where each submodule should go. It doesn&#x2019;t need to be refined to each
parameter/buffer name, once a given module name is inside, every submodule of it will be sent to the
same device.</p>
<p>To have Accelerate compute the most optimized <code>device_map</code> automatically, set <code>device_map=&quot;auto&quot;</code>. For
more information about each option see <a href="https://hf.co/docs/accelerate/main/en/usage_guides/big_modeling#designing-a-device-map" rel="nofollow">designing a device
map</a>.`,name:"device_map"},{anchor:"diffusers.ModelMixin.from_pretrained.low_cpu_mem_usage",description:`<strong>low_cpu_mem_usage</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code> if torch version &gt;= 1.9.0 else <code>False</code>) &#x2014;
Speed up model loading by not initializing the weights and only loading the pre-trained weights. This
also tries to not use more than 1x model size in CPU memory (including peak memory) while loading the
model. This is only supported when torch version &gt;= 1.9.0. If you are using an older version of torch,
setting this argument to <code>True</code> will raise an error.`,name:"low_cpu_mem_usage"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/modeling_utils.py#L232"}}),Ie=new ju({props:{$$slots:{default:[Vu]},$$scope:{ctx:q}}}),Ve=new ju({props:{$$slots:{default:[zu]},$$scope:{ctx:q}}}),Ft=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/vr_1170/src/diffusers/modeling_utils.py#L651",returnDescription:`
<p>The number of parameters.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Ct=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 = <function save at 0x7f0792686670>"}],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.`,name:"save_function"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/modeling_utils.py#L182"}}),jt=new N({}),Pt=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/vr_1170/src/diffusers/models/unet_2d.py#L28"}}),Lt=new N({}),Bt=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:"freq_shift",val:": int = 0"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"use_timestep_embedding",val:": bool = False"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownBlock1DNoSkip', 'DownBlock1D', 'AttnDownBlock1D')"},{name:"mid_block_type",val:": str = 'UNetMidBlock1D'"},{name:"up_block_types",val:": typing.Tuple[str] = ('AttnUpBlock1D', 'UpBlock1D', 'UpBlock1DNoSkip')"},{name:"block_out_channels",val:": typing.Tuple[int] = (32, 32, 64)"}],parametersDescription:[{anchor:"diffusers.UNet1DModel.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optionl</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>int</code>, <em>optional</em>, defaults to 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"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/unet_1d.py#L25"}}),Vt=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 <code>UNet1DOutput</code> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/unet_1d.py#L130",returnDescription:`
<p><code>UNet1DOutput</code> if <code>return_dict</code> is True,
otherwise a <code>tuple</code>. When returning a tuple, the first element is the sample tensor.</p>
`,returnType:`
<p><code>UNet1DOutput</code> or <code>tuple</code></p>
`}}),zt=new N({}),Kt=new D({props:{name:"class diffusers.UNet2DModel",anchor:"diffusers.UNet2DModel",parameters:[{name:"sample_size",val:": typing.Optional[int] = None"},{name:"in_channels",val:": int = 3"},{name:"out_channels",val:": int = 3"},{name:"center_input_sample",val:": bool = False"},{name:"time_embedding_type",val:": str = 'positional'"},{name:"freq_shift",val:": int = 0"},{name:"flip_sin_to_cos",val:": bool = True"},{name:"down_block_types",val:": typing.Tuple[str] = ('DownBlock2D', 'AttnDownBlock2D', 'AttnDownBlock2D', 'AttnDownBlock2D')"},{name:"up_block_types",val:": typing.Tuple[str] = ('AttnUpBlock2D', 'AttnUpBlock2D', 'AttnUpBlock2D', 'UpBlock2D')"},{name:"block_out_channels",val:": typing.Tuple[int] = (224, 448, 672, 896)"},{name:"layers_per_block",val:": int = 2"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"downsample_padding",val:": int = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"attention_head_dim",val:": int = 8"},{name:"norm_num_groups",val:": int = 32"},{name:"norm_eps",val:": float = 1e-05"}],parametersDescription:[{anchor:"diffusers.UNet2DModel.sample_size",description:`<strong>sample_size</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>, <em>optional</em>) &#x2014;
Input sample size.`,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>False</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.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"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/unet_2d.py#L38"}}),Xt=new D({props:{name:"forward",anchor:"diffusers.UNet2DModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"timestep",val:": typing.Union[torch.Tensor, float, int]"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.UNet2DModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; (batch, channel, height, width) noisy inputs tensor",name:"sample"},{anchor:"diffusers.UNet2DModel.forward.timestep",description:"<strong>timestep</strong> (<code>torch.FloatTensor</code> or <code>float</code> or `int) &#x2014; (batch) timesteps",name:"timestep"},{anchor:"diffusers.UNet2DModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <a href="/docs/diffusers/pr_1170/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/vr_1170/src/diffusers/models/unet_2d.py#L180",returnDescription:`
<p><a
  href="/docs/diffusers/pr_1170/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/pr_1170/en/api/models#diffusers.models.unet_2d.UNet2DOutput"
>UNet2DOutput</a> or <code>tuple</code></p>
`}}),Wt=new N({}),Ht=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/vr_1170/src/diffusers/models/unet_2d_condition.py#L40"}}),Yt=new N({}),Gt=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:"up_block_types",val:": typing.Tuple[str] = ('UpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D', 'CrossAttnUpBlock2D')"},{name:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"downsample_padding",val:": int = 1"},{name:"mid_block_scale_factor",val:": float = 1"},{name:"act_fn",val:": str = 'silu'"},{name:"norm_num_groups",val:": int = 32"},{name:"norm_eps",val:": float = 1e-05"},{name:"cross_attention_dim",val:": int = 1280"},{name:"attention_head_dim",val:": int = 8"}],parametersDescription:[{anchor:"diffusers.UNet2DConditionModel.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.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.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <code>(&quot;UpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;, &quot;CrossAttnUpBlock2D&quot;,)</code>) &#x2014;
The tuple of upsample blocks to use.`,name:"up_block_types"},{anchor:"diffusers.UNet2DConditionModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to <code>(320, 640, 1280, 1280)</code>) &#x2014;
The tuple of output channels for each block.`,name:"block_out_channels"},{anchor:"diffusers.UNet2DConditionModel.layers_per_block",description:"<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014; The number of layers per block.",name:"layers_per_block"},{anchor:"diffusers.UNet2DConditionModel.downsample_padding",description:"<strong>downsample_padding</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The padding to use for the downsampling convolution.",name:"downsample_padding"},{anchor:"diffusers.UNet2DConditionModel.mid_block_scale_factor",description:"<strong>mid_block_scale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014; The scale factor to use for the mid block.",name:"mid_block_scale_factor"},{anchor:"diffusers.UNet2DConditionModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.UNet2DConditionModel.norm_num_groups",description:"<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014; The number of groups to use for the normalization.",name:"norm_num_groups"},{anchor:"diffusers.UNet2DConditionModel.norm_eps",description:"<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014; The epsilon to use for the normalization.",name:"norm_eps"},{anchor:"diffusers.UNet2DConditionModel.cross_attention_dim",description:"<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1280) &#x2014; The dimension of the cross attention features.",name:"cross_attention_dim"},{anchor:"diffusers.UNet2DConditionModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014; The dimension of the attention heads.",name:"attention_head_dim"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/unet_2d_condition.py#L50"}}),Rt=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:"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, channel, height, width) 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/pr_1170/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/vr_1170/src/diffusers/models/unet_2d_condition.py#L243",returnDescription:`
<p><a
  href="/docs/diffusers/pr_1170/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/pr_1170/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput"
>UNet2DConditionOutput</a> or <code>tuple</code></p>
`}}),Zt=new N({}),eo=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/vr_1170/src/diffusers/models/vae.py#L28"}}),to=new N({}),oo=new D({props:{name:"class diffusers.models.vae.VQEncoderOutput",anchor:"diffusers.models.vae.VQEncoderOutput",parameters:[{name:"latents",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.vae.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/vr_1170/src/diffusers/models/vae.py#L41"}}),no=new N({}),so=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"}],parametersDescription:[{anchor:"diffusers.VQModel.in_channels",description:"<strong>in_channels</strong> (int, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.VQModel.out_channels",description:"<strong>out_channels</strong> (int,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.VQModel.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownEncoderBlock2D&quot;,)</code>): Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.VQModel.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;UpDecoderBlock2D&quot;,)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.VQModel.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(64,)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.VQModel.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.VQModel.latent_channels",description:"<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>3</code>) &#x2014; Number of channels in the latent space.",name:"latent_channels"},{anchor:"diffusers.VQModel.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; TODO",name:"sample_size"},{anchor:"diffusers.VQModel.num_vq_embeddings",description:"<strong>num_vq_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to <code>256</code>) &#x2014; Number of codebook vectors in the VQ-VAE.",name:"num_vq_embeddings"},{anchor:"diffusers.VQModel.vq_embed_dim",description:"<strong>vq_embed_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; Hidden dim of codebook vectors in the VQ-VAE.",name:"vq_embed_dim"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/vae.py#L394"}}),ro=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/vr_1170/src/diffusers/models/vae.py#L489"}}),io=new N({}),lo=new D({props:{name:"class diffusers.models.vae.AutoencoderKLOutput",anchor:"diffusers.models.vae.AutoencoderKLOutput",parameters:[{name:"latent_dist",val:": DiagonalGaussianDistribution"}],parametersDescription:[{anchor:"diffusers.models.vae.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/vr_1170/src/diffusers/models/vae.py#L54"}}),co=new N({}),po=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"}],parametersDescription:[{anchor:"diffusers.AutoencoderKL.in_channels",description:"<strong>in_channels</strong> (int, <em>optional</em>, defaults to 3) &#x2014; Number of channels in the input image.",name:"in_channels"},{anchor:"diffusers.AutoencoderKL.out_channels",description:"<strong>out_channels</strong> (int,  <em>optional</em>, defaults to 3) &#x2014; Number of channels in the output.",name:"out_channels"},{anchor:"diffusers.AutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;DownEncoderBlock2D&quot;,)</code>): Tuple of downsample block types.`,name:"down_block_types"},{anchor:"diffusers.AutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(&quot;UpDecoderBlock2D&quot;,)</code>): Tuple of upsample block types.`,name:"up_block_types"},{anchor:"diffusers.AutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[int]</code>, <em>optional</em>, defaults to  &#x2014;
obj:<code>(64,)</code>): Tuple of block output channels.`,name:"block_out_channels"},{anchor:"diffusers.AutoencoderKL.act_fn",description:"<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014; The activation function to use.",name:"act_fn"},{anchor:"diffusers.AutoencoderKL.latent_channels",description:"<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>4</code>) &#x2014; Number of channels in the latent space.",name:"latent_channels"},{anchor:"diffusers.AutoencoderKL.sample_size",description:"<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) &#x2014; TODO",name:"sample_size"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/vae.py#L506"}}),mo=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/vr_1170/src/diffusers/models/vae.py#L588"}}),uo=new N({}),ho=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:"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:"activation_fn",val:": str = 'geglu'"},{name:"num_embeds_ada_norm",val:": typing.Optional[int] = None"}],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.1) &#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 context 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/vr_1170/src/diffusers/models/attention.py#L48"}}),_o=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:"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, context 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.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/pr_1170/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/vr_1170/src/diffusers/models/attention.py#L170",returnDescription:`
<p><a
  href="/docs/diffusers/pr_1170/en/api/models#diffusers.models.attention.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/pr_1170/en/api/models#diffusers.models.attention.Transformer2DModelOutput"
>Transformer2DModelOutput</a> or <code>tuple</code></p>
`}}),vo=new N({}),xo=new D({props:{name:"class diffusers.models.attention.Transformer2DModelOutput",anchor:"diffusers.models.attention.Transformer2DModelOutput",parameters:[{name:"sample",val:": FloatTensor"}],parametersDescription:[{anchor:"diffusers.models.attention.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/pr_1170/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/vr_1170/src/diffusers/models/attention.py#L30"}}),yo=new N({}),$o=new D({props:{name:"class diffusers.FlaxModelMixin",anchor:"diffusers.FlaxModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/modeling_flax_utils.py#L45"}}),wo=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/pr_1170/en/using-diffusers/loading#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/pr_1170/en/using-diffusers/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/vr_1170/src/diffusers/modeling_flax_utils.py#L195"}}),nt=new si({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example",$$slots:{default:[Ku]},$$scope:{ctx:q}}}),Mo=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/vr_1170/src/diffusers/modeling_flax_utils.py#L487"}}),Eo=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/vr_1170/src/diffusers/modeling_flax_utils.py#L87"}}),at=new si({props:{anchor:"diffusers.FlaxModelMixin.to_bf16.example",$$slots:{default:[Su]},$$scope:{ctx:q}}}),No=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/vr_1170/src/diffusers/modeling_flax_utils.py#L153"}}),rt=new si({props:{anchor:"diffusers.FlaxModelMixin.to_fp16.example",$$slots:{default:[Xu]},$$scope:{ctx:q}}}),Uo=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/vr_1170/src/diffusers/modeling_flax_utils.py#L126"}}),it=new si({props:{anchor:"diffusers.FlaxModelMixin.to_fp32.example",$$slots:{default:[Wu]},$$scope:{ctx:q}}}),Ao=new N({}),Fo=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/vr_1170/src/diffusers/models/unet_2d_condition_flax.py#L36"}}),Co=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/vr_1170/src/flax/struct.py#L108"}}),Oo=new N({}),jo=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:"block_out_channels",val:": typing.Tuple[int] = (320, 640, 1280, 1280)"},{name:"layers_per_block",val:": int = 2"},{name:"attention_head_dim",val:": int = 8"},{name:"cross_attention_dim",val:": int = 1280"},{name:"dropout",val:": float = 0.0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{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 0x7f077e57fa00>"},{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>, <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"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/unet_2d_condition_flax.py#L47"}}),Ko=new N({}),So=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/vr_1170/src/diffusers/models/vae_flax.py#L33"}}),Xo=new D({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/flax/struct.py#L108"}}),Wo=new N({}),Qo=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/vr_1170/src/diffusers/models/vae_flax.py#L48"}}),Ho=new D({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/flax/struct.py#L108"}}),Yo=new N({}),Go=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:"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 0x7f077e57fa00>"},{name:"name",val:": str = None"}],parametersDescription:[{anchor:"diffusers.FlaxAutoencoderKL.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Input channels`,name:"in_channels"},{anchor:"diffusers.FlaxAutoencoderKL.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Output channels`,name:"out_channels"},{anchor:"diffusers.FlaxAutoencoderKL.down_block_types",description:`<strong>down_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(DownEncoderBlock2D)</em>) &#x2014;
DownEncoder block type`,name:"down_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.up_block_types",description:`<strong>up_block_types</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(UpDecoderBlock2D)</em>) &#x2014;
UpDecoder block type`,name:"up_block_types"},{anchor:"diffusers.FlaxAutoencoderKL.block_out_channels",description:`<strong>block_out_channels</strong> (<code>Tuple[str]</code>, <em>optional</em>, defaults to <em>(64,)</em>) &#x2014;
Tuple containing the number of output channels for each block`,name:"block_out_channels"},{anchor:"diffusers.FlaxAutoencoderKL.layers_per_block",description:`<strong>layers_per_block</strong> (<code>int</code>, <em>optional</em>, defaults to <em>2</em>) &#x2014;
Number of Resnet layer for each block`,name:"layers_per_block"},{anchor:"diffusers.FlaxAutoencoderKL.act_fn",description:`<strong>act_fn</strong> (<code>str</code>, <em>optional</em>, defaults to <em>silu</em>) &#x2014;
Activation function`,name:"act_fn"},{anchor:"diffusers.FlaxAutoencoderKL.latent_channels",description:`<strong>latent_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <em>4</em>) &#x2014;
Latent space channels`,name:"latent_channels"},{anchor:"diffusers.FlaxAutoencoderKL.norm_num_groups",description:`<strong>norm_num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to <em>32</em>) &#x2014;
Norm num group`,name:"norm_num_groups"},{anchor:"diffusers.FlaxAutoencoderKL.sample_size",description:`<strong>sample_size</strong> (<code>int</code>, <em>optional</em>, defaults to <em>32</em>) &#x2014;
Sample input size`,name:"sample_size"},{anchor:"diffusers.FlaxAutoencoderKL.dtype",description:`<strong>dtype</strong> (<code>jnp.dtype</code>, <em>optional</em>, defaults to jnp.float32) &#x2014;
parameters <em>dtype</em>`,name:"dtype"}],source:"https://github.com/huggingface/diffusers/blob/vr_1170/src/diffusers/models/vae_flax.py#L721"}}),{c(){x=n("meta"),M=d(),$=n("h1"),y=n("a"),k=n("span"),u(m.$$.fragment),w=d(),Y=n("span"),me=r("Models"),B=d(),I=n("p"),an=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`),Un=n("em"),ii=r("\\theta(\\mathbf{x}"),li=r(`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),An=n("code"),di=r("torch.nn.module"),ci=r(" with basic functionality for saving and loading models both locally and from the HuggingFace hub."),Na=d(),ue=n("h2"),Be=n("a"),Fn=n("span"),u(kt.$$.fragment),pi=d(),Cn=n("span"),fi=r("ModelMixin"),Ua=d(),T=n("div"),u(Mt.$$.fragment),mi=d(),On=n("p"),ui=r("Base class for all models."),hi=d(),rn=n("p"),ln=n("a"),gi=r("ModelMixin"),_i=r(` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),vi=d(),jn=n("ul"),se=n("li"),qn=n("strong"),bi=r("config_name"),xi=r(" ("),Pn=n("code"),yi=r("str"),$i=r(`) \u2014 A filename under which the model should be stored when calling
`),dn=n("a"),wi=r("save_pretrained()"),Di=r("."),ki=d(),ae=n("div"),u(Tt.$$.fragment),Mi=d(),Ln=n("p"),Ti=r("Deactivates gradient checkpointing for the current model."),Ei=d(),Bn=n("p"),Ni=r(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),Ui=d(),re=n("div"),u(Et.$$.fragment),Ai=d(),In=n("p"),Fi=r("Activates gradient checkpointing for the current model."),Ci=d(),Vn=n("p"),Oi=r(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),ji=d(),U=n("div"),u(Nt.$$.fragment),qi=d(),zn=n("p"),Pi=r("Instantiate a pretrained pytorch model from a pre-trained model configuration."),Li=d(),he=n("p"),Bi=r("The model is set in evaluation mode by default using "),Kn=n("code"),Ii=r("model.eval()"),Vi=r(` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Sn=n("code"),zi=r("model.train()"),Ki=r("."),Si=d(),Ut=n("p"),Xi=r("The warning "),Xn=n("em"),Wi=r("Weights from XXX not initialized from pretrained model"),Qi=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.`),Hi=d(),At=n("p"),Yi=r("The warning "),Wn=n("em"),Gi=r("Weights from XXX not used in YYY"),Ji=r(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Ri=d(),u(Ie.$$.fragment),Zi=d(),u(Ve.$$.fragment),el=d(),ze=n("div"),u(Ft.$$.fragment),tl=d(),Qn=n("p"),ol=r("Get number of (optionally, trainable or non-embeddings) parameters in the module."),nl=d(),Ke=n("div"),u(Ct.$$.fragment),sl=d(),Ot=n("p"),al=r(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Hn=n("code"),rl=r("[from_pretrained()](/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin.from_pretrained)"),il=r(" class method."),Aa=d(),ge=n("h2"),Se=n("a"),Yn=n("span"),u(jt.$$.fragment),ll=d(),Gn=n("span"),dl=r("UNet2DOutput"),Fa=d(),qt=n("div"),u(Pt.$$.fragment),Ca=d(),_e=n("h2"),Xe=n("a"),Jn=n("span"),u(Lt.$$.fragment),cl=d(),Rn=n("span"),pl=r("UNet1DModel"),Oa=d(),V=n("div"),u(Bt.$$.fragment),fl=d(),Zn=n("p"),ml=r("UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),ul=d(),It=n("p"),hl=r("This model inherits from "),cn=n("a"),gl=r("ModelMixin"),_l=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),vl=d(),pn=n("div"),u(Vt.$$.fragment),ja=d(),ve=n("h2"),We=n("a"),es=n("span"),u(zt.$$.fragment),bl=d(),ts=n("span"),xl=r("UNet2DModel"),qa=d(),z=n("div"),u(Kt.$$.fragment),yl=d(),os=n("p"),$l=r("UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),wl=d(),St=n("p"),Dl=r("This model inherits from "),fn=n("a"),kl=r("ModelMixin"),Ml=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Tl=d(),mn=n("div"),u(Xt.$$.fragment),Pa=d(),be=n("h2"),Qe=n("a"),ns=n("span"),u(Wt.$$.fragment),El=d(),ss=n("span"),Nl=r("UNet2DConditionOutput"),La=d(),Qt=n("div"),u(Ht.$$.fragment),Ba=d(),xe=n("h2"),He=n("a"),as=n("span"),u(Yt.$$.fragment),Ul=d(),rs=n("span"),Al=r("UNet2DConditionModel"),Ia=d(),K=n("div"),u(Gt.$$.fragment),Fl=d(),is=n("p"),Cl=r(`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Ol=d(),Jt=n("p"),jl=r("This model inherits from "),un=n("a"),ql=r("ModelMixin"),Pl=r(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Ll=d(),hn=n("div"),u(Rt.$$.fragment),Va=d(),ye=n("h2"),Ye=n("a"),ls=n("span"),u(Zt.$$.fragment),Bl=d(),ds=n("span"),Il=r("DecoderOutput"),za=d(),$e=n("div"),u(eo.$$.fragment),Vl=d(),cs=n("p"),zl=r("Output of decoding method."),Ka=d(),we=n("h2"),Ge=n("a"),ps=n("span"),u(to.$$.fragment),Kl=d(),fs=n("span"),Sl=r("VQEncoderOutput"),Sa=d(),De=n("div"),u(oo.$$.fragment),Xl=d(),ms=n("p"),Wl=r("Output of VQModel encoding method."),Xa=d(),ke=n("h2"),Je=n("a"),us=n("span"),u(no.$$.fragment),Ql=d(),hs=n("span"),Hl=r("VQModel"),Wa=d(),S=n("div"),u(so.$$.fragment),Yl=d(),gs=n("p"),Gl=r(`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),Jl=d(),ao=n("p"),Rl=r("This model inherits from "),gn=n("a"),Zl=r("ModelMixin"),ed=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),td=d(),_n=n("div"),u(ro.$$.fragment),Qa=d(),Me=n("h2"),Re=n("a"),_s=n("span"),u(io.$$.fragment),od=d(),vs=n("span"),nd=r("AutoencoderKLOutput"),Ha=d(),Te=n("div"),u(lo.$$.fragment),sd=d(),bs=n("p"),ad=r("Output of AutoencoderKL encoding method."),Ya=d(),Ee=n("h2"),Ze=n("a"),xs=n("span"),u(co.$$.fragment),rd=d(),ys=n("span"),id=r("AutoencoderKL"),Ga=d(),X=n("div"),u(po.$$.fragment),ld=d(),$s=n("p"),dd=r(`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),cd=d(),fo=n("p"),pd=r("This model inherits from "),vn=n("a"),fd=r("ModelMixin"),md=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),ud=d(),bn=n("div"),u(mo.$$.fragment),Ja=d(),Ne=n("h2"),et=n("a"),ws=n("span"),u(uo.$$.fragment),hd=d(),Ds=n("span"),gd=r("Transformer2DModel"),Ra=d(),F=n("div"),u(ho.$$.fragment),_d=d(),ks=n("p"),vd=r(`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),bd=d(),Ms=n("p"),xd=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.`),yd=d(),go=n("p"),$d=r(`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),Ts=n("code"),wd=r("ImagePositionalEmbeddings"),Dd=r(`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),kd=d(),Es=n("p"),Md=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.`),Td=d(),xn=n("div"),u(_o.$$.fragment),Za=d(),Ue=n("h2"),tt=n("a"),Ns=n("span"),u(vo.$$.fragment),Ed=d(),Us=n("span"),Nd=r("Transformer2DModelOutput"),er=d(),bo=n("div"),u(xo.$$.fragment),tr=d(),Ae=n("h2"),ot=n("a"),As=n("span"),u(yo.$$.fragment),Ud=d(),Fs=n("span"),Ad=r("FlaxModelMixin"),or=d(),E=n("div"),u($o.$$.fragment),Fd=d(),Cs=n("p"),Cd=r("Base class for all flax models."),Od=d(),yn=n("p"),$n=n("a"),jd=r("FlaxModelMixin"),qd=r(` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Pd=d(),P=n("div"),u(wo.$$.fragment),Ld=d(),Os=n("p"),Bd=r("Instantiate a pretrained flax model from a pre-trained model configuration."),Id=d(),Do=n("p"),Vd=r("The warning "),js=n("em"),zd=r("Weights from XXX not initialized from pretrained model"),Kd=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.`),Sd=d(),ko=n("p"),Xd=r("The warning "),qs=n("em"),Wd=r("Weights from XXX not used in YYY"),Qd=r(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Hd=d(),u(nt.$$.fragment),Yd=d(),st=n("div"),u(Mo.$$.fragment),Gd=d(),To=n("p"),Jd=r(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Ps=n("code"),Rd=r("[from_pretrained()](/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.FlaxModelMixin.from_pretrained)"),Zd=r(" class method"),ec=d(),G=n("div"),u(Eo.$$.fragment),tc=d(),W=n("p"),oc=r("Cast the floating-point "),Ls=n("code"),nc=r("params"),sc=r(" to "),Bs=n("code"),ac=r("jax.numpy.bfloat16"),rc=r(". This returns a new "),Is=n("code"),ic=r("params"),lc=r(` tree and does not cast
the `),Vs=n("code"),dc=r("params"),cc=r(" in place."),pc=d(),zs=n("p"),fc=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.`),mc=d(),u(at.$$.fragment),uc=d(),J=n("div"),u(No.$$.fragment),hc=d(),Q=n("p"),gc=r("Cast the floating-point "),Ks=n("code"),_c=r("params"),vc=r(" to "),Ss=n("code"),bc=r("jax.numpy.float16"),xc=r(". This returns a new "),Xs=n("code"),yc=r("params"),$c=r(` tree and does not cast the
`),Ws=n("code"),wc=r("params"),Dc=r(" in place."),kc=d(),Qs=n("p"),Mc=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.`),Tc=d(),u(rt.$$.fragment),Ec=d(),ie=n("div"),u(Uo.$$.fragment),Nc=d(),H=n("p"),Uc=r("Cast the floating-point "),Hs=n("code"),Ac=r("params"),Fc=r(" to "),Ys=n("code"),Cc=r("jax.numpy.float32"),Oc=r(`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Gs=n("code"),jc=r("params"),qc=r(" tree and does not cast the "),Js=n("code"),Pc=r("params"),Lc=r(" in place."),Bc=d(),u(it.$$.fragment),nr=d(),Fe=n("h2"),lt=n("a"),Rs=n("span"),u(Ao.$$.fragment),Ic=d(),Zs=n("span"),Vc=r("FlaxUNet2DConditionOutput"),sr=d(),Ce=n("div"),u(Fo.$$.fragment),zc=d(),dt=n("div"),u(Co.$$.fragment),Kc=d(),ea=n("p"),Sc=r("\u201CReturns a new object replacing the specified fields with new values."),ar=d(),Oe=n("h2"),ct=n("a"),ta=n("span"),u(Oo.$$.fragment),Xc=d(),oa=n("span"),Wc=r("FlaxUNet2DConditionModel"),rr=d(),C=n("div"),u(jo.$$.fragment),Qc=d(),na=n("p"),Hc=r(`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),Yc=d(),qo=n("p"),Gc=r("This model inherits from "),wn=n("a"),Jc=r("FlaxModelMixin"),Rc=r(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Zc=d(),Po=n("p"),ep=r("Also, this model is a Flax Linen "),Lo=n("a"),tp=r("flax.linen.Module"),op=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.`),np=d(),sa=n("p"),sp=r("Finally, this model supports inherent JAX features such as:"),ap=d(),ee=n("ul"),aa=n("li"),Bo=n("a"),rp=r("Just-In-Time (JIT) compilation"),ip=d(),ra=n("li"),Io=n("a"),lp=r("Automatic Differentiation"),dp=d(),ia=n("li"),Vo=n("a"),cp=r("Vectorization"),pp=d(),la=n("li"),zo=n("a"),fp=r("Parallelization"),ir=d(),je=n("h2"),pt=n("a"),da=n("span"),u(Ko.$$.fragment),mp=d(),ca=n("span"),up=r("FlaxDecoderOutput"),lr=d(),te=n("div"),u(So.$$.fragment),hp=d(),pa=n("p"),gp=r("Output of decoding method."),_p=d(),ft=n("div"),u(Xo.$$.fragment),vp=d(),fa=n("p"),bp=r("\u201CReturns a new object replacing the specified fields with new values."),dr=d(),qe=n("h2"),mt=n("a"),ma=n("span"),u(Wo.$$.fragment),xp=d(),ua=n("span"),yp=r("FlaxAutoencoderKLOutput"),cr=d(),oe=n("div"),u(Qo.$$.fragment),$p=d(),ha=n("p"),wp=r("Output of AutoencoderKL encoding method."),Dp=d(),ut=n("div"),u(Ho.$$.fragment),kp=d(),ga=n("p"),Mp=r("\u201CReturns a new object replacing the specified fields with new values."),pr=d(),Pe=n("h2"),ht=n("a"),_a=n("span"),u(Yo.$$.fragment),Tp=d(),va=n("span"),Ep=r("FlaxAutoencoderKL"),fr=d(),j=n("div"),u(Go.$$.fragment),Np=d(),ba=n("p"),Up=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.`),Ap=d(),Jo=n("p"),Fp=r("This model is a Flax Linen "),Ro=n("a"),Cp=r("flax.linen.Module"),Op=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.`),jp=d(),xa=n("p"),qp=r("Finally, this model supports inherent JAX features such as:"),Pp=d(),ne=n("ul"),ya=n("li"),Zo=n("a"),Lp=r("Just-In-Time (JIT) compilation"),Bp=d(),$a=n("li"),en=n("a"),Ip=r("Automatic Differentiation"),Vp=d(),wa=n("li"),tn=n("a"),zp=r("Vectorization"),Kp=d(),Da=n("li"),on=n("a"),Sp=r("Parallelization"),this.h()},l(t){const p=Bu('[data-svelte="svelte-1phssyn"]',document.head);x=s(p,"META",{name:!0,content:!0}),p.forEach(o),M=c(t),$=s(t,"H1",{class:!0});var nn=a($);y=s(nn,"A",{id:!0,class:!0,href:!0});var ka=a(y);k=s(ka,"SPAN",{});var Ma=a(k);h(m.$$.fragment,Ma),Ma.forEach(o),ka.forEach(o),w=c(nn),Y=s(nn,"SPAN",{});var Ta=a(Y);me=i(Ta,"Models"),Ta.forEach(o),nn.forEach(o),B=c(t),I=s(t,"P",{});var Le=a(I);an=i(Le,`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`),Un=s(Le,"EM",{});var Ea=a(Un);ii=i(Ea,"\\theta(\\mathbf{x}"),Ea.forEach(o),li=i(Le,`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),An=s(Le,"CODE",{});var Qp=a(An);di=i(Qp,"torch.nn.module"),Qp.forEach(o),ci=i(Le," with basic functionality for saving and loading models both locally and from the HuggingFace hub."),Le.forEach(o),Na=c(t),ue=s(t,"H2",{class:!0});var ur=a(ue);Be=s(ur,"A",{id:!0,class:!0,href:!0});var Hp=a(Be);Fn=s(Hp,"SPAN",{});var Yp=a(Fn);h(kt.$$.fragment,Yp),Yp.forEach(o),Hp.forEach(o),pi=c(ur),Cn=s(ur,"SPAN",{});var Gp=a(Cn);fi=i(Gp,"ModelMixin"),Gp.forEach(o),ur.forEach(o),Ua=c(t),T=s(t,"DIV",{class:!0});var A=a(T);h(Mt.$$.fragment,A),mi=c(A),On=s(A,"P",{});var Jp=a(On);ui=i(Jp,"Base class for all models."),Jp.forEach(o),hi=c(A),rn=s(A,"P",{});var Xp=a(rn);ln=s(Xp,"A",{href:!0});var Rp=a(ln);gi=i(Rp,"ModelMixin"),Rp.forEach(o),_i=i(Xp,` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),Xp.forEach(o),vi=c(A),jn=s(A,"UL",{});var Zp=a(jn);se=s(Zp,"LI",{});var sn=a(se);qn=s(sn,"STRONG",{});var ef=a(qn);bi=i(ef,"config_name"),ef.forEach(o),xi=i(sn," ("),Pn=s(sn,"CODE",{});var tf=a(Pn);yi=i(tf,"str"),tf.forEach(o),$i=i(sn,`) \u2014 A filename under which the model should be stored when calling
`),dn=s(sn,"A",{href:!0});var of=a(dn);wi=i(of,"save_pretrained()"),of.forEach(o),Di=i(sn,"."),sn.forEach(o),Zp.forEach(o),ki=c(A),ae=s(A,"DIV",{class:!0});var Dn=a(ae);h(Tt.$$.fragment,Dn),Mi=c(Dn),Ln=s(Dn,"P",{});var nf=a(Ln);Ti=i(nf,"Deactivates gradient checkpointing for the current model."),nf.forEach(o),Ei=c(Dn),Bn=s(Dn,"P",{});var sf=a(Bn);Ni=i(sf,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),sf.forEach(o),Dn.forEach(o),Ui=c(A),re=s(A,"DIV",{class:!0});var kn=a(re);h(Et.$$.fragment,kn),Ai=c(kn),In=s(kn,"P",{});var af=a(In);Fi=i(af,"Activates gradient checkpointing for the current model."),af.forEach(o),Ci=c(kn),Vn=s(kn,"P",{});var rf=a(Vn);Oi=i(rf,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),rf.forEach(o),kn.forEach(o),ji=c(A),U=s(A,"DIV",{class:!0});var L=a(U);h(Nt.$$.fragment,L),qi=c(L),zn=s(L,"P",{});var lf=a(zn);Pi=i(lf,"Instantiate a pretrained pytorch model from a pre-trained model configuration."),lf.forEach(o),Li=c(L),he=s(L,"P",{});var Mn=a(he);Bi=i(Mn,"The model is set in evaluation mode by default using "),Kn=s(Mn,"CODE",{});var df=a(Kn);Ii=i(df,"model.eval()"),df.forEach(o),Vi=i(Mn,` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Sn=s(Mn,"CODE",{});var cf=a(Sn);zi=i(cf,"model.train()"),cf.forEach(o),Ki=i(Mn,"."),Mn.forEach(o),Si=c(L),Ut=s(L,"P",{});var hr=a(Ut);Xi=i(hr,"The warning "),Xn=s(hr,"EM",{});var pf=a(Xn);Wi=i(pf,"Weights from XXX not initialized from pretrained model"),pf.forEach(o),Qi=i(hr,` 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.`),hr.forEach(o),Hi=c(L),At=s(L,"P",{});var gr=a(At);Yi=i(gr,"The warning "),Wn=s(gr,"EM",{});var ff=a(Wn);Gi=i(ff,"Weights from XXX not used in YYY"),ff.forEach(o),Ji=i(gr,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),gr.forEach(o),Ri=c(L),h(Ie.$$.fragment,L),Zi=c(L),h(Ve.$$.fragment,L),L.forEach(o),el=c(A),ze=s(A,"DIV",{class:!0});var _r=a(ze);h(Ft.$$.fragment,_r),tl=c(_r),Qn=s(_r,"P",{});var mf=a(Qn);ol=i(mf,"Get number of (optionally, trainable or non-embeddings) parameters in the module."),mf.forEach(o),_r.forEach(o),nl=c(A),Ke=s(A,"DIV",{class:!0});var vr=a(Ke);h(Ct.$$.fragment,vr),sl=c(vr),Ot=s(vr,"P",{});var br=a(Ot);al=i(br,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Hn=s(br,"CODE",{});var uf=a(Hn);rl=i(uf,"[from_pretrained()](/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin.from_pretrained)"),uf.forEach(o),il=i(br," class method."),br.forEach(o),vr.forEach(o),A.forEach(o),Aa=c(t),ge=s(t,"H2",{class:!0});var xr=a(ge);Se=s(xr,"A",{id:!0,class:!0,href:!0});var hf=a(Se);Yn=s(hf,"SPAN",{});var gf=a(Yn);h(jt.$$.fragment,gf),gf.forEach(o),hf.forEach(o),ll=c(xr),Gn=s(xr,"SPAN",{});var _f=a(Gn);dl=i(_f,"UNet2DOutput"),_f.forEach(o),xr.forEach(o),Fa=c(t),qt=s(t,"DIV",{class:!0});var vf=a(qt);h(Pt.$$.fragment,vf),vf.forEach(o),Ca=c(t),_e=s(t,"H2",{class:!0});var yr=a(_e);Xe=s(yr,"A",{id:!0,class:!0,href:!0});var bf=a(Xe);Jn=s(bf,"SPAN",{});var xf=a(Jn);h(Lt.$$.fragment,xf),xf.forEach(o),bf.forEach(o),cl=c(yr),Rn=s(yr,"SPAN",{});var yf=a(Rn);pl=i(yf,"UNet1DModel"),yf.forEach(o),yr.forEach(o),Oa=c(t),V=s(t,"DIV",{class:!0});var gt=a(V);h(Bt.$$.fragment,gt),fl=c(gt),Zn=s(gt,"P",{});var $f=a(Zn);ml=i($f,"UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),$f.forEach(o),ul=c(gt),It=s(gt,"P",{});var $r=a(It);hl=i($r,"This model inherits from "),cn=s($r,"A",{href:!0});var wf=a(cn);gl=i(wf,"ModelMixin"),wf.forEach(o),_l=i($r,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),$r.forEach(o),vl=c(gt),pn=s(gt,"DIV",{class:!0});var Df=a(pn);h(Vt.$$.fragment,Df),Df.forEach(o),gt.forEach(o),ja=c(t),ve=s(t,"H2",{class:!0});var wr=a(ve);We=s(wr,"A",{id:!0,class:!0,href:!0});var kf=a(We);es=s(kf,"SPAN",{});var Mf=a(es);h(zt.$$.fragment,Mf),Mf.forEach(o),kf.forEach(o),bl=c(wr),ts=s(wr,"SPAN",{});var Tf=a(ts);xl=i(Tf,"UNet2DModel"),Tf.forEach(o),wr.forEach(o),qa=c(t),z=s(t,"DIV",{class:!0});var _t=a(z);h(Kt.$$.fragment,_t),yl=c(_t),os=s(_t,"P",{});var Ef=a(os);$l=i(Ef,"UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Ef.forEach(o),wl=c(_t),St=s(_t,"P",{});var Dr=a(St);Dl=i(Dr,"This model inherits from "),fn=s(Dr,"A",{href:!0});var Nf=a(fn);kl=i(Nf,"ModelMixin"),Nf.forEach(o),Ml=i(Dr,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Dr.forEach(o),Tl=c(_t),mn=s(_t,"DIV",{class:!0});var Uf=a(mn);h(Xt.$$.fragment,Uf),Uf.forEach(o),_t.forEach(o),Pa=c(t),be=s(t,"H2",{class:!0});var kr=a(be);Qe=s(kr,"A",{id:!0,class:!0,href:!0});var Af=a(Qe);ns=s(Af,"SPAN",{});var Ff=a(ns);h(Wt.$$.fragment,Ff),Ff.forEach(o),Af.forEach(o),El=c(kr),ss=s(kr,"SPAN",{});var Cf=a(ss);Nl=i(Cf,"UNet2DConditionOutput"),Cf.forEach(o),kr.forEach(o),La=c(t),Qt=s(t,"DIV",{class:!0});var Of=a(Qt);h(Ht.$$.fragment,Of),Of.forEach(o),Ba=c(t),xe=s(t,"H2",{class:!0});var Mr=a(xe);He=s(Mr,"A",{id:!0,class:!0,href:!0});var jf=a(He);as=s(jf,"SPAN",{});var qf=a(as);h(Yt.$$.fragment,qf),qf.forEach(o),jf.forEach(o),Ul=c(Mr),rs=s(Mr,"SPAN",{});var Pf=a(rs);Al=i(Pf,"UNet2DConditionModel"),Pf.forEach(o),Mr.forEach(o),Ia=c(t),K=s(t,"DIV",{class:!0});var vt=a(K);h(Gt.$$.fragment,vt),Fl=c(vt),is=s(vt,"P",{});var Lf=a(is);Cl=i(Lf,`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Lf.forEach(o),Ol=c(vt),Jt=s(vt,"P",{});var Tr=a(Jt);jl=i(Tr,"This model inherits from "),un=s(Tr,"A",{href:!0});var Bf=a(un);ql=i(Bf,"ModelMixin"),Bf.forEach(o),Pl=i(Tr,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Tr.forEach(o),Ll=c(vt),hn=s(vt,"DIV",{class:!0});var If=a(hn);h(Rt.$$.fragment,If),If.forEach(o),vt.forEach(o),Va=c(t),ye=s(t,"H2",{class:!0});var Er=a(ye);Ye=s(Er,"A",{id:!0,class:!0,href:!0});var Vf=a(Ye);ls=s(Vf,"SPAN",{});var zf=a(ls);h(Zt.$$.fragment,zf),zf.forEach(o),Vf.forEach(o),Bl=c(Er),ds=s(Er,"SPAN",{});var Kf=a(ds);Il=i(Kf,"DecoderOutput"),Kf.forEach(o),Er.forEach(o),za=c(t),$e=s(t,"DIV",{class:!0});var Nr=a($e);h(eo.$$.fragment,Nr),Vl=c(Nr),cs=s(Nr,"P",{});var Sf=a(cs);zl=i(Sf,"Output of decoding method."),Sf.forEach(o),Nr.forEach(o),Ka=c(t),we=s(t,"H2",{class:!0});var Ur=a(we);Ge=s(Ur,"A",{id:!0,class:!0,href:!0});var Xf=a(Ge);ps=s(Xf,"SPAN",{});var Wf=a(ps);h(to.$$.fragment,Wf),Wf.forEach(o),Xf.forEach(o),Kl=c(Ur),fs=s(Ur,"SPAN",{});var Qf=a(fs);Sl=i(Qf,"VQEncoderOutput"),Qf.forEach(o),Ur.forEach(o),Sa=c(t),De=s(t,"DIV",{class:!0});var Ar=a(De);h(oo.$$.fragment,Ar),Xl=c(Ar),ms=s(Ar,"P",{});var Hf=a(ms);Wl=i(Hf,"Output of VQModel encoding method."),Hf.forEach(o),Ar.forEach(o),Xa=c(t),ke=s(t,"H2",{class:!0});var Fr=a(ke);Je=s(Fr,"A",{id:!0,class:!0,href:!0});var Yf=a(Je);us=s(Yf,"SPAN",{});var Gf=a(us);h(no.$$.fragment,Gf),Gf.forEach(o),Yf.forEach(o),Ql=c(Fr),hs=s(Fr,"SPAN",{});var Jf=a(hs);Hl=i(Jf,"VQModel"),Jf.forEach(o),Fr.forEach(o),Wa=c(t),S=s(t,"DIV",{class:!0});var bt=a(S);h(so.$$.fragment,bt),Yl=c(bt),gs=s(bt,"P",{});var Rf=a(gs);Gl=i(Rf,`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),Rf.forEach(o),Jl=c(bt),ao=s(bt,"P",{});var Cr=a(ao);Rl=i(Cr,"This model inherits from "),gn=s(Cr,"A",{href:!0});var Zf=a(gn);Zl=i(Zf,"ModelMixin"),Zf.forEach(o),ed=i(Cr,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Cr.forEach(o),td=c(bt),_n=s(bt,"DIV",{class:!0});var em=a(_n);h(ro.$$.fragment,em),em.forEach(o),bt.forEach(o),Qa=c(t),Me=s(t,"H2",{class:!0});var Or=a(Me);Re=s(Or,"A",{id:!0,class:!0,href:!0});var tm=a(Re);_s=s(tm,"SPAN",{});var om=a(_s);h(io.$$.fragment,om),om.forEach(o),tm.forEach(o),od=c(Or),vs=s(Or,"SPAN",{});var nm=a(vs);nd=i(nm,"AutoencoderKLOutput"),nm.forEach(o),Or.forEach(o),Ha=c(t),Te=s(t,"DIV",{class:!0});var jr=a(Te);h(lo.$$.fragment,jr),sd=c(jr),bs=s(jr,"P",{});var sm=a(bs);ad=i(sm,"Output of AutoencoderKL encoding method."),sm.forEach(o),jr.forEach(o),Ya=c(t),Ee=s(t,"H2",{class:!0});var qr=a(Ee);Ze=s(qr,"A",{id:!0,class:!0,href:!0});var am=a(Ze);xs=s(am,"SPAN",{});var rm=a(xs);h(co.$$.fragment,rm),rm.forEach(o),am.forEach(o),rd=c(qr),ys=s(qr,"SPAN",{});var im=a(ys);id=i(im,"AutoencoderKL"),im.forEach(o),qr.forEach(o),Ga=c(t),X=s(t,"DIV",{class:!0});var xt=a(X);h(po.$$.fragment,xt),ld=c(xt),$s=s(xt,"P",{});var lm=a($s);dd=i(lm,`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),lm.forEach(o),cd=c(xt),fo=s(xt,"P",{});var Pr=a(fo);pd=i(Pr,"This model inherits from "),vn=s(Pr,"A",{href:!0});var dm=a(vn);fd=i(dm,"ModelMixin"),dm.forEach(o),md=i(Pr,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Pr.forEach(o),ud=c(xt),bn=s(xt,"DIV",{class:!0});var cm=a(bn);h(mo.$$.fragment,cm),cm.forEach(o),xt.forEach(o),Ja=c(t),Ne=s(t,"H2",{class:!0});var Lr=a(Ne);et=s(Lr,"A",{id:!0,class:!0,href:!0});var pm=a(et);ws=s(pm,"SPAN",{});var fm=a(ws);h(uo.$$.fragment,fm),fm.forEach(o),pm.forEach(o),hd=c(Lr),Ds=s(Lr,"SPAN",{});var mm=a(Ds);gd=i(mm,"Transformer2DModel"),mm.forEach(o),Lr.forEach(o),Ra=c(t),F=s(t,"DIV",{class:!0});var R=a(F);h(ho.$$.fragment,R),_d=c(R),ks=s(R,"P",{});var um=a(ks);vd=i(um,`Transformer model for image-like data. Takes either discrete (classes of vector embeddings) or continuous (actual
embeddings) inputs.`),um.forEach(o),bd=c(R),Ms=s(R,"P",{});var hm=a(Ms);xd=i(hm,`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.`),hm.forEach(o),yd=c(R),go=s(R,"P",{});var Br=a(go);$d=i(Br,`When input is discrete: First, input (classes of latent pixels) is converted to embeddings and has positional
embeddings applied, see `),Ts=s(Br,"CODE",{});var gm=a(Ts);wd=i(gm,"ImagePositionalEmbeddings"),gm.forEach(o),Dd=i(Br,`. Then apply standard transformer action. Finally, predict
classes of unnoised image.`),Br.forEach(o),kd=c(R),Es=s(R,"P",{});var _m=a(Es);Md=i(_m,`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.forEach(o),Td=c(R),xn=s(R,"DIV",{class:!0});var vm=a(xn);h(_o.$$.fragment,vm),vm.forEach(o),R.forEach(o),Za=c(t),Ue=s(t,"H2",{class:!0});var Ir=a(Ue);tt=s(Ir,"A",{id:!0,class:!0,href:!0});var bm=a(tt);Ns=s(bm,"SPAN",{});var xm=a(Ns);h(vo.$$.fragment,xm),xm.forEach(o),bm.forEach(o),Ed=c(Ir),Us=s(Ir,"SPAN",{});var ym=a(Us);Nd=i(ym,"Transformer2DModelOutput"),ym.forEach(o),Ir.forEach(o),er=c(t),bo=s(t,"DIV",{class:!0});var $m=a(bo);h(xo.$$.fragment,$m),$m.forEach(o),tr=c(t),Ae=s(t,"H2",{class:!0});var Vr=a(Ae);ot=s(Vr,"A",{id:!0,class:!0,href:!0});var wm=a(ot);As=s(wm,"SPAN",{});var Dm=a(As);h(yo.$$.fragment,Dm),Dm.forEach(o),wm.forEach(o),Ud=c(Vr),Fs=s(Vr,"SPAN",{});var km=a(Fs);Ad=i(km,"FlaxModelMixin"),km.forEach(o),Vr.forEach(o),or=c(t),E=s(t,"DIV",{class:!0});var O=a(E);h($o.$$.fragment,O),Fd=c(O),Cs=s(O,"P",{});var Mm=a(Cs);Cd=i(Mm,"Base class for all flax models."),Mm.forEach(o),Od=c(O),yn=s(O,"P",{});var Wp=a(yn);$n=s(Wp,"A",{href:!0});var Tm=a($n);jd=i(Tm,"FlaxModelMixin"),Tm.forEach(o),qd=i(Wp,` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Wp.forEach(o),Pd=c(O),P=s(O,"DIV",{class:!0});var le=a(P);h(wo.$$.fragment,le),Ld=c(le),Os=s(le,"P",{});var Em=a(Os);Bd=i(Em,"Instantiate a pretrained flax model from a pre-trained model configuration."),Em.forEach(o),Id=c(le),Do=s(le,"P",{});var zr=a(Do);Vd=i(zr,"The warning "),js=s(zr,"EM",{});var Nm=a(js);zd=i(Nm,"Weights from XXX not initialized from pretrained model"),Nm.forEach(o),Kd=i(zr,` 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.`),zr.forEach(o),Sd=c(le),ko=s(le,"P",{});var Kr=a(ko);Xd=i(Kr,"The warning "),qs=s(Kr,"EM",{});var Um=a(qs);Wd=i(Um,"Weights from XXX not used in YYY"),Um.forEach(o),Qd=i(Kr,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Kr.forEach(o),Hd=c(le),h(nt.$$.fragment,le),le.forEach(o),Yd=c(O),st=s(O,"DIV",{class:!0});var Sr=a(st);h(Mo.$$.fragment,Sr),Gd=c(Sr),To=s(Sr,"P",{});var Xr=a(To);Jd=i(Xr,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),Ps=s(Xr,"CODE",{});var Am=a(Ps);Rd=i(Am,"[from_pretrained()](/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.FlaxModelMixin.from_pretrained)"),Am.forEach(o),Zd=i(Xr," class method"),Xr.forEach(o),Sr.forEach(o),ec=c(O),G=s(O,"DIV",{class:!0});var yt=a(G);h(Eo.$$.fragment,yt),tc=c(yt),W=s(yt,"P",{});var de=a(W);oc=i(de,"Cast the floating-point "),Ls=s(de,"CODE",{});var Fm=a(Ls);nc=i(Fm,"params"),Fm.forEach(o),sc=i(de," to "),Bs=s(de,"CODE",{});var Cm=a(Bs);ac=i(Cm,"jax.numpy.bfloat16"),Cm.forEach(o),rc=i(de,". This returns a new "),Is=s(de,"CODE",{});var Om=a(Is);ic=i(Om,"params"),Om.forEach(o),lc=i(de,` tree and does not cast
the `),Vs=s(de,"CODE",{});var jm=a(Vs);dc=i(jm,"params"),jm.forEach(o),cc=i(de," in place."),de.forEach(o),pc=c(yt),zs=s(yt,"P",{});var qm=a(zs);fc=i(qm,`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.`),qm.forEach(o),mc=c(yt),h(at.$$.fragment,yt),yt.forEach(o),uc=c(O),J=s(O,"DIV",{class:!0});var $t=a(J);h(No.$$.fragment,$t),hc=c($t),Q=s($t,"P",{});var ce=a(Q);gc=i(ce,"Cast the floating-point "),Ks=s(ce,"CODE",{});var Pm=a(Ks);_c=i(Pm,"params"),Pm.forEach(o),vc=i(ce," to "),Ss=s(ce,"CODE",{});var Lm=a(Ss);bc=i(Lm,"jax.numpy.float16"),Lm.forEach(o),xc=i(ce,". This returns a new "),Xs=s(ce,"CODE",{});var Bm=a(Xs);yc=i(Bm,"params"),Bm.forEach(o),$c=i(ce,` tree and does not cast the
`),Ws=s(ce,"CODE",{});var Im=a(Ws);wc=i(Im,"params"),Im.forEach(o),Dc=i(ce," in place."),ce.forEach(o),kc=c($t),Qs=s($t,"P",{});var Vm=a(Qs);Mc=i(Vm,`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.`),Vm.forEach(o),Tc=c($t),h(rt.$$.fragment,$t),$t.forEach(o),Ec=c(O),ie=s(O,"DIV",{class:!0});var Tn=a(ie);h(Uo.$$.fragment,Tn),Nc=c(Tn),H=s(Tn,"P",{});var pe=a(H);Uc=i(pe,"Cast the floating-point "),Hs=s(pe,"CODE",{});var zm=a(Hs);Ac=i(zm,"params"),zm.forEach(o),Fc=i(pe," to "),Ys=s(pe,"CODE",{});var Km=a(Ys);Cc=i(Km,"jax.numpy.float32"),Km.forEach(o),Oc=i(pe,`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Gs=s(pe,"CODE",{});var Sm=a(Gs);jc=i(Sm,"params"),Sm.forEach(o),qc=i(pe," tree and does not cast the "),Js=s(pe,"CODE",{});var Xm=a(Js);Pc=i(Xm,"params"),Xm.forEach(o),Lc=i(pe," in place."),pe.forEach(o),Bc=c(Tn),h(it.$$.fragment,Tn),Tn.forEach(o),O.forEach(o),nr=c(t),Fe=s(t,"H2",{class:!0});var Wr=a(Fe);lt=s(Wr,"A",{id:!0,class:!0,href:!0});var Wm=a(lt);Rs=s(Wm,"SPAN",{});var Qm=a(Rs);h(Ao.$$.fragment,Qm),Qm.forEach(o),Wm.forEach(o),Ic=c(Wr),Zs=s(Wr,"SPAN",{});var Hm=a(Zs);Vc=i(Hm,"FlaxUNet2DConditionOutput"),Hm.forEach(o),Wr.forEach(o),sr=c(t),Ce=s(t,"DIV",{class:!0});var Qr=a(Ce);h(Fo.$$.fragment,Qr),zc=c(Qr),dt=s(Qr,"DIV",{class:!0});var Hr=a(dt);h(Co.$$.fragment,Hr),Kc=c(Hr),ea=s(Hr,"P",{});var Ym=a(ea);Sc=i(Ym,"\u201CReturns a new object replacing the specified fields with new values."),Ym.forEach(o),Hr.forEach(o),Qr.forEach(o),ar=c(t),Oe=s(t,"H2",{class:!0});var Yr=a(Oe);ct=s(Yr,"A",{id:!0,class:!0,href:!0});var Gm=a(ct);ta=s(Gm,"SPAN",{});var Jm=a(ta);h(Oo.$$.fragment,Jm),Jm.forEach(o),Gm.forEach(o),Xc=c(Yr),oa=s(Yr,"SPAN",{});var Rm=a(oa);Wc=i(Rm,"FlaxUNet2DConditionModel"),Rm.forEach(o),Yr.forEach(o),rr=c(t),C=s(t,"DIV",{class:!0});var Z=a(C);h(jo.$$.fragment,Z),Qc=c(Z),na=s(Z,"P",{});var Zm=a(na);Hc=i(Zm,`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),Zm.forEach(o),Yc=c(Z),qo=s(Z,"P",{});var Gr=a(qo);Gc=i(Gr,"This model inherits from "),wn=s(Gr,"A",{href:!0});var eu=a(wn);Jc=i(eu,"FlaxModelMixin"),eu.forEach(o),Rc=i(Gr,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),Gr.forEach(o),Zc=c(Z),Po=s(Z,"P",{});var Jr=a(Po);ep=i(Jr,"Also, this model is a Flax Linen "),Lo=s(Jr,"A",{href:!0,rel:!0});var tu=a(Lo);tp=i(tu,"flax.linen.Module"),tu.forEach(o),op=i(Jr,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Jr.forEach(o),np=c(Z),sa=s(Z,"P",{});var ou=a(sa);sp=i(ou,"Finally, this model supports inherent JAX features such as:"),ou.forEach(o),ap=c(Z),ee=s(Z,"UL",{});var wt=a(ee);aa=s(wt,"LI",{});var nu=a(aa);Bo=s(nu,"A",{href:!0,rel:!0});var su=a(Bo);rp=i(su,"Just-In-Time (JIT) compilation"),su.forEach(o),nu.forEach(o),ip=c(wt),ra=s(wt,"LI",{});var au=a(ra);Io=s(au,"A",{href:!0,rel:!0});var ru=a(Io);lp=i(ru,"Automatic Differentiation"),ru.forEach(o),au.forEach(o),dp=c(wt),ia=s(wt,"LI",{});var iu=a(ia);Vo=s(iu,"A",{href:!0,rel:!0});var lu=a(Vo);cp=i(lu,"Vectorization"),lu.forEach(o),iu.forEach(o),pp=c(wt),la=s(wt,"LI",{});var du=a(la);zo=s(du,"A",{href:!0,rel:!0});var cu=a(zo);fp=i(cu,"Parallelization"),cu.forEach(o),du.forEach(o),wt.forEach(o),Z.forEach(o),ir=c(t),je=s(t,"H2",{class:!0});var Rr=a(je);pt=s(Rr,"A",{id:!0,class:!0,href:!0});var pu=a(pt);da=s(pu,"SPAN",{});var fu=a(da);h(Ko.$$.fragment,fu),fu.forEach(o),pu.forEach(o),mp=c(Rr),ca=s(Rr,"SPAN",{});var mu=a(ca);up=i(mu,"FlaxDecoderOutput"),mu.forEach(o),Rr.forEach(o),lr=c(t),te=s(t,"DIV",{class:!0});var En=a(te);h(So.$$.fragment,En),hp=c(En),pa=s(En,"P",{});var uu=a(pa);gp=i(uu,"Output of decoding method."),uu.forEach(o),_p=c(En),ft=s(En,"DIV",{class:!0});var Zr=a(ft);h(Xo.$$.fragment,Zr),vp=c(Zr),fa=s(Zr,"P",{});var hu=a(fa);bp=i(hu,"\u201CReturns a new object replacing the specified fields with new values."),hu.forEach(o),Zr.forEach(o),En.forEach(o),dr=c(t),qe=s(t,"H2",{class:!0});var ei=a(qe);mt=s(ei,"A",{id:!0,class:!0,href:!0});var gu=a(mt);ma=s(gu,"SPAN",{});var _u=a(ma);h(Wo.$$.fragment,_u),_u.forEach(o),gu.forEach(o),xp=c(ei),ua=s(ei,"SPAN",{});var vu=a(ua);yp=i(vu,"FlaxAutoencoderKLOutput"),vu.forEach(o),ei.forEach(o),cr=c(t),oe=s(t,"DIV",{class:!0});var Nn=a(oe);h(Qo.$$.fragment,Nn),$p=c(Nn),ha=s(Nn,"P",{});var bu=a(ha);wp=i(bu,"Output of AutoencoderKL encoding method."),bu.forEach(o),Dp=c(Nn),ut=s(Nn,"DIV",{class:!0});var ti=a(ut);h(Ho.$$.fragment,ti),kp=c(ti),ga=s(ti,"P",{});var xu=a(ga);Mp=i(xu,"\u201CReturns a new object replacing the specified fields with new values."),xu.forEach(o),ti.forEach(o),Nn.forEach(o),pr=c(t),Pe=s(t,"H2",{class:!0});var oi=a(Pe);ht=s(oi,"A",{id:!0,class:!0,href:!0});var yu=a(ht);_a=s(yu,"SPAN",{});var $u=a(_a);h(Yo.$$.fragment,$u),$u.forEach(o),yu.forEach(o),Tp=c(oi),va=s(oi,"SPAN",{});var wu=a(va);Ep=i(wu,"FlaxAutoencoderKL"),wu.forEach(o),oi.forEach(o),fr=c(t),j=s(t,"DIV",{class:!0});var fe=a(j);h(Go.$$.fragment,fe),Np=c(fe),ba=s(fe,"P",{});var Du=a(ba);Up=i(Du,`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),Du.forEach(o),Ap=c(fe),Jo=s(fe,"P",{});var ni=a(Jo);Fp=i(ni,"This model is a Flax Linen "),Ro=s(ni,"A",{href:!0,rel:!0});var ku=a(Ro);Cp=i(ku,"flax.linen.Module"),ku.forEach(o),Op=i(ni,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ni.forEach(o),jp=c(fe),xa=s(fe,"P",{});var Mu=a(xa);qp=i(Mu,"Finally, this model supports inherent JAX features such as:"),Mu.forEach(o),Pp=c(fe),ne=s(fe,"UL",{});var Dt=a(ne);ya=s(Dt,"LI",{});var Tu=a(ya);Zo=s(Tu,"A",{href:!0,rel:!0});var Eu=a(Zo);Lp=i(Eu,"Just-In-Time (JIT) compilation"),Eu.forEach(o),Tu.forEach(o),Bp=c(Dt),$a=s(Dt,"LI",{});var Nu=a($a);en=s(Nu,"A",{href:!0,rel:!0});var Uu=a(en);Ip=i(Uu,"Automatic Differentiation"),Uu.forEach(o),Nu.forEach(o),Vp=c(Dt),wa=s(Dt,"LI",{});var Au=a(wa);tn=s(Au,"A",{href:!0,rel:!0});var Fu=a(tn);zp=i(Fu,"Vectorization"),Fu.forEach(o),Au.forEach(o),Kp=c(Dt),Da=s(Dt,"LI",{});var Cu=a(Da);on=s(Cu,"A",{href:!0,rel:!0});var Ou=a(on);Sp=i(Ou,"Parallelization"),Ou.forEach(o),Cu.forEach(o),Dt.forEach(o),fe.forEach(o),this.h()},h(){l(x,"name","hf:doc:metadata"),l(x,"content",JSON.stringify(Hu)),l(y,"id","models"),l(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"),l(y,"href","#models"),l($,"class","relative group"),l(Be,"id","diffusers.ModelMixin"),l(Be,"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"),l(Be,"href","#diffusers.ModelMixin"),l(ue,"class","relative group"),l(ln,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin"),l(dn,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin.save_pretrained"),l(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Se,"id","diffusers.models.unet_2d.UNet2DOutput"),l(Se,"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"),l(Se,"href","#diffusers.models.unet_2d.UNet2DOutput"),l(ge,"class","relative group"),l(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Xe,"id","diffusers.UNet1DModel"),l(Xe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Xe,"href","#diffusers.UNet1DModel"),l(_e,"class","relative group"),l(cn,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin"),l(pn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(We,"id","diffusers.UNet2DModel"),l(We,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(We,"href","#diffusers.UNet2DModel"),l(ve,"class","relative group"),l(fn,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin"),l(mn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Qe,"id","diffusers.models.unet_2d_condition.UNet2DConditionOutput"),l(Qe,"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"),l(Qe,"href","#diffusers.models.unet_2d_condition.UNet2DConditionOutput"),l(be,"class","relative group"),l(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(He,"id","diffusers.UNet2DConditionModel"),l(He,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(He,"href","#diffusers.UNet2DConditionModel"),l(xe,"class","relative group"),l(un,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin"),l(hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ye,"id","diffusers.models.vae.DecoderOutput"),l(Ye,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ye,"href","#diffusers.models.vae.DecoderOutput"),l(ye,"class","relative group"),l($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ge,"id","diffusers.models.vae.VQEncoderOutput"),l(Ge,"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"),l(Ge,"href","#diffusers.models.vae.VQEncoderOutput"),l(we,"class","relative group"),l(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Je,"id","diffusers.VQModel"),l(Je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Je,"href","#diffusers.VQModel"),l(ke,"class","relative group"),l(gn,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin"),l(_n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Re,"id","diffusers.models.vae.AutoencoderKLOutput"),l(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"),l(Re,"href","#diffusers.models.vae.AutoencoderKLOutput"),l(Me,"class","relative group"),l(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ze,"id","diffusers.AutoencoderKL"),l(Ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ze,"href","#diffusers.AutoencoderKL"),l(Ee,"class","relative group"),l(vn,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.ModelMixin"),l(bn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(et,"id","diffusers.Transformer2DModel"),l(et,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(et,"href","#diffusers.Transformer2DModel"),l(Ne,"class","relative group"),l(xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(tt,"id","diffusers.models.attention.Transformer2DModelOutput"),l(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"),l(tt,"href","#diffusers.models.attention.Transformer2DModelOutput"),l(Ue,"class","relative group"),l(bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ot,"id","diffusers.FlaxModelMixin"),l(ot,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(ot,"href","#diffusers.FlaxModelMixin"),l(Ae,"class","relative group"),l($n,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.FlaxModelMixin"),l(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(lt,"id","diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),l(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"),l(lt,"href","#diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),l(Fe,"class","relative group"),l(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ct,"id","diffusers.FlaxUNet2DConditionModel"),l(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"),l(ct,"href","#diffusers.FlaxUNet2DConditionModel"),l(Oe,"class","relative group"),l(wn,"href","/docs/diffusers/pr_1170/en/using-diffusers/loading#diffusers.FlaxModelMixin"),l(Lo,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),l(Lo,"rel","nofollow"),l(Bo,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Bo,"rel","nofollow"),l(Io,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Io,"rel","nofollow"),l(Vo,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(Vo,"rel","nofollow"),l(zo,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(zo,"rel","nofollow"),l(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(pt,"id","diffusers.models.vae_flax.FlaxDecoderOutput"),l(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"),l(pt,"href","#diffusers.models.vae_flax.FlaxDecoderOutput"),l(je,"class","relative group"),l(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(mt,"id","diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),l(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"),l(mt,"href","#diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),l(qe,"class","relative group"),l(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ht,"id","diffusers.FlaxAutoencoderKL"),l(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"),l(ht,"href","#diffusers.FlaxAutoencoderKL"),l(Pe,"class","relative group"),l(Ro,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),l(Ro,"rel","nofollow"),l(Zo,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Zo,"rel","nofollow"),l(en,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(en,"rel","nofollow"),l(tn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(tn,"rel","nofollow"),l(on,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(on,"rel","nofollow"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,p){e(document.head,x),f(t,M,p),f(t,$,p),e($,y),e(y,k),g(m,k,null),e($,w),e($,Y),e(Y,me),f(t,B,p),f(t,I,p),e(I,an),e(I,Un),e(Un,ii),e(I,li),e(I,An),e(An,di),e(I,ci),f(t,Na,p),f(t,ue,p),e(ue,Be),e(Be,Fn),g(kt,Fn,null),e(ue,pi),e(ue,Cn),e(Cn,fi),f(t,Ua,p),f(t,T,p),g(Mt,T,null),e(T,mi),e(T,On),e(On,ui),e(T,hi),e(T,rn),e(rn,ln),e(ln,gi),e(rn,_i),e(T,vi),e(T,jn),e(jn,se),e(se,qn),e(qn,bi),e(se,xi),e(se,Pn),e(Pn,yi),e(se,$i),e(se,dn),e(dn,wi),e(se,Di),e(T,ki),e(T,ae),g(Tt,ae,null),e(ae,Mi),e(ae,Ln),e(Ln,Ti),e(ae,Ei),e(ae,Bn),e(Bn,Ni),e(T,Ui),e(T,re),g(Et,re,null),e(re,Ai),e(re,In),e(In,Fi),e(re,Ci),e(re,Vn),e(Vn,Oi),e(T,ji),e(T,U),g(Nt,U,null),e(U,qi),e(U,zn),e(zn,Pi),e(U,Li),e(U,he),e(he,Bi),e(he,Kn),e(Kn,Ii),e(he,Vi),e(he,Sn),e(Sn,zi),e(he,Ki),e(U,Si),e(U,Ut),e(Ut,Xi),e(Ut,Xn),e(Xn,Wi),e(Ut,Qi),e(U,Hi),e(U,At),e(At,Yi),e(At,Wn),e(Wn,Gi),e(At,Ji),e(U,Ri),g(Ie,U,null),e(U,Zi),g(Ve,U,null),e(T,el),e(T,ze),g(Ft,ze,null),e(ze,tl),e(ze,Qn),e(Qn,ol),e(T,nl),e(T,Ke),g(Ct,Ke,null),e(Ke,sl),e(Ke,Ot),e(Ot,al),e(Ot,Hn),e(Hn,rl),e(Ot,il),f(t,Aa,p),f(t,ge,p),e(ge,Se),e(Se,Yn),g(jt,Yn,null),e(ge,ll),e(ge,Gn),e(Gn,dl),f(t,Fa,p),f(t,qt,p),g(Pt,qt,null),f(t,Ca,p),f(t,_e,p),e(_e,Xe),e(Xe,Jn),g(Lt,Jn,null),e(_e,cl),e(_e,Rn),e(Rn,pl),f(t,Oa,p),f(t,V,p),g(Bt,V,null),e(V,fl),e(V,Zn),e(Zn,ml),e(V,ul),e(V,It),e(It,hl),e(It,cn),e(cn,gl),e(It,_l),e(V,vl),e(V,pn),g(Vt,pn,null),f(t,ja,p),f(t,ve,p),e(ve,We),e(We,es),g(zt,es,null),e(ve,bl),e(ve,ts),e(ts,xl),f(t,qa,p),f(t,z,p),g(Kt,z,null),e(z,yl),e(z,os),e(os,$l),e(z,wl),e(z,St),e(St,Dl),e(St,fn),e(fn,kl),e(St,Ml),e(z,Tl),e(z,mn),g(Xt,mn,null),f(t,Pa,p),f(t,be,p),e(be,Qe),e(Qe,ns),g(Wt,ns,null),e(be,El),e(be,ss),e(ss,Nl),f(t,La,p),f(t,Qt,p),g(Ht,Qt,null),f(t,Ba,p),f(t,xe,p),e(xe,He),e(He,as),g(Yt,as,null),e(xe,Ul),e(xe,rs),e(rs,Al),f(t,Ia,p),f(t,K,p),g(Gt,K,null),e(K,Fl),e(K,is),e(is,Cl),e(K,Ol),e(K,Jt),e(Jt,jl),e(Jt,un),e(un,ql),e(Jt,Pl),e(K,Ll),e(K,hn),g(Rt,hn,null),f(t,Va,p),f(t,ye,p),e(ye,Ye),e(Ye,ls),g(Zt,ls,null),e(ye,Bl),e(ye,ds),e(ds,Il),f(t,za,p),f(t,$e,p),g(eo,$e,null),e($e,Vl),e($e,cs),e(cs,zl),f(t,Ka,p),f(t,we,p),e(we,Ge),e(Ge,ps),g(to,ps,null),e(we,Kl),e(we,fs),e(fs,Sl),f(t,Sa,p),f(t,De,p),g(oo,De,null),e(De,Xl),e(De,ms),e(ms,Wl),f(t,Xa,p),f(t,ke,p),e(ke,Je),e(Je,us),g(no,us,null),e(ke,Ql),e(ke,hs),e(hs,Hl),f(t,Wa,p),f(t,S,p),g(so,S,null),e(S,Yl),e(S,gs),e(gs,Gl),e(S,Jl),e(S,ao),e(ao,Rl),e(ao,gn),e(gn,Zl),e(ao,ed),e(S,td),e(S,_n),g(ro,_n,null),f(t,Qa,p),f(t,Me,p),e(Me,Re),e(Re,_s),g(io,_s,null),e(Me,od),e(Me,vs),e(vs,nd),f(t,Ha,p),f(t,Te,p),g(lo,Te,null),e(Te,sd),e(Te,bs),e(bs,ad),f(t,Ya,p),f(t,Ee,p),e(Ee,Ze),e(Ze,xs),g(co,xs,null),e(Ee,rd),e(Ee,ys),e(ys,id),f(t,Ga,p),f(t,X,p),g(po,X,null),e(X,ld),e(X,$s),e($s,dd),e(X,cd),e(X,fo),e(fo,pd),e(fo,vn),e(vn,fd),e(fo,md),e(X,ud),e(X,bn),g(mo,bn,null),f(t,Ja,p),f(t,Ne,p),e(Ne,et),e(et,ws),g(uo,ws,null),e(Ne,hd),e(Ne,Ds),e(Ds,gd),f(t,Ra,p),f(t,F,p),g(ho,F,null),e(F,_d),e(F,ks),e(ks,vd),e(F,bd),e(F,Ms),e(Ms,xd),e(F,yd),e(F,go),e(go,$d),e(go,Ts),e(Ts,wd),e(go,Dd),e(F,kd),e(F,Es),e(Es,Md),e(F,Td),e(F,xn),g(_o,xn,null),f(t,Za,p),f(t,Ue,p),e(Ue,tt),e(tt,Ns),g(vo,Ns,null),e(Ue,Ed),e(Ue,Us),e(Us,Nd),f(t,er,p),f(t,bo,p),g(xo,bo,null),f(t,tr,p),f(t,Ae,p),e(Ae,ot),e(ot,As),g(yo,As,null),e(Ae,Ud),e(Ae,Fs),e(Fs,Ad),f(t,or,p),f(t,E,p),g($o,E,null),e(E,Fd),e(E,Cs),e(Cs,Cd),e(E,Od),e(E,yn),e(yn,$n),e($n,jd),e(yn,qd),e(E,Pd),e(E,P),g(wo,P,null),e(P,Ld),e(P,Os),e(Os,Bd),e(P,Id),e(P,Do),e(Do,Vd),e(Do,js),e(js,zd),e(Do,Kd),e(P,Sd),e(P,ko),e(ko,Xd),e(ko,qs),e(qs,Wd),e(ko,Qd),e(P,Hd),g(nt,P,null),e(E,Yd),e(E,st),g(Mo,st,null),e(st,Gd),e(st,To),e(To,Jd),e(To,Ps),e(Ps,Rd),e(To,Zd),e(E,ec),e(E,G),g(Eo,G,null),e(G,tc),e(G,W),e(W,oc),e(W,Ls),e(Ls,nc),e(W,sc),e(W,Bs),e(Bs,ac),e(W,rc),e(W,Is),e(Is,ic),e(W,lc),e(W,Vs),e(Vs,dc),e(W,cc),e(G,pc),e(G,zs),e(zs,fc),e(G,mc),g(at,G,null),e(E,uc),e(E,J),g(No,J,null),e(J,hc),e(J,Q),e(Q,gc),e(Q,Ks),e(Ks,_c),e(Q,vc),e(Q,Ss),e(Ss,bc),e(Q,xc),e(Q,Xs),e(Xs,yc),e(Q,$c),e(Q,Ws),e(Ws,wc),e(Q,Dc),e(J,kc),e(J,Qs),e(Qs,Mc),e(J,Tc),g(rt,J,null),e(E,Ec),e(E,ie),g(Uo,ie,null),e(ie,Nc),e(ie,H),e(H,Uc),e(H,Hs),e(Hs,Ac),e(H,Fc),e(H,Ys),e(Ys,Cc),e(H,Oc),e(H,Gs),e(Gs,jc),e(H,qc),e(H,Js),e(Js,Pc),e(H,Lc),e(ie,Bc),g(it,ie,null),f(t,nr,p),f(t,Fe,p),e(Fe,lt),e(lt,Rs),g(Ao,Rs,null),e(Fe,Ic),e(Fe,Zs),e(Zs,Vc),f(t,sr,p),f(t,Ce,p),g(Fo,Ce,null),e(Ce,zc),e(Ce,dt),g(Co,dt,null),e(dt,Kc),e(dt,ea),e(ea,Sc),f(t,ar,p),f(t,Oe,p),e(Oe,ct),e(ct,ta),g(Oo,ta,null),e(Oe,Xc),e(Oe,oa),e(oa,Wc),f(t,rr,p),f(t,C,p),g(jo,C,null),e(C,Qc),e(C,na),e(na,Hc),e(C,Yc),e(C,qo),e(qo,Gc),e(qo,wn),e(wn,Jc),e(qo,Rc),e(C,Zc),e(C,Po),e(Po,ep),e(Po,Lo),e(Lo,tp),e(Po,op),e(C,np),e(C,sa),e(sa,sp),e(C,ap),e(C,ee),e(ee,aa),e(aa,Bo),e(Bo,rp),e(ee,ip),e(ee,ra),e(ra,Io),e(Io,lp),e(ee,dp),e(ee,ia),e(ia,Vo),e(Vo,cp),e(ee,pp),e(ee,la),e(la,zo),e(zo,fp),f(t,ir,p),f(t,je,p),e(je,pt),e(pt,da),g(Ko,da,null),e(je,mp),e(je,ca),e(ca,up),f(t,lr,p),f(t,te,p),g(So,te,null),e(te,hp),e(te,pa),e(pa,gp),e(te,_p),e(te,ft),g(Xo,ft,null),e(ft,vp),e(ft,fa),e(fa,bp),f(t,dr,p),f(t,qe,p),e(qe,mt),e(mt,ma),g(Wo,ma,null),e(qe,xp),e(qe,ua),e(ua,yp),f(t,cr,p),f(t,oe,p),g(Qo,oe,null),e(oe,$p),e(oe,ha),e(ha,wp),e(oe,Dp),e(oe,ut),g(Ho,ut,null),e(ut,kp),e(ut,ga),e(ga,Mp),f(t,pr,p),f(t,Pe,p),e(Pe,ht),e(ht,_a),g(Yo,_a,null),e(Pe,Tp),e(Pe,va),e(va,Ep),f(t,fr,p),f(t,j,p),g(Go,j,null),e(j,Np),e(j,ba),e(ba,Up),e(j,Ap),e(j,Jo),e(Jo,Fp),e(Jo,Ro),e(Ro,Cp),e(Jo,Op),e(j,jp),e(j,xa),e(xa,qp),e(j,Pp),e(j,ne),e(ne,ya),e(ya,Zo),e(Zo,Lp),e(ne,Bp),e(ne,$a),e($a,en),e(en,Ip),e(ne,Vp),e(ne,wa),e(wa,tn),e(tn,zp),e(ne,Kp),e(ne,Da),e(Da,on),e(on,Sp),mr=!0},p(t,[p]){const nn={};p&2&&(nn.$$scope={dirty:p,ctx:t}),Ie.$set(nn);const ka={};p&2&&(ka.$$scope={dirty:p,ctx:t}),Ve.$set(ka);const Ma={};p&2&&(Ma.$$scope={dirty:p,ctx:t}),nt.$set(Ma);const Ta={};p&2&&(Ta.$$scope={dirty:p,ctx:t}),at.$set(Ta);const Le={};p&2&&(Le.$$scope={dirty:p,ctx:t}),rt.$set(Le);const Ea={};p&2&&(Ea.$$scope={dirty:p,ctx:t}),it.$set(Ea)},i(t){mr||(_(m.$$.fragment,t),_(kt.$$.fragment,t),_(Mt.$$.fragment,t),_(Tt.$$.fragment,t),_(Et.$$.fragment,t),_(Nt.$$.fragment,t),_(Ie.$$.fragment,t),_(Ve.$$.fragment,t),_(Ft.$$.fragment,t),_(Ct.$$.fragment,t),_(jt.$$.fragment,t),_(Pt.$$.fragment,t),_(Lt.$$.fragment,t),_(Bt.$$.fragment,t),_(Vt.$$.fragment,t),_(zt.$$.fragment,t),_(Kt.$$.fragment,t),_(Xt.$$.fragment,t),_(Wt.$$.fragment,t),_(Ht.$$.fragment,t),_(Yt.$$.fragment,t),_(Gt.$$.fragment,t),_(Rt.$$.fragment,t),_(Zt.$$.fragment,t),_(eo.$$.fragment,t),_(to.$$.fragment,t),_(oo.$$.fragment,t),_(no.$$.fragment,t),_(so.$$.fragment,t),_(ro.$$.fragment,t),_(io.$$.fragment,t),_(lo.$$.fragment,t),_(co.$$.fragment,t),_(po.$$.fragment,t),_(mo.$$.fragment,t),_(uo.$$.fragment,t),_(ho.$$.fragment,t),_(_o.$$.fragment,t),_(vo.$$.fragment,t),_(xo.$$.fragment,t),_(yo.$$.fragment,t),_($o.$$.fragment,t),_(wo.$$.fragment,t),_(nt.$$.fragment,t),_(Mo.$$.fragment,t),_(Eo.$$.fragment,t),_(at.$$.fragment,t),_(No.$$.fragment,t),_(rt.$$.fragment,t),_(Uo.$$.fragment,t),_(it.$$.fragment,t),_(Ao.$$.fragment,t),_(Fo.$$.fragment,t),_(Co.$$.fragment,t),_(Oo.$$.fragment,t),_(jo.$$.fragment,t),_(Ko.$$.fragment,t),_(So.$$.fragment,t),_(Xo.$$.fragment,t),_(Wo.$$.fragment,t),_(Qo.$$.fragment,t),_(Ho.$$.fragment,t),_(Yo.$$.fragment,t),_(Go.$$.fragment,t),mr=!0)},o(t){v(m.$$.fragment,t),v(kt.$$.fragment,t),v(Mt.$$.fragment,t),v(Tt.$$.fragment,t),v(Et.$$.fragment,t),v(Nt.$$.fragment,t),v(Ie.$$.fragment,t),v(Ve.$$.fragment,t),v(Ft.$$.fragment,t),v(Ct.$$.fragment,t),v(jt.$$.fragment,t),v(Pt.$$.fragment,t),v(Lt.$$.fragment,t),v(Bt.$$.fragment,t),v(Vt.$$.fragment,t),v(zt.$$.fragment,t),v(Kt.$$.fragment,t),v(Xt.$$.fragment,t),v(Wt.$$.fragment,t),v(Ht.$$.fragment,t),v(Yt.$$.fragment,t),v(Gt.$$.fragment,t),v(Rt.$$.fragment,t),v(Zt.$$.fragment,t),v(eo.$$.fragment,t),v(to.$$.fragment,t),v(oo.$$.fragment,t),v(no.$$.fragment,t),v(so.$$.fragment,t),v(ro.$$.fragment,t),v(io.$$.fragment,t),v(lo.$$.fragment,t),v(co.$$.fragment,t),v(po.$$.fragment,t),v(mo.$$.fragment,t),v(uo.$$.fragment,t),v(ho.$$.fragment,t),v(_o.$$.fragment,t),v(vo.$$.fragment,t),v(xo.$$.fragment,t),v(yo.$$.fragment,t),v($o.$$.fragment,t),v(wo.$$.fragment,t),v(nt.$$.fragment,t),v(Mo.$$.fragment,t),v(Eo.$$.fragment,t),v(at.$$.fragment,t),v(No.$$.fragment,t),v(rt.$$.fragment,t),v(Uo.$$.fragment,t),v(it.$$.fragment,t),v(Ao.$$.fragment,t),v(Fo.$$.fragment,t),v(Co.$$.fragment,t),v(Oo.$$.fragment,t),v(jo.$$.fragment,t),v(Ko.$$.fragment,t),v(So.$$.fragment,t),v(Xo.$$.fragment,t),v(Wo.$$.fragment,t),v(Qo.$$.fragment,t),v(Ho.$$.fragment,t),v(Yo.$$.fragment,t),v(Go.$$.fragment,t),mr=!1},d(t){o(x),t&&o(M),t&&o($),b(m),t&&o(B),t&&o(I),t&&o(Na),t&&o(ue),b(kt),t&&o(Ua),t&&o(T),b(Mt),b(Tt),b(Et),b(Nt),b(Ie),b(Ve),b(Ft),b(Ct),t&&o(Aa),t&&o(ge),b(jt),t&&o(Fa),t&&o(qt),b(Pt),t&&o(Ca),t&&o(_e),b(Lt),t&&o(Oa),t&&o(V),b(Bt),b(Vt),t&&o(ja),t&&o(ve),b(zt),t&&o(qa),t&&o(z),b(Kt),b(Xt),t&&o(Pa),t&&o(be),b(Wt),t&&o(La),t&&o(Qt),b(Ht),t&&o(Ba),t&&o(xe),b(Yt),t&&o(Ia),t&&o(K),b(Gt),b(Rt),t&&o(Va),t&&o(ye),b(Zt),t&&o(za),t&&o($e),b(eo),t&&o(Ka),t&&o(we),b(to),t&&o(Sa),t&&o(De),b(oo),t&&o(Xa),t&&o(ke),b(no),t&&o(Wa),t&&o(S),b(so),b(ro),t&&o(Qa),t&&o(Me),b(io),t&&o(Ha),t&&o(Te),b(lo),t&&o(Ya),t&&o(Ee),b(co),t&&o(Ga),t&&o(X),b(po),b(mo),t&&o(Ja),t&&o(Ne),b(uo),t&&o(Ra),t&&o(F),b(ho),b(_o),t&&o(Za),t&&o(Ue),b(vo),t&&o(er),t&&o(bo),b(xo),t&&o(tr),t&&o(Ae),b(yo),t&&o(or),t&&o(E),b($o),b(wo),b(nt),b(Mo),b(Eo),b(at),b(No),b(rt),b(Uo),b(it),t&&o(nr),t&&o(Fe),b(Ao),t&&o(sr),t&&o(Ce),b(Fo),b(Co),t&&o(ar),t&&o(Oe),b(Oo),t&&o(rr),t&&o(C),b(jo),t&&o(ir),t&&o(je),b(Ko),t&&o(lr),t&&o(te),b(So),b(Xo),t&&o(dr),t&&o(qe),b(Wo),t&&o(cr),t&&o(oe),b(Qo),b(Ho),t&&o(pr),t&&o(Pe),b(Yo),t&&o(fr),t&&o(j),b(Go)}}}const Hu={local:"models",sections:[{local:"diffusers.ModelMixin",title:"ModelMixin"},{local:"diffusers.models.unet_2d.UNet2DOutput",title:"UNet2DOutput"},{local:"diffusers.UNet1DModel",title:"UNet1DModel"},{local:"diffusers.UNet2DModel",title:"UNet2DModel"},{local:"diffusers.models.unet_2d_condition.UNet2DConditionOutput",title:"UNet2DConditionOutput"},{local:"diffusers.UNet2DConditionModel",title:"UNet2DConditionModel"},{local:"diffusers.models.vae.DecoderOutput",title:"DecoderOutput"},{local:"diffusers.models.vae.VQEncoderOutput",title:"VQEncoderOutput"},{local:"diffusers.VQModel",title:"VQModel"},{local:"diffusers.models.vae.AutoencoderKLOutput",title:"AutoencoderKLOutput"},{local:"diffusers.AutoencoderKL",title:"AutoencoderKL"},{local:"diffusers.Transformer2DModel",title:"Transformer2DModel"},{local:"diffusers.models.attention.Transformer2DModelOutput",title:"Transformer2DModelOutput"},{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 Yu(q){return Iu(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oh extends qu{constructor(x){super();Pu(this,x,Yu,Qu,Lu,{})}}export{oh as default,Hu as metadata};
