import{S as jm,i as qm,s as Om,e as n,k as d,w as u,t as r,M as Lm,c as a,d as o,m as c,a as s,x as h,h as i,b as l,G as e,g as m,y as g,q as _,o as v,B as b,v as Pm,L as Tr}from"../../chunks/vendor-hf-doc-builder.js";import{T as Cm}from"../../chunks/Tip-hf-doc-builder.js";import{D}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ar}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as A}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Nr}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Bm(q){let x,M,$,y,k,f,w,H;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 "),f=n("a"),w=r(`gated
models`),H=r("."),this.h()},l(pe){x=a(pe,"P",{});var P=s(x);M=i(P,"It is required to be logged in ("),$=a(P,"CODE",{});var B=s($);y=i(B,"huggingface-cli login"),B.forEach(o),k=i(P,") when you want to use private or "),f=a(P,"A",{href:!0,rel:!0});var Wo=s(f);w=i(Wo,`gated
models`),Wo.forEach(o),H=i(P,"."),P.forEach(o),this.h()},h(){l(f,"href","https://huggingface.co/docs/hub/models-gated#gated-models"),l(f,"rel","nofollow")},m(pe,P){m(pe,x,P),e(x,M),e(x,$),e($,y),e(x,k),e(x,f),e(f,w),e(x,H)},d(pe){pe&&o(x)}}}function Vm(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(f){x=a(f,"P",{});var w=s(x);M=i(w,"Activate the special "),$=a(w,"A",{href:!0,rel:!0});var H=s($);y=i(H,"\u201Coffline-mode\u201D"),H.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(f,w){m(f,x,w),e(x,M),e(x,$),e($,y),e(x,k)},d(f){f&&o(x)}}}function Im(q){let x,M,$,y,k;return y=new Ar({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(f){x=a(f,"P",{});var w=s(x);M=i(w,"Examples:"),w.forEach(o),$=c(f),h(y.$$.fragment,f)},m(f,w){m(f,x,w),e(x,M),m(f,$,w),g(y,f,w),k=!0},p:Tr,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){v(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o($),b(y,f)}}}function zm(q){let x,M,$,y,k;return y=new Ar({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(f){x=a(f,"P",{});var w=s(x);M=i(w,"Examples:"),w.forEach(o),$=c(f),h(y.$$.fragment,f)},m(f,w){m(f,x,w),e(x,M),m(f,$,w),g(y,f,w),k=!0},p:Tr,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){v(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o($),b(y,f)}}}function Km(q){let x,M,$,y,k;return y=new Ar({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(f){x=a(f,"P",{});var w=s(x);M=i(w,"Examples:"),w.forEach(o),$=c(f),h(y.$$.fragment,f)},m(f,w){m(f,x,w),e(x,M),m(f,$,w),g(y,f,w),k=!0},p:Tr,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){v(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o($),b(y,f)}}}function Sm(q){let x,M,$,y,k;return y=new Ar({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(f){x=a(f,"P",{});var w=s(x);M=i(w,"Examples:"),w.forEach(o),$=c(f),h(y.$$.fragment,f)},m(f,w){m(f,x,w),e(x,M),m(f,$,w),g(y,f,w),k=!0},p:Tr,i(f){k||(_(y.$$.fragment,f),k=!0)},o(f){v(y.$$.fragment,f),k=!1},d(f){f&&o(x),f&&o($),b(y,f)}}}function Xm(q){let x,M,$,y,k,f,w,H,pe,P,B,Wo,gn,Fr,Cr,_n,jr,qr,is,fe,qe,vn,bt,Or,bn,Lr,ls,E,xt,Pr,xn,Br,Vr,Qo,Ho,Ir,zr,Kr,yn,oe,$n,Sr,Xr,wn,Wr,Qr,Yo,Hr,Yr,Gr,ne,yt,Jr,Dn,Rr,Zr,kn,ei,ti,ae,$t,oi,Mn,ni,ai,En,si,ri,N,wt,ii,Un,li,di,me,ci,Nn,pi,fi,Tn,mi,ui,hi,Dt,gi,An,_i,vi,bi,kt,xi,Fn,yi,$i,wi,Oe,Di,Le,ki,Pe,Mt,Mi,Cn,Ei,Ui,Be,Et,Ni,Ut,Ti,jn,Ai,Fi,ds,ue,Ve,qn,Nt,Ci,On,ji,cs,Tt,At,ps,he,Ie,Ln,Ft,qi,Pn,Oi,fs,V,Ct,Li,Bn,Pi,Bi,jt,Vi,Go,Ii,zi,Ki,Jo,qt,ms,ge,ze,Vn,Ot,Si,In,Xi,us,I,Lt,Wi,zn,Qi,Hi,Pt,Yi,Ro,Gi,Ji,Ri,Zo,Bt,hs,_e,Ke,Kn,Vt,Zi,Sn,el,gs,It,zt,_s,ve,Se,Xn,Kt,tl,Wn,ol,vs,z,St,nl,Qn,al,sl,Xt,rl,en,il,ll,dl,tn,Wt,bs,be,Xe,Hn,Qt,cl,Yn,pl,xs,xe,Ht,fl,Gn,ml,ys,ye,We,Jn,Yt,ul,Rn,hl,$s,$e,Gt,gl,Zn,_l,ws,we,Qe,ea,Jt,vl,ta,bl,Ds,K,Rt,xl,oa,yl,$l,Zt,wl,on,Dl,kl,Ml,nn,eo,ks,De,He,na,to,El,aa,Ul,Ms,ke,oo,Nl,sa,Tl,Es,Me,Ye,ra,no,Al,ia,Fl,Us,S,ao,Cl,la,jl,ql,so,Ol,an,Ll,Pl,Bl,sn,ro,Ns,Ee,Ge,da,io,Vl,ca,Il,Ts,U,lo,zl,pa,Kl,Sl,rn,ln,Xl,Wl,Ql,O,co,Hl,fa,Yl,Gl,po,Jl,ma,Rl,Zl,ed,fo,td,ua,od,nd,ad,Je,sd,Re,mo,rd,uo,id,ha,ld,dd,cd,Y,ho,pd,X,fd,ga,md,ud,_a,hd,gd,va,_d,vd,ba,bd,xd,yd,xa,$d,wd,Ze,Dd,G,go,kd,W,Md,ya,Ed,Ud,$a,Nd,Td,wa,Ad,Fd,Da,Cd,jd,qd,ka,Od,Ld,et,Pd,se,_o,Bd,Q,Vd,Ma,Id,zd,Ea,Kd,Sd,Ua,Xd,Wd,Na,Qd,Hd,Yd,tt,As,Ue,ot,Ta,vo,Gd,Aa,Jd,Fs,Ne,bo,Rd,nt,xo,Zd,Fa,ec,Cs,Te,at,Ca,yo,tc,ja,oc,js,F,$o,nc,qa,ac,sc,wo,rc,dn,ic,lc,dc,Do,cc,ko,pc,fc,mc,Oa,uc,hc,R,La,Mo,gc,_c,Pa,Eo,vc,bc,Ba,Uo,xc,yc,Va,No,$c,qs,Ae,st,Ia,To,wc,za,Dc,Os,Z,Ao,kc,Ka,Mc,Ec,rt,Fo,Uc,Sa,Nc,Ls,Fe,it,Xa,Co,Tc,Wa,Ac,Ps,ee,jo,Fc,Qa,Cc,jc,lt,qo,qc,Ha,Oc,Bs,Ce,dt,Ya,Oo,Lc,Ga,Pc,Vs,j,Lo,Bc,Ja,Vc,Ic,Po,zc,Bo,Kc,Sc,Xc,Ra,Wc,Qc,te,Za,Vo,Hc,Yc,es,Io,Gc,Jc,ts,zo,Rc,Zc,os,Ko,ep,Is;return f=new A({}),bt=new A({}),xt=new D({props:{name:"class diffusers.ModelMixin",anchor:"diffusers.ModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/diffusers/modeling_utils.py#L115"}}),yt=new D({props:{name:"disable_gradient_checkpointing",anchor:"diffusers.ModelMixin.disable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/diffusers/modeling_utils.py#L153"}}),$t=new D({props:{name:"enable_gradient_checkpointing",anchor:"diffusers.ModelMixin.enable_gradient_checkpointing",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/diffusers/modeling_utils.py#L142"}}),wt=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"}],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/diffusers/modeling_utils.py#L213"}}),Oe=new Cm({props:{$$slots:{default:[Bm]},$$scope:{ctx:q}}}),Le=new Cm({props:{$$slots:{default:[Vm]},$$scope:{ctx:q}}}),Mt=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_516/src/diffusers/modeling_utils.py#L578",returnDescription:`
<p>The number of parameters.</p>
`,returnType:`
<p><code>int</code></p>
`}}),Et=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 0x7f165d09da60>"}],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_516/src/diffusers/modeling_utils.py#L163"}}),Nt=new A({}),At=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_516/src/diffusers/models/unet_2d.py#L28"}}),Ft=new A({}),Ct=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_516/src/diffusers/models/unet_1d.py#L25"}}),qt=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_516/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>
`}}),Ot=new A({}),Lt=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_516/src/diffusers/models/unet_2d.py#L38"}}),Bt=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_516/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_516/src/diffusers/models/unet_2d.py#L180",returnDescription:`
<p><a
  href="/docs/diffusers/pr_516/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_516/en/api/models#diffusers.models.unet_2d.UNet2DOutput"
>UNet2DOutput</a> or <code>tuple</code></p>
`}}),Vt=new A({}),zt=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_516/src/diffusers/models/unet_2d_condition.py#L40"}}),Kt=new A({}),St=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_516/src/diffusers/models/unet_2d_condition.py#L50"}}),Wt=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_516/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_516/src/diffusers/models/unet_2d_condition.py#L232",returnDescription:`
<p><a
  href="/docs/diffusers/pr_516/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_516/en/api/models#diffusers.models.unet_2d_condition.UNet2DConditionOutput"
>UNet2DConditionOutput</a> or <code>tuple</code></p>
`}}),Qt=new A({}),Ht=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_516/src/diffusers/models/vae.py#L28"}}),Yt=new A({}),Gt=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_516/src/diffusers/models/vae.py#L41"}}),Jt=new A({}),Rt=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"}],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"}],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/diffusers/models/vae.py#L392"}}),eo=new D({props:{name:"forward",anchor:"diffusers.VQModel.forward",parameters:[{name:"sample",val:": FloatTensor"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.VQModel.forward.sample",description:"<strong>sample</strong> (<code>torch.FloatTensor</code>) &#x2014; Input sample.",name:"sample"},{anchor:"diffusers.VQModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to return a <code>DecoderOutput</code> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/diffusers/models/vae.py#L485"}}),to=new A({}),oo=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_516/src/diffusers/models/vae.py#L54"}}),no=new A({}),ao=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_516/src/diffusers/models/vae.py#L502"}}),ro=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_516/src/diffusers/models/vae.py#L584"}}),io=new A({}),lo=new D({props:{name:"class diffusers.FlaxModelMixin",anchor:"diffusers.FlaxModelMixin",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/diffusers/modeling_flax_utils.py#L45"}}),co=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_516/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_516/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_516/src/diffusers/modeling_flax_utils.py#L195"}}),Je=new Nr({props:{anchor:"diffusers.FlaxModelMixin.from_pretrained.example",$$slots:{default:[Im]},$$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_516/src/diffusers/modeling_flax_utils.py#L487"}}),ho=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_516/src/diffusers/modeling_flax_utils.py#L87"}}),Ze=new Nr({props:{anchor:"diffusers.FlaxModelMixin.to_bf16.example",$$slots:{default:[zm]},$$scope:{ctx:q}}}),go=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_516/src/diffusers/modeling_flax_utils.py#L153"}}),et=new Nr({props:{anchor:"diffusers.FlaxModelMixin.to_fp16.example",$$slots:{default:[Km]},$$scope:{ctx:q}}}),_o=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_516/src/diffusers/modeling_flax_utils.py#L126"}}),tt=new Nr({props:{anchor:"diffusers.FlaxModelMixin.to_fp32.example",$$slots:{default:[Sm]},$$scope:{ctx:q}}}),vo=new A({}),bo=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_516/src/diffusers/models/unet_2d_condition_flax.py#L36"}}),xo=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_516/src/flax/struct.py#L108"}}),yo=new A({}),$o=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 0x7f1648eafdc0>"},{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_516/src/diffusers/models/unet_2d_condition_flax.py#L47"}}),To=new A({}),Ao=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_516/src/diffusers/models/vae_flax.py#L33"}}),Fo=new D({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxDecoderOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/flax/struct.py#L108"}}),Co=new A({}),jo=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_516/src/diffusers/models/vae_flax.py#L48"}}),qo=new D({props:{name:"replace",anchor:"diffusers.models.vae_flax.FlaxAutoencoderKLOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/diffusers/blob/vr_516/src/flax/struct.py#L108"}}),Oo=new A({}),Lo=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 0x7f1648eafdc0>"},{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_516/src/diffusers/models/vae_flax.py#L721"}}),{c(){x=n("meta"),M=d(),$=n("h1"),y=n("a"),k=n("span"),u(f.$$.fragment),w=d(),H=n("span"),pe=r("Models"),P=d(),B=n("p"),Wo=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`),gn=n("em"),Fr=r("\\theta(\\mathbf{x}"),Cr=r(`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),_n=n("code"),jr=r("torch.nn.module"),qr=r(" with basic functionality for saving and loading models both locally and from the HuggingFace hub."),is=d(),fe=n("h2"),qe=n("a"),vn=n("span"),u(bt.$$.fragment),Or=d(),bn=n("span"),Lr=r("ModelMixin"),ls=d(),E=n("div"),u(xt.$$.fragment),Pr=d(),xn=n("p"),Br=r("Base class for all models."),Vr=d(),Qo=n("p"),Ho=n("a"),Ir=r("ModelMixin"),zr=r(` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),Kr=d(),yn=n("ul"),oe=n("li"),$n=n("strong"),Sr=r("config_name"),Xr=r(" ("),wn=n("code"),Wr=r("str"),Qr=r(`) \u2014 A filename under which the model should be stored when calling
`),Yo=n("a"),Hr=r("save_pretrained()"),Yr=r("."),Gr=d(),ne=n("div"),u(yt.$$.fragment),Jr=d(),Dn=n("p"),Rr=r("Deactivates gradient checkpointing for the current model."),Zr=d(),kn=n("p"),ei=r(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),ti=d(),ae=n("div"),u($t.$$.fragment),oi=d(),Mn=n("p"),ni=r("Activates gradient checkpointing for the current model."),ai=d(),En=n("p"),si=r(`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),ri=d(),N=n("div"),u(wt.$$.fragment),ii=d(),Un=n("p"),li=r("Instantiate a pretrained pytorch model from a pre-trained model configuration."),di=d(),me=n("p"),ci=r("The model is set in evaluation mode by default using "),Nn=n("code"),pi=r("model.eval()"),fi=r(` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Tn=n("code"),mi=r("model.train()"),ui=r("."),hi=d(),Dt=n("p"),gi=r("The warning "),An=n("em"),_i=r("Weights from XXX not initialized from pretrained model"),vi=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.`),bi=d(),kt=n("p"),xi=r("The warning "),Fn=n("em"),yi=r("Weights from XXX not used in YYY"),$i=r(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),wi=d(),u(Oe.$$.fragment),Di=d(),u(Le.$$.fragment),ki=d(),Pe=n("div"),u(Mt.$$.fragment),Mi=d(),Cn=n("p"),Ei=r("Get number of (optionally, trainable or non-embeddings) parameters in the module."),Ui=d(),Be=n("div"),u(Et.$$.fragment),Ni=d(),Ut=n("p"),Ti=r(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),jn=n("code"),Ai=r("[from_pretrained()](/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin.from_pretrained)"),Fi=r(" class method."),ds=d(),ue=n("h2"),Ve=n("a"),qn=n("span"),u(Nt.$$.fragment),Ci=d(),On=n("span"),ji=r("UNet2DOutput"),cs=d(),Tt=n("div"),u(At.$$.fragment),ps=d(),he=n("h2"),Ie=n("a"),Ln=n("span"),u(Ft.$$.fragment),qi=d(),Pn=n("span"),Oi=r("UNet1DModel"),fs=d(),V=n("div"),u(Ct.$$.fragment),Li=d(),Bn=n("p"),Pi=r("UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Bi=d(),jt=n("p"),Vi=r("This model inherits from "),Go=n("a"),Ii=r("ModelMixin"),zi=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Ki=d(),Jo=n("div"),u(qt.$$.fragment),ms=d(),ge=n("h2"),ze=n("a"),Vn=n("span"),u(Ot.$$.fragment),Si=d(),In=n("span"),Xi=r("UNet2DModel"),us=d(),I=n("div"),u(Lt.$$.fragment),Wi=d(),zn=n("p"),Qi=r("UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Hi=d(),Pt=n("p"),Yi=r("This model inherits from "),Ro=n("a"),Gi=r("ModelMixin"),Ji=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Ri=d(),Zo=n("div"),u(Bt.$$.fragment),hs=d(),_e=n("h2"),Ke=n("a"),Kn=n("span"),u(Vt.$$.fragment),Zi=d(),Sn=n("span"),el=r("UNet2DConditionOutput"),gs=d(),It=n("div"),u(zt.$$.fragment),_s=d(),ve=n("h2"),Se=n("a"),Xn=n("span"),u(Kt.$$.fragment),tl=d(),Wn=n("span"),ol=r("UNet2DConditionModel"),vs=d(),z=n("div"),u(St.$$.fragment),nl=d(),Qn=n("p"),al=r(`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),sl=d(),Xt=n("p"),rl=r("This model inherits from "),en=n("a"),il=r("ModelMixin"),ll=r(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),dl=d(),tn=n("div"),u(Wt.$$.fragment),bs=d(),be=n("h2"),Xe=n("a"),Hn=n("span"),u(Qt.$$.fragment),cl=d(),Yn=n("span"),pl=r("DecoderOutput"),xs=d(),xe=n("div"),u(Ht.$$.fragment),fl=d(),Gn=n("p"),ml=r("Output of decoding method."),ys=d(),ye=n("h2"),We=n("a"),Jn=n("span"),u(Yt.$$.fragment),ul=d(),Rn=n("span"),hl=r("VQEncoderOutput"),$s=d(),$e=n("div"),u(Gt.$$.fragment),gl=d(),Zn=n("p"),_l=r("Output of VQModel encoding method."),ws=d(),we=n("h2"),Qe=n("a"),ea=n("span"),u(Jt.$$.fragment),vl=d(),ta=n("span"),bl=r("VQModel"),Ds=d(),K=n("div"),u(Rt.$$.fragment),xl=d(),oa=n("p"),yl=r(`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),$l=d(),Zt=n("p"),wl=r("This model inherits from "),on=n("a"),Dl=r("ModelMixin"),kl=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Ml=d(),nn=n("div"),u(eo.$$.fragment),ks=d(),De=n("h2"),He=n("a"),na=n("span"),u(to.$$.fragment),El=d(),aa=n("span"),Ul=r("AutoencoderKLOutput"),Ms=d(),ke=n("div"),u(oo.$$.fragment),Nl=d(),sa=n("p"),Tl=r("Output of AutoencoderKL encoding method."),Es=d(),Me=n("h2"),Ye=n("a"),ra=n("span"),u(no.$$.fragment),Al=d(),ia=n("span"),Fl=r("AutoencoderKL"),Us=d(),S=n("div"),u(ao.$$.fragment),Cl=d(),la=n("p"),jl=r(`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),ql=d(),so=n("p"),Ol=r("This model inherits from "),an=n("a"),Ll=r("ModelMixin"),Pl=r(`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Bl=d(),sn=n("div"),u(ro.$$.fragment),Ns=d(),Ee=n("h2"),Ge=n("a"),da=n("span"),u(io.$$.fragment),Vl=d(),ca=n("span"),Il=r("FlaxModelMixin"),Ts=d(),U=n("div"),u(lo.$$.fragment),zl=d(),pa=n("p"),Kl=r("Base class for all flax models."),Sl=d(),rn=n("p"),ln=n("a"),Xl=r("FlaxModelMixin"),Wl=r(` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),Ql=d(),O=n("div"),u(co.$$.fragment),Hl=d(),fa=n("p"),Yl=r("Instantiate a pretrained flax model from a pre-trained model configuration."),Gl=d(),po=n("p"),Jl=r("The warning "),ma=n("em"),Rl=r("Weights from XXX not initialized from pretrained model"),Zl=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.`),ed=d(),fo=n("p"),td=r("The warning "),ua=n("em"),od=r("Weights from XXX not used in YYY"),nd=r(` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),ad=d(),u(Je.$$.fragment),sd=d(),Re=n("div"),u(mo.$$.fragment),rd=d(),uo=n("p"),id=r(`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),ha=n("code"),ld=r("[from_pretrained()](/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.FlaxModelMixin.from_pretrained)"),dd=r(" class method"),cd=d(),Y=n("div"),u(ho.$$.fragment),pd=d(),X=n("p"),fd=r("Cast the floating-point "),ga=n("code"),md=r("params"),ud=r(" to "),_a=n("code"),hd=r("jax.numpy.bfloat16"),gd=r(". This returns a new "),va=n("code"),_d=r("params"),vd=r(` tree and does not cast
the `),ba=n("code"),bd=r("params"),xd=r(" in place."),yd=d(),xa=n("p"),$d=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.`),wd=d(),u(Ze.$$.fragment),Dd=d(),G=n("div"),u(go.$$.fragment),kd=d(),W=n("p"),Md=r("Cast the floating-point "),ya=n("code"),Ed=r("params"),Ud=r(" to "),$a=n("code"),Nd=r("jax.numpy.float16"),Td=r(". This returns a new "),wa=n("code"),Ad=r("params"),Fd=r(` tree and does not cast the
`),Da=n("code"),Cd=r("params"),jd=r(" in place."),qd=d(),ka=n("p"),Od=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.`),Ld=d(),u(et.$$.fragment),Pd=d(),se=n("div"),u(_o.$$.fragment),Bd=d(),Q=n("p"),Vd=r("Cast the floating-point "),Ma=n("code"),Id=r("params"),zd=r(" to "),Ea=n("code"),Kd=r("jax.numpy.float32"),Sd=r(`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Ua=n("code"),Xd=r("params"),Wd=r(" tree and does not cast the "),Na=n("code"),Qd=r("params"),Hd=r(" in place."),Yd=d(),u(tt.$$.fragment),As=d(),Ue=n("h2"),ot=n("a"),Ta=n("span"),u(vo.$$.fragment),Gd=d(),Aa=n("span"),Jd=r("FlaxUNet2DConditionOutput"),Fs=d(),Ne=n("div"),u(bo.$$.fragment),Rd=d(),nt=n("div"),u(xo.$$.fragment),Zd=d(),Fa=n("p"),ec=r("\u201CReturns a new object replacing the specified fields with new values."),Cs=d(),Te=n("h2"),at=n("a"),Ca=n("span"),u(yo.$$.fragment),tc=d(),ja=n("span"),oc=r("FlaxUNet2DConditionModel"),js=d(),F=n("div"),u($o.$$.fragment),nc=d(),qa=n("p"),ac=r(`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),sc=d(),wo=n("p"),rc=r("This model inherits from "),dn=n("a"),ic=r("FlaxModelMixin"),lc=r(`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),dc=d(),Do=n("p"),cc=r("Also, this model is a Flax Linen "),ko=n("a"),pc=r("flax.linen.Module"),fc=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.`),mc=d(),Oa=n("p"),uc=r("Finally, this model supports inherent JAX features such as:"),hc=d(),R=n("ul"),La=n("li"),Mo=n("a"),gc=r("Just-In-Time (JIT) compilation"),_c=d(),Pa=n("li"),Eo=n("a"),vc=r("Automatic Differentiation"),bc=d(),Ba=n("li"),Uo=n("a"),xc=r("Vectorization"),yc=d(),Va=n("li"),No=n("a"),$c=r("Parallelization"),qs=d(),Ae=n("h2"),st=n("a"),Ia=n("span"),u(To.$$.fragment),wc=d(),za=n("span"),Dc=r("FlaxDecoderOutput"),Os=d(),Z=n("div"),u(Ao.$$.fragment),kc=d(),Ka=n("p"),Mc=r("Output of decoding method."),Ec=d(),rt=n("div"),u(Fo.$$.fragment),Uc=d(),Sa=n("p"),Nc=r("\u201CReturns a new object replacing the specified fields with new values."),Ls=d(),Fe=n("h2"),it=n("a"),Xa=n("span"),u(Co.$$.fragment),Tc=d(),Wa=n("span"),Ac=r("FlaxAutoencoderKLOutput"),Ps=d(),ee=n("div"),u(jo.$$.fragment),Fc=d(),Qa=n("p"),Cc=r("Output of AutoencoderKL encoding method."),jc=d(),lt=n("div"),u(qo.$$.fragment),qc=d(),Ha=n("p"),Oc=r("\u201CReturns a new object replacing the specified fields with new values."),Bs=d(),Ce=n("h2"),dt=n("a"),Ya=n("span"),u(Oo.$$.fragment),Lc=d(),Ga=n("span"),Pc=r("FlaxAutoencoderKL"),Vs=d(),j=n("div"),u(Lo.$$.fragment),Bc=d(),Ja=n("p"),Vc=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.`),Ic=d(),Po=n("p"),zc=r("This model is a Flax Linen "),Bo=n("a"),Kc=r("flax.linen.Module"),Sc=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.`),Xc=d(),Ra=n("p"),Wc=r("Finally, this model supports inherent JAX features such as:"),Qc=d(),te=n("ul"),Za=n("li"),Vo=n("a"),Hc=r("Just-In-Time (JIT) compilation"),Yc=d(),es=n("li"),Io=n("a"),Gc=r("Automatic Differentiation"),Jc=d(),ts=n("li"),zo=n("a"),Rc=r("Vectorization"),Zc=d(),os=n("li"),Ko=n("a"),ep=r("Parallelization"),this.h()},l(t){const p=Lm('[data-svelte="svelte-1phssyn"]',document.head);x=a(p,"META",{name:!0,content:!0}),p.forEach(o),M=c(t),$=a(t,"H1",{class:!0});var So=s($);y=a(So,"A",{id:!0,class:!0,href:!0});var ns=s(y);k=a(ns,"SPAN",{});var as=s(k);h(f.$$.fragment,as),as.forEach(o),ns.forEach(o),w=c(So),H=a(So,"SPAN",{});var ss=s(H);pe=i(ss,"Models"),ss.forEach(o),So.forEach(o),P=c(t),B=a(t,"P",{});var je=s(B);Wo=i(je,`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`),gn=a(je,"EM",{});var rs=s(gn);Fr=i(rs,"\\theta(\\mathbf{x}"),rs.forEach(o),Cr=i(je,`{t-1}|\\mathbf{x}_t)$.
The models are built on the base class [\u2018ModelMixin\u2019] that is a `),_n=a(je,"CODE",{});var np=s(_n);jr=i(np,"torch.nn.module"),np.forEach(o),qr=i(je," with basic functionality for saving and loading models both locally and from the HuggingFace hub."),je.forEach(o),is=c(t),fe=a(t,"H2",{class:!0});var zs=s(fe);qe=a(zs,"A",{id:!0,class:!0,href:!0});var ap=s(qe);vn=a(ap,"SPAN",{});var sp=s(vn);h(bt.$$.fragment,sp),sp.forEach(o),ap.forEach(o),Or=c(zs),bn=a(zs,"SPAN",{});var rp=s(bn);Lr=i(rp,"ModelMixin"),rp.forEach(o),zs.forEach(o),ls=c(t),E=a(t,"DIV",{class:!0});var T=s(E);h(xt.$$.fragment,T),Pr=c(T),xn=a(T,"P",{});var ip=s(xn);Br=i(ip,"Base class for all models."),ip.forEach(o),Vr=c(T),Qo=a(T,"P",{});var tp=s(Qo);Ho=a(tp,"A",{href:!0});var lp=s(Ho);Ir=i(lp,"ModelMixin"),lp.forEach(o),zr=i(tp,` takes care of storing the configuration of the models and handles methods for loading, downloading
and saving models.`),tp.forEach(o),Kr=c(T),yn=a(T,"UL",{});var dp=s(yn);oe=a(dp,"LI",{});var Xo=s(oe);$n=a(Xo,"STRONG",{});var cp=s($n);Sr=i(cp,"config_name"),cp.forEach(o),Xr=i(Xo," ("),wn=a(Xo,"CODE",{});var pp=s(wn);Wr=i(pp,"str"),pp.forEach(o),Qr=i(Xo,`) \u2014 A filename under which the model should be stored when calling
`),Yo=a(Xo,"A",{href:!0});var fp=s(Yo);Hr=i(fp,"save_pretrained()"),fp.forEach(o),Yr=i(Xo,"."),Xo.forEach(o),dp.forEach(o),Gr=c(T),ne=a(T,"DIV",{class:!0});var cn=s(ne);h(yt.$$.fragment,cn),Jr=c(cn),Dn=a(cn,"P",{});var mp=s(Dn);Rr=i(mp,"Deactivates gradient checkpointing for the current model."),mp.forEach(o),Zr=c(cn),kn=a(cn,"P",{});var up=s(kn);ei=i(up,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),up.forEach(o),cn.forEach(o),ti=c(T),ae=a(T,"DIV",{class:!0});var pn=s(ae);h($t.$$.fragment,pn),oi=c(pn),Mn=a(pn,"P",{});var hp=s(Mn);ni=i(hp,"Activates gradient checkpointing for the current model."),hp.forEach(o),ai=c(pn),En=a(pn,"P",{});var gp=s(En);si=i(gp,`Note that in other frameworks this feature can be referred to as \u201Cactivation checkpointing\u201D or \u201Ccheckpoint
activations\u201D.`),gp.forEach(o),pn.forEach(o),ri=c(T),N=a(T,"DIV",{class:!0});var L=s(N);h(wt.$$.fragment,L),ii=c(L),Un=a(L,"P",{});var _p=s(Un);li=i(_p,"Instantiate a pretrained pytorch model from a pre-trained model configuration."),_p.forEach(o),di=c(L),me=a(L,"P",{});var fn=s(me);ci=i(fn,"The model is set in evaluation mode by default using "),Nn=a(fn,"CODE",{});var vp=s(Nn);pi=i(vp,"model.eval()"),vp.forEach(o),fi=i(fn,` (Dropout modules are deactivated). To train
the model, you should first set it back in training mode with `),Tn=a(fn,"CODE",{});var bp=s(Tn);mi=i(bp,"model.train()"),bp.forEach(o),ui=i(fn,"."),fn.forEach(o),hi=c(L),Dt=a(L,"P",{});var Ks=s(Dt);gi=i(Ks,"The warning "),An=a(Ks,"EM",{});var xp=s(An);_i=i(xp,"Weights from XXX not initialized from pretrained model"),xp.forEach(o),vi=i(Ks,` 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.`),Ks.forEach(o),bi=c(L),kt=a(L,"P",{});var Ss=s(kt);xi=i(Ss,"The warning "),Fn=a(Ss,"EM",{});var yp=s(Fn);yi=i(yp,"Weights from XXX not used in YYY"),yp.forEach(o),$i=i(Ss,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),Ss.forEach(o),wi=c(L),h(Oe.$$.fragment,L),Di=c(L),h(Le.$$.fragment,L),L.forEach(o),ki=c(T),Pe=a(T,"DIV",{class:!0});var Xs=s(Pe);h(Mt.$$.fragment,Xs),Mi=c(Xs),Cn=a(Xs,"P",{});var $p=s(Cn);Ei=i($p,"Get number of (optionally, trainable or non-embeddings) parameters in the module."),$p.forEach(o),Xs.forEach(o),Ui=c(T),Be=a(T,"DIV",{class:!0});var Ws=s(Be);h(Et.$$.fragment,Ws),Ni=c(Ws),Ut=a(Ws,"P",{});var Qs=s(Ut);Ti=i(Qs,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),jn=a(Qs,"CODE",{});var wp=s(jn);Ai=i(wp,"[from_pretrained()](/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin.from_pretrained)"),wp.forEach(o),Fi=i(Qs," class method."),Qs.forEach(o),Ws.forEach(o),T.forEach(o),ds=c(t),ue=a(t,"H2",{class:!0});var Hs=s(ue);Ve=a(Hs,"A",{id:!0,class:!0,href:!0});var Dp=s(Ve);qn=a(Dp,"SPAN",{});var kp=s(qn);h(Nt.$$.fragment,kp),kp.forEach(o),Dp.forEach(o),Ci=c(Hs),On=a(Hs,"SPAN",{});var Mp=s(On);ji=i(Mp,"UNet2DOutput"),Mp.forEach(o),Hs.forEach(o),cs=c(t),Tt=a(t,"DIV",{class:!0});var Ep=s(Tt);h(At.$$.fragment,Ep),Ep.forEach(o),ps=c(t),he=a(t,"H2",{class:!0});var Ys=s(he);Ie=a(Ys,"A",{id:!0,class:!0,href:!0});var Up=s(Ie);Ln=a(Up,"SPAN",{});var Np=s(Ln);h(Ft.$$.fragment,Np),Np.forEach(o),Up.forEach(o),qi=c(Ys),Pn=a(Ys,"SPAN",{});var Tp=s(Pn);Oi=i(Tp,"UNet1DModel"),Tp.forEach(o),Ys.forEach(o),fs=c(t),V=a(t,"DIV",{class:!0});var ct=s(V);h(Ct.$$.fragment,ct),Li=c(ct),Bn=a(ct,"P",{});var Ap=s(Bn);Pi=i(Ap,"UNet1DModel is a 1D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Ap.forEach(o),Bi=c(ct),jt=a(ct,"P",{});var Gs=s(jt);Vi=i(Gs,"This model inherits from "),Go=a(Gs,"A",{href:!0});var Fp=s(Go);Ii=i(Fp,"ModelMixin"),Fp.forEach(o),zi=i(Gs,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Gs.forEach(o),Ki=c(ct),Jo=a(ct,"DIV",{class:!0});var Cp=s(Jo);h(qt.$$.fragment,Cp),Cp.forEach(o),ct.forEach(o),ms=c(t),ge=a(t,"H2",{class:!0});var Js=s(ge);ze=a(Js,"A",{id:!0,class:!0,href:!0});var jp=s(ze);Vn=a(jp,"SPAN",{});var qp=s(Vn);h(Ot.$$.fragment,qp),qp.forEach(o),jp.forEach(o),Si=c(Js),In=a(Js,"SPAN",{});var Op=s(In);Xi=i(Op,"UNet2DModel"),Op.forEach(o),Js.forEach(o),us=c(t),I=a(t,"DIV",{class:!0});var pt=s(I);h(Lt.$$.fragment,pt),Wi=c(pt),zn=a(pt,"P",{});var Lp=s(zn);Qi=i(Lp,"UNet2DModel is a 2D UNet model that takes in a noisy sample and a timestep and returns sample shaped output."),Lp.forEach(o),Hi=c(pt),Pt=a(pt,"P",{});var Rs=s(Pt);Yi=i(Rs,"This model inherits from "),Ro=a(Rs,"A",{href:!0});var Pp=s(Ro);Gi=i(Pp,"ModelMixin"),Pp.forEach(o),Ji=i(Rs,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),Rs.forEach(o),Ri=c(pt),Zo=a(pt,"DIV",{class:!0});var Bp=s(Zo);h(Bt.$$.fragment,Bp),Bp.forEach(o),pt.forEach(o),hs=c(t),_e=a(t,"H2",{class:!0});var Zs=s(_e);Ke=a(Zs,"A",{id:!0,class:!0,href:!0});var Vp=s(Ke);Kn=a(Vp,"SPAN",{});var Ip=s(Kn);h(Vt.$$.fragment,Ip),Ip.forEach(o),Vp.forEach(o),Zi=c(Zs),Sn=a(Zs,"SPAN",{});var zp=s(Sn);el=i(zp,"UNet2DConditionOutput"),zp.forEach(o),Zs.forEach(o),gs=c(t),It=a(t,"DIV",{class:!0});var Kp=s(It);h(zt.$$.fragment,Kp),Kp.forEach(o),_s=c(t),ve=a(t,"H2",{class:!0});var er=s(ve);Se=a(er,"A",{id:!0,class:!0,href:!0});var Sp=s(Se);Xn=a(Sp,"SPAN",{});var Xp=s(Xn);h(Kt.$$.fragment,Xp),Xp.forEach(o),Sp.forEach(o),tl=c(er),Wn=a(er,"SPAN",{});var Wp=s(Wn);ol=i(Wp,"UNet2DConditionModel"),Wp.forEach(o),er.forEach(o),vs=c(t),z=a(t,"DIV",{class:!0});var ft=s(z);h(St.$$.fragment,ft),nl=c(ft),Qn=a(ft,"P",{});var Qp=s(Qn);al=i(Qp,`UNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a timestep
and returns sample shaped output.`),Qp.forEach(o),sl=c(ft),Xt=a(ft,"P",{});var tr=s(Xt);rl=i(tr,"This model inherits from "),en=a(tr,"A",{href:!0});var Hp=s(en);il=i(Hp,"ModelMixin"),Hp.forEach(o),ll=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),dl=c(ft),tn=a(ft,"DIV",{class:!0});var Yp=s(tn);h(Wt.$$.fragment,Yp),Yp.forEach(o),ft.forEach(o),bs=c(t),be=a(t,"H2",{class:!0});var or=s(be);Xe=a(or,"A",{id:!0,class:!0,href:!0});var Gp=s(Xe);Hn=a(Gp,"SPAN",{});var Jp=s(Hn);h(Qt.$$.fragment,Jp),Jp.forEach(o),Gp.forEach(o),cl=c(or),Yn=a(or,"SPAN",{});var Rp=s(Yn);pl=i(Rp,"DecoderOutput"),Rp.forEach(o),or.forEach(o),xs=c(t),xe=a(t,"DIV",{class:!0});var nr=s(xe);h(Ht.$$.fragment,nr),fl=c(nr),Gn=a(nr,"P",{});var Zp=s(Gn);ml=i(Zp,"Output of decoding method."),Zp.forEach(o),nr.forEach(o),ys=c(t),ye=a(t,"H2",{class:!0});var ar=s(ye);We=a(ar,"A",{id:!0,class:!0,href:!0});var ef=s(We);Jn=a(ef,"SPAN",{});var tf=s(Jn);h(Yt.$$.fragment,tf),tf.forEach(o),ef.forEach(o),ul=c(ar),Rn=a(ar,"SPAN",{});var of=s(Rn);hl=i(of,"VQEncoderOutput"),of.forEach(o),ar.forEach(o),$s=c(t),$e=a(t,"DIV",{class:!0});var sr=s($e);h(Gt.$$.fragment,sr),gl=c(sr),Zn=a(sr,"P",{});var nf=s(Zn);_l=i(nf,"Output of VQModel encoding method."),nf.forEach(o),sr.forEach(o),ws=c(t),we=a(t,"H2",{class:!0});var rr=s(we);Qe=a(rr,"A",{id:!0,class:!0,href:!0});var af=s(Qe);ea=a(af,"SPAN",{});var sf=s(ea);h(Jt.$$.fragment,sf),sf.forEach(o),af.forEach(o),vl=c(rr),ta=a(rr,"SPAN",{});var rf=s(ta);bl=i(rf,"VQModel"),rf.forEach(o),rr.forEach(o),Ds=c(t),K=a(t,"DIV",{class:!0});var mt=s(K);h(Rt.$$.fragment,mt),xl=c(mt),oa=a(mt,"P",{});var lf=s(oa);yl=i(lf,`VQ-VAE model from the paper Neural Discrete Representation Learning by Aaron van den Oord, Oriol Vinyals and Koray
Kavukcuoglu.`),lf.forEach(o),$l=c(mt),Zt=a(mt,"P",{});var ir=s(Zt);wl=i(ir,"This model inherits from "),on=a(ir,"A",{href:!0});var df=s(on);Dl=i(df,"ModelMixin"),df.forEach(o),kl=i(ir,`. Check the superclass documentation for the generic methods the library
implements for all the model (such as downloading or saving, etc.)`),ir.forEach(o),Ml=c(mt),nn=a(mt,"DIV",{class:!0});var cf=s(nn);h(eo.$$.fragment,cf),cf.forEach(o),mt.forEach(o),ks=c(t),De=a(t,"H2",{class:!0});var lr=s(De);He=a(lr,"A",{id:!0,class:!0,href:!0});var pf=s(He);na=a(pf,"SPAN",{});var ff=s(na);h(to.$$.fragment,ff),ff.forEach(o),pf.forEach(o),El=c(lr),aa=a(lr,"SPAN",{});var mf=s(aa);Ul=i(mf,"AutoencoderKLOutput"),mf.forEach(o),lr.forEach(o),Ms=c(t),ke=a(t,"DIV",{class:!0});var dr=s(ke);h(oo.$$.fragment,dr),Nl=c(dr),sa=a(dr,"P",{});var uf=s(sa);Tl=i(uf,"Output of AutoencoderKL encoding method."),uf.forEach(o),dr.forEach(o),Es=c(t),Me=a(t,"H2",{class:!0});var cr=s(Me);Ye=a(cr,"A",{id:!0,class:!0,href:!0});var hf=s(Ye);ra=a(hf,"SPAN",{});var gf=s(ra);h(no.$$.fragment,gf),gf.forEach(o),hf.forEach(o),Al=c(cr),ia=a(cr,"SPAN",{});var _f=s(ia);Fl=i(_f,"AutoencoderKL"),_f.forEach(o),cr.forEach(o),Us=c(t),S=a(t,"DIV",{class:!0});var ut=s(S);h(ao.$$.fragment,ut),Cl=c(ut),la=a(ut,"P",{});var vf=s(la);jl=i(vf,`Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational Bayes by Diederik P. Kingma
and Max Welling.`),vf.forEach(o),ql=c(ut),so=a(ut,"P",{});var pr=s(so);Ol=i(pr,"This model inherits from "),an=a(pr,"A",{href:!0});var bf=s(an);Ll=i(bf,"ModelMixin"),bf.forEach(o),Pl=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),Bl=c(ut),sn=a(ut,"DIV",{class:!0});var xf=s(sn);h(ro.$$.fragment,xf),xf.forEach(o),ut.forEach(o),Ns=c(t),Ee=a(t,"H2",{class:!0});var fr=s(Ee);Ge=a(fr,"A",{id:!0,class:!0,href:!0});var yf=s(Ge);da=a(yf,"SPAN",{});var $f=s(da);h(io.$$.fragment,$f),$f.forEach(o),yf.forEach(o),Vl=c(fr),ca=a(fr,"SPAN",{});var wf=s(ca);Il=i(wf,"FlaxModelMixin"),wf.forEach(o),fr.forEach(o),Ts=c(t),U=a(t,"DIV",{class:!0});var C=s(U);h(lo.$$.fragment,C),zl=c(C),pa=a(C,"P",{});var Df=s(pa);Kl=i(Df,"Base class for all flax models."),Df.forEach(o),Sl=c(C),rn=a(C,"P",{});var op=s(rn);ln=a(op,"A",{href:!0});var kf=s(ln);Xl=i(kf,"FlaxModelMixin"),kf.forEach(o),Wl=i(op,` takes care of storing the configuration of the models and handles methods for loading,
downloading and saving models.`),op.forEach(o),Ql=c(C),O=a(C,"DIV",{class:!0});var re=s(O);h(co.$$.fragment,re),Hl=c(re),fa=a(re,"P",{});var Mf=s(fa);Yl=i(Mf,"Instantiate a pretrained flax model from a pre-trained model configuration."),Mf.forEach(o),Gl=c(re),po=a(re,"P",{});var mr=s(po);Jl=i(mr,"The warning "),ma=a(mr,"EM",{});var Ef=s(ma);Rl=i(Ef,"Weights from XXX not initialized from pretrained model"),Ef.forEach(o),Zl=i(mr,` 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.`),mr.forEach(o),ed=c(re),fo=a(re,"P",{});var ur=s(fo);td=i(ur,"The warning "),ua=a(ur,"EM",{});var Uf=s(ua);od=i(Uf,"Weights from XXX not used in YYY"),Uf.forEach(o),nd=i(ur,` means that the layer XXX is not used by YYY, therefore those
weights are discarded.`),ur.forEach(o),ad=c(re),h(Je.$$.fragment,re),re.forEach(o),sd=c(C),Re=a(C,"DIV",{class:!0});var hr=s(Re);h(mo.$$.fragment,hr),rd=c(hr),uo=a(hr,"P",{});var gr=s(uo);id=i(gr,`Save a model and its configuration file to a directory, so that it can be re-loaded using the
`),ha=a(gr,"CODE",{});var Nf=s(ha);ld=i(Nf,"[from_pretrained()](/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.FlaxModelMixin.from_pretrained)"),Nf.forEach(o),dd=i(gr," class method"),gr.forEach(o),hr.forEach(o),cd=c(C),Y=a(C,"DIV",{class:!0});var ht=s(Y);h(ho.$$.fragment,ht),pd=c(ht),X=a(ht,"P",{});var ie=s(X);fd=i(ie,"Cast the floating-point "),ga=a(ie,"CODE",{});var Tf=s(ga);md=i(Tf,"params"),Tf.forEach(o),ud=i(ie," to "),_a=a(ie,"CODE",{});var Af=s(_a);hd=i(Af,"jax.numpy.bfloat16"),Af.forEach(o),gd=i(ie,". This returns a new "),va=a(ie,"CODE",{});var Ff=s(va);_d=i(Ff,"params"),Ff.forEach(o),vd=i(ie,` tree and does not cast
the `),ba=a(ie,"CODE",{});var Cf=s(ba);bd=i(Cf,"params"),Cf.forEach(o),xd=i(ie," in place."),ie.forEach(o),yd=c(ht),xa=a(ht,"P",{});var jf=s(xa);$d=i(jf,`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.`),jf.forEach(o),wd=c(ht),h(Ze.$$.fragment,ht),ht.forEach(o),Dd=c(C),G=a(C,"DIV",{class:!0});var gt=s(G);h(go.$$.fragment,gt),kd=c(gt),W=a(gt,"P",{});var le=s(W);Md=i(le,"Cast the floating-point "),ya=a(le,"CODE",{});var qf=s(ya);Ed=i(qf,"params"),qf.forEach(o),Ud=i(le," to "),$a=a(le,"CODE",{});var Of=s($a);Nd=i(Of,"jax.numpy.float16"),Of.forEach(o),Td=i(le,". This returns a new "),wa=a(le,"CODE",{});var Lf=s(wa);Ad=i(Lf,"params"),Lf.forEach(o),Fd=i(le,` tree and does not cast the
`),Da=a(le,"CODE",{});var Pf=s(Da);Cd=i(Pf,"params"),Pf.forEach(o),jd=i(le," in place."),le.forEach(o),qd=c(gt),ka=a(gt,"P",{});var Bf=s(ka);Od=i(Bf,`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.`),Bf.forEach(o),Ld=c(gt),h(et.$$.fragment,gt),gt.forEach(o),Pd=c(C),se=a(C,"DIV",{class:!0});var mn=s(se);h(_o.$$.fragment,mn),Bd=c(mn),Q=a(mn,"P",{});var de=s(Q);Vd=i(de,"Cast the floating-point "),Ma=a(de,"CODE",{});var Vf=s(Ma);Id=i(Vf,"params"),Vf.forEach(o),zd=i(de," to "),Ea=a(de,"CODE",{});var If=s(Ea);Kd=i(If,"jax.numpy.float32"),If.forEach(o),Sd=i(de,`. This method can be used to explicitly convert the
model parameters to fp32 precision. This returns a new `),Ua=a(de,"CODE",{});var zf=s(Ua);Xd=i(zf,"params"),zf.forEach(o),Wd=i(de," tree and does not cast the "),Na=a(de,"CODE",{});var Kf=s(Na);Qd=i(Kf,"params"),Kf.forEach(o),Hd=i(de," in place."),de.forEach(o),Yd=c(mn),h(tt.$$.fragment,mn),mn.forEach(o),C.forEach(o),As=c(t),Ue=a(t,"H2",{class:!0});var _r=s(Ue);ot=a(_r,"A",{id:!0,class:!0,href:!0});var Sf=s(ot);Ta=a(Sf,"SPAN",{});var Xf=s(Ta);h(vo.$$.fragment,Xf),Xf.forEach(o),Sf.forEach(o),Gd=c(_r),Aa=a(_r,"SPAN",{});var Wf=s(Aa);Jd=i(Wf,"FlaxUNet2DConditionOutput"),Wf.forEach(o),_r.forEach(o),Fs=c(t),Ne=a(t,"DIV",{class:!0});var vr=s(Ne);h(bo.$$.fragment,vr),Rd=c(vr),nt=a(vr,"DIV",{class:!0});var br=s(nt);h(xo.$$.fragment,br),Zd=c(br),Fa=a(br,"P",{});var Qf=s(Fa);ec=i(Qf,"\u201CReturns a new object replacing the specified fields with new values."),Qf.forEach(o),br.forEach(o),vr.forEach(o),Cs=c(t),Te=a(t,"H2",{class:!0});var xr=s(Te);at=a(xr,"A",{id:!0,class:!0,href:!0});var Hf=s(at);Ca=a(Hf,"SPAN",{});var Yf=s(Ca);h(yo.$$.fragment,Yf),Yf.forEach(o),Hf.forEach(o),tc=c(xr),ja=a(xr,"SPAN",{});var Gf=s(ja);oc=i(Gf,"FlaxUNet2DConditionModel"),Gf.forEach(o),xr.forEach(o),js=c(t),F=a(t,"DIV",{class:!0});var J=s(F);h($o.$$.fragment,J),nc=c(J),qa=a(J,"P",{});var Jf=s(qa);ac=i(Jf,`FlaxUNet2DConditionModel is a conditional 2D UNet model that takes in a noisy sample, conditional state, and a
timestep and returns sample shaped output.`),Jf.forEach(o),sc=c(J),wo=a(J,"P",{});var yr=s(wo);rc=i(yr,"This model inherits from "),dn=a(yr,"A",{href:!0});var Rf=s(dn);ic=i(Rf,"FlaxModelMixin"),Rf.forEach(o),lc=i(yr,`. Check the superclass documentation for the generic methods the library
implements for all the models (such as downloading or saving, etc.)`),yr.forEach(o),dc=c(J),Do=a(J,"P",{});var $r=s(Do);cc=i($r,"Also, this model is a Flax Linen "),ko=a($r,"A",{href:!0,rel:!0});var Zf=s(ko);pc=i(Zf,"flax.linen.Module"),Zf.forEach(o),fc=i($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.`),$r.forEach(o),mc=c(J),Oa=a(J,"P",{});var em=s(Oa);uc=i(em,"Finally, this model supports inherent JAX features such as:"),em.forEach(o),hc=c(J),R=a(J,"UL",{});var _t=s(R);La=a(_t,"LI",{});var tm=s(La);Mo=a(tm,"A",{href:!0,rel:!0});var om=s(Mo);gc=i(om,"Just-In-Time (JIT) compilation"),om.forEach(o),tm.forEach(o),_c=c(_t),Pa=a(_t,"LI",{});var nm=s(Pa);Eo=a(nm,"A",{href:!0,rel:!0});var am=s(Eo);vc=i(am,"Automatic Differentiation"),am.forEach(o),nm.forEach(o),bc=c(_t),Ba=a(_t,"LI",{});var sm=s(Ba);Uo=a(sm,"A",{href:!0,rel:!0});var rm=s(Uo);xc=i(rm,"Vectorization"),rm.forEach(o),sm.forEach(o),yc=c(_t),Va=a(_t,"LI",{});var im=s(Va);No=a(im,"A",{href:!0,rel:!0});var lm=s(No);$c=i(lm,"Parallelization"),lm.forEach(o),im.forEach(o),_t.forEach(o),J.forEach(o),qs=c(t),Ae=a(t,"H2",{class:!0});var wr=s(Ae);st=a(wr,"A",{id:!0,class:!0,href:!0});var dm=s(st);Ia=a(dm,"SPAN",{});var cm=s(Ia);h(To.$$.fragment,cm),cm.forEach(o),dm.forEach(o),wc=c(wr),za=a(wr,"SPAN",{});var pm=s(za);Dc=i(pm,"FlaxDecoderOutput"),pm.forEach(o),wr.forEach(o),Os=c(t),Z=a(t,"DIV",{class:!0});var un=s(Z);h(Ao.$$.fragment,un),kc=c(un),Ka=a(un,"P",{});var fm=s(Ka);Mc=i(fm,"Output of decoding method."),fm.forEach(o),Ec=c(un),rt=a(un,"DIV",{class:!0});var Dr=s(rt);h(Fo.$$.fragment,Dr),Uc=c(Dr),Sa=a(Dr,"P",{});var mm=s(Sa);Nc=i(mm,"\u201CReturns a new object replacing the specified fields with new values."),mm.forEach(o),Dr.forEach(o),un.forEach(o),Ls=c(t),Fe=a(t,"H2",{class:!0});var kr=s(Fe);it=a(kr,"A",{id:!0,class:!0,href:!0});var um=s(it);Xa=a(um,"SPAN",{});var hm=s(Xa);h(Co.$$.fragment,hm),hm.forEach(o),um.forEach(o),Tc=c(kr),Wa=a(kr,"SPAN",{});var gm=s(Wa);Ac=i(gm,"FlaxAutoencoderKLOutput"),gm.forEach(o),kr.forEach(o),Ps=c(t),ee=a(t,"DIV",{class:!0});var hn=s(ee);h(jo.$$.fragment,hn),Fc=c(hn),Qa=a(hn,"P",{});var _m=s(Qa);Cc=i(_m,"Output of AutoencoderKL encoding method."),_m.forEach(o),jc=c(hn),lt=a(hn,"DIV",{class:!0});var Mr=s(lt);h(qo.$$.fragment,Mr),qc=c(Mr),Ha=a(Mr,"P",{});var vm=s(Ha);Oc=i(vm,"\u201CReturns a new object replacing the specified fields with new values."),vm.forEach(o),Mr.forEach(o),hn.forEach(o),Bs=c(t),Ce=a(t,"H2",{class:!0});var Er=s(Ce);dt=a(Er,"A",{id:!0,class:!0,href:!0});var bm=s(dt);Ya=a(bm,"SPAN",{});var xm=s(Ya);h(Oo.$$.fragment,xm),xm.forEach(o),bm.forEach(o),Lc=c(Er),Ga=a(Er,"SPAN",{});var ym=s(Ga);Pc=i(ym,"FlaxAutoencoderKL"),ym.forEach(o),Er.forEach(o),Vs=c(t),j=a(t,"DIV",{class:!0});var ce=s(j);h(Lo.$$.fragment,ce),Bc=c(ce),Ja=a(ce,"P",{});var $m=s(Ja);Vc=i($m,`Flax Implementation of Variational Autoencoder (VAE) model with KL loss from the paper Auto-Encoding Variational
Bayes by Diederik P. Kingma and Max Welling.`),$m.forEach(o),Ic=c(ce),Po=a(ce,"P",{});var Ur=s(Po);zc=i(Ur,"This model is a Flax Linen "),Bo=a(Ur,"A",{href:!0,rel:!0});var wm=s(Bo);Kc=i(wm,"flax.linen.Module"),wm.forEach(o),Sc=i(Ur,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ur.forEach(o),Xc=c(ce),Ra=a(ce,"P",{});var Dm=s(Ra);Wc=i(Dm,"Finally, this model supports inherent JAX features such as:"),Dm.forEach(o),Qc=c(ce),te=a(ce,"UL",{});var vt=s(te);Za=a(vt,"LI",{});var km=s(Za);Vo=a(km,"A",{href:!0,rel:!0});var Mm=s(Vo);Hc=i(Mm,"Just-In-Time (JIT) compilation"),Mm.forEach(o),km.forEach(o),Yc=c(vt),es=a(vt,"LI",{});var Em=s(es);Io=a(Em,"A",{href:!0,rel:!0});var Um=s(Io);Gc=i(Um,"Automatic Differentiation"),Um.forEach(o),Em.forEach(o),Jc=c(vt),ts=a(vt,"LI",{});var Nm=s(ts);zo=a(Nm,"A",{href:!0,rel:!0});var Tm=s(zo);Rc=i(Tm,"Vectorization"),Tm.forEach(o),Nm.forEach(o),Zc=c(vt),os=a(vt,"LI",{});var Am=s(os);Ko=a(Am,"A",{href:!0,rel:!0});var Fm=s(Ko);ep=i(Fm,"Parallelization"),Fm.forEach(o),Am.forEach(o),vt.forEach(o),ce.forEach(o),this.h()},h(){l(x,"name","hf:doc:metadata"),l(x,"content",JSON.stringify(Wm)),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(qe,"id","diffusers.ModelMixin"),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.ModelMixin"),l(fe,"class","relative group"),l(Ho,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin"),l(Yo,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin.save_pretrained"),l(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(Pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Be,"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(Ve,"id","diffusers.models.unet_2d.UNet2DOutput"),l(Ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(Ve,"href","#diffusers.models.unet_2d.UNet2DOutput"),l(ue,"class","relative group"),l(Tt,"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,"id","diffusers.UNet1DModel"),l(Ie,"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(Ie,"href","#diffusers.UNet1DModel"),l(he,"class","relative group"),l(Go,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin"),l(Jo,"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(ze,"id","diffusers.UNet2DModel"),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.UNet2DModel"),l(ge,"class","relative group"),l(Ro,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin"),l(Zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(I,"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,"id","diffusers.models.unet_2d_condition.UNet2DConditionOutput"),l(Ke,"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(Ke,"href","#diffusers.models.unet_2d_condition.UNet2DConditionOutput"),l(_e,"class","relative group"),l(It,"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.UNet2DConditionModel"),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.UNet2DConditionModel"),l(ve,"class","relative group"),l(en,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin"),l(tn,"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(Xe,"id","diffusers.models.vae.DecoderOutput"),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.models.vae.DecoderOutput"),l(be,"class","relative group"),l(xe,"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.models.vae.VQEncoderOutput"),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.models.vae.VQEncoderOutput"),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(Qe,"id","diffusers.VQModel"),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.VQModel"),l(we,"class","relative group"),l(on,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin"),l(nn,"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(He,"id","diffusers.models.vae.AutoencoderKLOutput"),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.models.vae.AutoencoderKLOutput"),l(De,"class","relative group"),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(Ye,"id","diffusers.AutoencoderKL"),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.AutoencoderKL"),l(Me,"class","relative group"),l(an,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.ModelMixin"),l(sn,"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(Ge,"id","diffusers.FlaxModelMixin"),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.FlaxModelMixin"),l(Ee,"class","relative group"),l(ln,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.FlaxModelMixin"),l(O,"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(Y,"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(se,"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(ot,"id","diffusers.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),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.models.unet_2d_condition_flax.FlaxUNet2DConditionOutput"),l(Ue,"class","relative group"),l(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(at,"id","diffusers.FlaxUNet2DConditionModel"),l(at,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(at,"href","#diffusers.FlaxUNet2DConditionModel"),l(Te,"class","relative group"),l(dn,"href","/docs/diffusers/pr_516/en/using-diffusers/loading#diffusers.FlaxModelMixin"),l(ko,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),l(ko,"rel","nofollow"),l(Mo,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Mo,"rel","nofollow"),l(Eo,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Eo,"rel","nofollow"),l(Uo,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(Uo,"rel","nofollow"),l(No,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(No,"rel","nofollow"),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(st,"id","diffusers.models.vae_flax.FlaxDecoderOutput"),l(st,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(st,"href","#diffusers.models.vae_flax.FlaxDecoderOutput"),l(Ae,"class","relative group"),l(rt,"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(it,"id","diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),l(it,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(it,"href","#diffusers.models.vae_flax.FlaxAutoencoderKLOutput"),l(Fe,"class","relative group"),l(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(dt,"id","diffusers.FlaxAutoencoderKL"),l(dt,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(dt,"href","#diffusers.FlaxAutoencoderKL"),l(Ce,"class","relative group"),l(Bo,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),l(Bo,"rel","nofollow"),l(Vo,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),l(Vo,"rel","nofollow"),l(Io,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),l(Io,"rel","nofollow"),l(zo,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),l(zo,"rel","nofollow"),l(Ko,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),l(Ko,"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),m(t,M,p),m(t,$,p),e($,y),e(y,k),g(f,k,null),e($,w),e($,H),e(H,pe),m(t,P,p),m(t,B,p),e(B,Wo),e(B,gn),e(gn,Fr),e(B,Cr),e(B,_n),e(_n,jr),e(B,qr),m(t,is,p),m(t,fe,p),e(fe,qe),e(qe,vn),g(bt,vn,null),e(fe,Or),e(fe,bn),e(bn,Lr),m(t,ls,p),m(t,E,p),g(xt,E,null),e(E,Pr),e(E,xn),e(xn,Br),e(E,Vr),e(E,Qo),e(Qo,Ho),e(Ho,Ir),e(Qo,zr),e(E,Kr),e(E,yn),e(yn,oe),e(oe,$n),e($n,Sr),e(oe,Xr),e(oe,wn),e(wn,Wr),e(oe,Qr),e(oe,Yo),e(Yo,Hr),e(oe,Yr),e(E,Gr),e(E,ne),g(yt,ne,null),e(ne,Jr),e(ne,Dn),e(Dn,Rr),e(ne,Zr),e(ne,kn),e(kn,ei),e(E,ti),e(E,ae),g($t,ae,null),e(ae,oi),e(ae,Mn),e(Mn,ni),e(ae,ai),e(ae,En),e(En,si),e(E,ri),e(E,N),g(wt,N,null),e(N,ii),e(N,Un),e(Un,li),e(N,di),e(N,me),e(me,ci),e(me,Nn),e(Nn,pi),e(me,fi),e(me,Tn),e(Tn,mi),e(me,ui),e(N,hi),e(N,Dt),e(Dt,gi),e(Dt,An),e(An,_i),e(Dt,vi),e(N,bi),e(N,kt),e(kt,xi),e(kt,Fn),e(Fn,yi),e(kt,$i),e(N,wi),g(Oe,N,null),e(N,Di),g(Le,N,null),e(E,ki),e(E,Pe),g(Mt,Pe,null),e(Pe,Mi),e(Pe,Cn),e(Cn,Ei),e(E,Ui),e(E,Be),g(Et,Be,null),e(Be,Ni),e(Be,Ut),e(Ut,Ti),e(Ut,jn),e(jn,Ai),e(Ut,Fi),m(t,ds,p),m(t,ue,p),e(ue,Ve),e(Ve,qn),g(Nt,qn,null),e(ue,Ci),e(ue,On),e(On,ji),m(t,cs,p),m(t,Tt,p),g(At,Tt,null),m(t,ps,p),m(t,he,p),e(he,Ie),e(Ie,Ln),g(Ft,Ln,null),e(he,qi),e(he,Pn),e(Pn,Oi),m(t,fs,p),m(t,V,p),g(Ct,V,null),e(V,Li),e(V,Bn),e(Bn,Pi),e(V,Bi),e(V,jt),e(jt,Vi),e(jt,Go),e(Go,Ii),e(jt,zi),e(V,Ki),e(V,Jo),g(qt,Jo,null),m(t,ms,p),m(t,ge,p),e(ge,ze),e(ze,Vn),g(Ot,Vn,null),e(ge,Si),e(ge,In),e(In,Xi),m(t,us,p),m(t,I,p),g(Lt,I,null),e(I,Wi),e(I,zn),e(zn,Qi),e(I,Hi),e(I,Pt),e(Pt,Yi),e(Pt,Ro),e(Ro,Gi),e(Pt,Ji),e(I,Ri),e(I,Zo),g(Bt,Zo,null),m(t,hs,p),m(t,_e,p),e(_e,Ke),e(Ke,Kn),g(Vt,Kn,null),e(_e,Zi),e(_e,Sn),e(Sn,el),m(t,gs,p),m(t,It,p),g(zt,It,null),m(t,_s,p),m(t,ve,p),e(ve,Se),e(Se,Xn),g(Kt,Xn,null),e(ve,tl),e(ve,Wn),e(Wn,ol),m(t,vs,p),m(t,z,p),g(St,z,null),e(z,nl),e(z,Qn),e(Qn,al),e(z,sl),e(z,Xt),e(Xt,rl),e(Xt,en),e(en,il),e(Xt,ll),e(z,dl),e(z,tn),g(Wt,tn,null),m(t,bs,p),m(t,be,p),e(be,Xe),e(Xe,Hn),g(Qt,Hn,null),e(be,cl),e(be,Yn),e(Yn,pl),m(t,xs,p),m(t,xe,p),g(Ht,xe,null),e(xe,fl),e(xe,Gn),e(Gn,ml),m(t,ys,p),m(t,ye,p),e(ye,We),e(We,Jn),g(Yt,Jn,null),e(ye,ul),e(ye,Rn),e(Rn,hl),m(t,$s,p),m(t,$e,p),g(Gt,$e,null),e($e,gl),e($e,Zn),e(Zn,_l),m(t,ws,p),m(t,we,p),e(we,Qe),e(Qe,ea),g(Jt,ea,null),e(we,vl),e(we,ta),e(ta,bl),m(t,Ds,p),m(t,K,p),g(Rt,K,null),e(K,xl),e(K,oa),e(oa,yl),e(K,$l),e(K,Zt),e(Zt,wl),e(Zt,on),e(on,Dl),e(Zt,kl),e(K,Ml),e(K,nn),g(eo,nn,null),m(t,ks,p),m(t,De,p),e(De,He),e(He,na),g(to,na,null),e(De,El),e(De,aa),e(aa,Ul),m(t,Ms,p),m(t,ke,p),g(oo,ke,null),e(ke,Nl),e(ke,sa),e(sa,Tl),m(t,Es,p),m(t,Me,p),e(Me,Ye),e(Ye,ra),g(no,ra,null),e(Me,Al),e(Me,ia),e(ia,Fl),m(t,Us,p),m(t,S,p),g(ao,S,null),e(S,Cl),e(S,la),e(la,jl),e(S,ql),e(S,so),e(so,Ol),e(so,an),e(an,Ll),e(so,Pl),e(S,Bl),e(S,sn),g(ro,sn,null),m(t,Ns,p),m(t,Ee,p),e(Ee,Ge),e(Ge,da),g(io,da,null),e(Ee,Vl),e(Ee,ca),e(ca,Il),m(t,Ts,p),m(t,U,p),g(lo,U,null),e(U,zl),e(U,pa),e(pa,Kl),e(U,Sl),e(U,rn),e(rn,ln),e(ln,Xl),e(rn,Wl),e(U,Ql),e(U,O),g(co,O,null),e(O,Hl),e(O,fa),e(fa,Yl),e(O,Gl),e(O,po),e(po,Jl),e(po,ma),e(ma,Rl),e(po,Zl),e(O,ed),e(O,fo),e(fo,td),e(fo,ua),e(ua,od),e(fo,nd),e(O,ad),g(Je,O,null),e(U,sd),e(U,Re),g(mo,Re,null),e(Re,rd),e(Re,uo),e(uo,id),e(uo,ha),e(ha,ld),e(uo,dd),e(U,cd),e(U,Y),g(ho,Y,null),e(Y,pd),e(Y,X),e(X,fd),e(X,ga),e(ga,md),e(X,ud),e(X,_a),e(_a,hd),e(X,gd),e(X,va),e(va,_d),e(X,vd),e(X,ba),e(ba,bd),e(X,xd),e(Y,yd),e(Y,xa),e(xa,$d),e(Y,wd),g(Ze,Y,null),e(U,Dd),e(U,G),g(go,G,null),e(G,kd),e(G,W),e(W,Md),e(W,ya),e(ya,Ed),e(W,Ud),e(W,$a),e($a,Nd),e(W,Td),e(W,wa),e(wa,Ad),e(W,Fd),e(W,Da),e(Da,Cd),e(W,jd),e(G,qd),e(G,ka),e(ka,Od),e(G,Ld),g(et,G,null),e(U,Pd),e(U,se),g(_o,se,null),e(se,Bd),e(se,Q),e(Q,Vd),e(Q,Ma),e(Ma,Id),e(Q,zd),e(Q,Ea),e(Ea,Kd),e(Q,Sd),e(Q,Ua),e(Ua,Xd),e(Q,Wd),e(Q,Na),e(Na,Qd),e(Q,Hd),e(se,Yd),g(tt,se,null),m(t,As,p),m(t,Ue,p),e(Ue,ot),e(ot,Ta),g(vo,Ta,null),e(Ue,Gd),e(Ue,Aa),e(Aa,Jd),m(t,Fs,p),m(t,Ne,p),g(bo,Ne,null),e(Ne,Rd),e(Ne,nt),g(xo,nt,null),e(nt,Zd),e(nt,Fa),e(Fa,ec),m(t,Cs,p),m(t,Te,p),e(Te,at),e(at,Ca),g(yo,Ca,null),e(Te,tc),e(Te,ja),e(ja,oc),m(t,js,p),m(t,F,p),g($o,F,null),e(F,nc),e(F,qa),e(qa,ac),e(F,sc),e(F,wo),e(wo,rc),e(wo,dn),e(dn,ic),e(wo,lc),e(F,dc),e(F,Do),e(Do,cc),e(Do,ko),e(ko,pc),e(Do,fc),e(F,mc),e(F,Oa),e(Oa,uc),e(F,hc),e(F,R),e(R,La),e(La,Mo),e(Mo,gc),e(R,_c),e(R,Pa),e(Pa,Eo),e(Eo,vc),e(R,bc),e(R,Ba),e(Ba,Uo),e(Uo,xc),e(R,yc),e(R,Va),e(Va,No),e(No,$c),m(t,qs,p),m(t,Ae,p),e(Ae,st),e(st,Ia),g(To,Ia,null),e(Ae,wc),e(Ae,za),e(za,Dc),m(t,Os,p),m(t,Z,p),g(Ao,Z,null),e(Z,kc),e(Z,Ka),e(Ka,Mc),e(Z,Ec),e(Z,rt),g(Fo,rt,null),e(rt,Uc),e(rt,Sa),e(Sa,Nc),m(t,Ls,p),m(t,Fe,p),e(Fe,it),e(it,Xa),g(Co,Xa,null),e(Fe,Tc),e(Fe,Wa),e(Wa,Ac),m(t,Ps,p),m(t,ee,p),g(jo,ee,null),e(ee,Fc),e(ee,Qa),e(Qa,Cc),e(ee,jc),e(ee,lt),g(qo,lt,null),e(lt,qc),e(lt,Ha),e(Ha,Oc),m(t,Bs,p),m(t,Ce,p),e(Ce,dt),e(dt,Ya),g(Oo,Ya,null),e(Ce,Lc),e(Ce,Ga),e(Ga,Pc),m(t,Vs,p),m(t,j,p),g(Lo,j,null),e(j,Bc),e(j,Ja),e(Ja,Vc),e(j,Ic),e(j,Po),e(Po,zc),e(Po,Bo),e(Bo,Kc),e(Po,Sc),e(j,Xc),e(j,Ra),e(Ra,Wc),e(j,Qc),e(j,te),e(te,Za),e(Za,Vo),e(Vo,Hc),e(te,Yc),e(te,es),e(es,Io),e(Io,Gc),e(te,Jc),e(te,ts),e(ts,zo),e(zo,Rc),e(te,Zc),e(te,os),e(os,Ko),e(Ko,ep),Is=!0},p(t,[p]){const So={};p&2&&(So.$$scope={dirty:p,ctx:t}),Oe.$set(So);const ns={};p&2&&(ns.$$scope={dirty:p,ctx:t}),Le.$set(ns);const as={};p&2&&(as.$$scope={dirty:p,ctx:t}),Je.$set(as);const ss={};p&2&&(ss.$$scope={dirty:p,ctx:t}),Ze.$set(ss);const je={};p&2&&(je.$$scope={dirty:p,ctx:t}),et.$set(je);const rs={};p&2&&(rs.$$scope={dirty:p,ctx:t}),tt.$set(rs)},i(t){Is||(_(f.$$.fragment,t),_(bt.$$.fragment,t),_(xt.$$.fragment,t),_(yt.$$.fragment,t),_($t.$$.fragment,t),_(wt.$$.fragment,t),_(Oe.$$.fragment,t),_(Le.$$.fragment,t),_(Mt.$$.fragment,t),_(Et.$$.fragment,t),_(Nt.$$.fragment,t),_(At.$$.fragment,t),_(Ft.$$.fragment,t),_(Ct.$$.fragment,t),_(qt.$$.fragment,t),_(Ot.$$.fragment,t),_(Lt.$$.fragment,t),_(Bt.$$.fragment,t),_(Vt.$$.fragment,t),_(zt.$$.fragment,t),_(Kt.$$.fragment,t),_(St.$$.fragment,t),_(Wt.$$.fragment,t),_(Qt.$$.fragment,t),_(Ht.$$.fragment,t),_(Yt.$$.fragment,t),_(Gt.$$.fragment,t),_(Jt.$$.fragment,t),_(Rt.$$.fragment,t),_(eo.$$.fragment,t),_(to.$$.fragment,t),_(oo.$$.fragment,t),_(no.$$.fragment,t),_(ao.$$.fragment,t),_(ro.$$.fragment,t),_(io.$$.fragment,t),_(lo.$$.fragment,t),_(co.$$.fragment,t),_(Je.$$.fragment,t),_(mo.$$.fragment,t),_(ho.$$.fragment,t),_(Ze.$$.fragment,t),_(go.$$.fragment,t),_(et.$$.fragment,t),_(_o.$$.fragment,t),_(tt.$$.fragment,t),_(vo.$$.fragment,t),_(bo.$$.fragment,t),_(xo.$$.fragment,t),_(yo.$$.fragment,t),_($o.$$.fragment,t),_(To.$$.fragment,t),_(Ao.$$.fragment,t),_(Fo.$$.fragment,t),_(Co.$$.fragment,t),_(jo.$$.fragment,t),_(qo.$$.fragment,t),_(Oo.$$.fragment,t),_(Lo.$$.fragment,t),Is=!0)},o(t){v(f.$$.fragment,t),v(bt.$$.fragment,t),v(xt.$$.fragment,t),v(yt.$$.fragment,t),v($t.$$.fragment,t),v(wt.$$.fragment,t),v(Oe.$$.fragment,t),v(Le.$$.fragment,t),v(Mt.$$.fragment,t),v(Et.$$.fragment,t),v(Nt.$$.fragment,t),v(At.$$.fragment,t),v(Ft.$$.fragment,t),v(Ct.$$.fragment,t),v(qt.$$.fragment,t),v(Ot.$$.fragment,t),v(Lt.$$.fragment,t),v(Bt.$$.fragment,t),v(Vt.$$.fragment,t),v(zt.$$.fragment,t),v(Kt.$$.fragment,t),v(St.$$.fragment,t),v(Wt.$$.fragment,t),v(Qt.$$.fragment,t),v(Ht.$$.fragment,t),v(Yt.$$.fragment,t),v(Gt.$$.fragment,t),v(Jt.$$.fragment,t),v(Rt.$$.fragment,t),v(eo.$$.fragment,t),v(to.$$.fragment,t),v(oo.$$.fragment,t),v(no.$$.fragment,t),v(ao.$$.fragment,t),v(ro.$$.fragment,t),v(io.$$.fragment,t),v(lo.$$.fragment,t),v(co.$$.fragment,t),v(Je.$$.fragment,t),v(mo.$$.fragment,t),v(ho.$$.fragment,t),v(Ze.$$.fragment,t),v(go.$$.fragment,t),v(et.$$.fragment,t),v(_o.$$.fragment,t),v(tt.$$.fragment,t),v(vo.$$.fragment,t),v(bo.$$.fragment,t),v(xo.$$.fragment,t),v(yo.$$.fragment,t),v($o.$$.fragment,t),v(To.$$.fragment,t),v(Ao.$$.fragment,t),v(Fo.$$.fragment,t),v(Co.$$.fragment,t),v(jo.$$.fragment,t),v(qo.$$.fragment,t),v(Oo.$$.fragment,t),v(Lo.$$.fragment,t),Is=!1},d(t){o(x),t&&o(M),t&&o($),b(f),t&&o(P),t&&o(B),t&&o(is),t&&o(fe),b(bt),t&&o(ls),t&&o(E),b(xt),b(yt),b($t),b(wt),b(Oe),b(Le),b(Mt),b(Et),t&&o(ds),t&&o(ue),b(Nt),t&&o(cs),t&&o(Tt),b(At),t&&o(ps),t&&o(he),b(Ft),t&&o(fs),t&&o(V),b(Ct),b(qt),t&&o(ms),t&&o(ge),b(Ot),t&&o(us),t&&o(I),b(Lt),b(Bt),t&&o(hs),t&&o(_e),b(Vt),t&&o(gs),t&&o(It),b(zt),t&&o(_s),t&&o(ve),b(Kt),t&&o(vs),t&&o(z),b(St),b(Wt),t&&o(bs),t&&o(be),b(Qt),t&&o(xs),t&&o(xe),b(Ht),t&&o(ys),t&&o(ye),b(Yt),t&&o($s),t&&o($e),b(Gt),t&&o(ws),t&&o(we),b(Jt),t&&o(Ds),t&&o(K),b(Rt),b(eo),t&&o(ks),t&&o(De),b(to),t&&o(Ms),t&&o(ke),b(oo),t&&o(Es),t&&o(Me),b(no),t&&o(Us),t&&o(S),b(ao),b(ro),t&&o(Ns),t&&o(Ee),b(io),t&&o(Ts),t&&o(U),b(lo),b(co),b(Je),b(mo),b(ho),b(Ze),b(go),b(et),b(_o),b(tt),t&&o(As),t&&o(Ue),b(vo),t&&o(Fs),t&&o(Ne),b(bo),b(xo),t&&o(Cs),t&&o(Te),b(yo),t&&o(js),t&&o(F),b($o),t&&o(qs),t&&o(Ae),b(To),t&&o(Os),t&&o(Z),b(Ao),b(Fo),t&&o(Ls),t&&o(Fe),b(Co),t&&o(Ps),t&&o(ee),b(jo),b(qo),t&&o(Bs),t&&o(Ce),b(Oo),t&&o(Vs),t&&o(j),b(Lo)}}}const Wm={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.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 Qm(q){return Pm(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class eu extends jm{constructor(x){super();qm(this,x,Qm,Xm,Om,{})}}export{eu as default,Wm as metadata};
