Buckets:

rtrm's picture
download
raw
6.46 kB
import{s as st,n as ot,o as rt}from"../chunks/scheduler.182ea377.js";import{S as mt,i as dt,g as o,s as a,r as x,A as lt,h as r,f as i,c as s,j as D,u as L,x as O,k as C,y as G,a as n,v as E,d as b,t as U,w as T}from"../chunks/index.abf12888.js";import{D as Z}from"../chunks/Docstring.93f6f462.js";import{H as Q}from"../chunks/Heading.16916d63.js";function ft(tt){let m,H,P,M,c,I,p,et="Customized activation functions for supporting various models in 🤗 Diffusers.",z,u,S,d,h,W,w,it="GELU activation function with tanh approximation support with <code>approximate=&quot;tanh&quot;</code>.",V,v,j,l,g,X,A,nt='A <a href="https://arxiv.org/abs/2002.05202" rel="nofollow">variant</a> of the gated linear unit activation function.',k,$,F,f,_,Y,y,at=`The approximate form of the Gaussian Error Linear Unit (GELU). For more details, see section 2 of this
<a href="https://arxiv.org/abs/1606.08415" rel="nofollow">paper</a>.`,R,q,B;return c=new Q({props:{title:"Activation functions",local:"activation-functions",headingTag:"h1"}}),u=new Q({props:{title:"GELU",local:"diffusers.models.activations.GELU",headingTag:"h2"}}),h=new Z({props:{name:"class diffusers.models.activations.GELU",anchor:"diffusers.models.activations.GELU",parameters:[{name:"dim_in",val:": int"},{name:"dim_out",val:": int"},{name:"approximate",val:": str = 'none'"}],parametersDescription:[{anchor:"diffusers.models.activations.GELU.dim_in",description:"<strong>dim_in</strong> (<code>int</code>) &#x2014; The number of channels in the input.",name:"dim_in"},{anchor:"diffusers.models.activations.GELU.dim_out",description:"<strong>dim_out</strong> (<code>int</code>) &#x2014; The number of channels in the output.",name:"dim_out"},{anchor:"diffusers.models.activations.GELU.approximate",description:"<strong>approximate</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;none&quot;</code>) &#x2014; If <code>&quot;tanh&quot;</code>, use tanh approximation.",name:"approximate"}],source:"https://github.com/huggingface/diffusers/blob/v0.23.1/src/diffusers/models/activations.py#L50"}}),v=new Q({props:{title:"GEGLU",local:"diffusers.models.activations.GEGLU",headingTag:"h2"}}),g=new Z({props:{name:"class diffusers.models.activations.GEGLU",anchor:"diffusers.models.activations.GEGLU",parameters:[{name:"dim_in",val:": int"},{name:"dim_out",val:": int"}],parametersDescription:[{anchor:"diffusers.models.activations.GEGLU.dim_in",description:"<strong>dim_in</strong> (<code>int</code>) &#x2014; The number of channels in the input.",name:"dim_in"},{anchor:"diffusers.models.activations.GEGLU.dim_out",description:"<strong>dim_out</strong> (<code>int</code>) &#x2014; The number of channels in the output.",name:"dim_out"}],source:"https://github.com/huggingface/diffusers/blob/v0.23.1/src/diffusers/models/activations.py#L77"}}),$=new Q({props:{title:"ApproximateGELU",local:"diffusers.models.activations.ApproximateGELU",headingTag:"h2"}}),_=new Z({props:{name:"class diffusers.models.activations.ApproximateGELU",anchor:"diffusers.models.activations.ApproximateGELU",parameters:[{name:"dim_in",val:": int"},{name:"dim_out",val:": int"}],parametersDescription:[{anchor:"diffusers.models.activations.ApproximateGELU.dim_in",description:"<strong>dim_in</strong> (<code>int</code>) &#x2014; The number of channels in the input.",name:"dim_in"},{anchor:"diffusers.models.activations.ApproximateGELU.dim_out",description:"<strong>dim_out</strong> (<code>int</code>) &#x2014; The number of channels in the output.",name:"dim_out"}],source:"https://github.com/huggingface/diffusers/blob/v0.23.1/src/diffusers/models/activations.py#L104"}}),{c(){m=o("meta"),H=a(),P=o("p"),M=a(),x(c.$$.fragment),I=a(),p=o("p"),p.textContent=et,z=a(),x(u.$$.fragment),S=a(),d=o("div"),x(h.$$.fragment),W=a(),w=o("p"),w.innerHTML=it,V=a(),x(v.$$.fragment),j=a(),l=o("div"),x(g.$$.fragment),X=a(),A=o("p"),A.innerHTML=nt,k=a(),x($.$$.fragment),F=a(),f=o("div"),x(_.$$.fragment),Y=a(),y=o("p"),y.innerHTML=at,R=a(),q=o("p"),this.h()},l(t){const e=lt("svelte-u9bgzb",document.head);m=r(e,"META",{name:!0,content:!0}),e.forEach(i),H=s(t),P=r(t,"P",{}),D(P).forEach(i),M=s(t),L(c.$$.fragment,t),I=s(t),p=r(t,"P",{"data-svelte-h":!0}),O(p)!=="svelte-us8qu2"&&(p.textContent=et),z=s(t),L(u.$$.fragment,t),S=s(t),d=r(t,"DIV",{class:!0});var J=D(d);L(h.$$.fragment,J),W=s(J),w=r(J,"P",{"data-svelte-h":!0}),O(w)!=="svelte-1uqox6j"&&(w.innerHTML=it),J.forEach(i),V=s(t),L(v.$$.fragment,t),j=s(t),l=r(t,"DIV",{class:!0});var K=D(l);L(g.$$.fragment,K),X=s(K),A=r(K,"P",{"data-svelte-h":!0}),O(A)!=="svelte-120b58p"&&(A.innerHTML=nt),K.forEach(i),k=s(t),L($.$$.fragment,t),F=s(t),f=r(t,"DIV",{class:!0});var N=D(f);L(_.$$.fragment,N),Y=s(N),y=r(N,"P",{"data-svelte-h":!0}),O(y)!=="svelte-1e2dlz3"&&(y.innerHTML=at),N.forEach(i),R=s(t),q=r(t,"P",{}),D(q).forEach(i),this.h()},h(){C(m,"name","hf:doc:metadata"),C(m,"content",ct),C(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),C(f,"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,e){G(document.head,m),n(t,H,e),n(t,P,e),n(t,M,e),E(c,t,e),n(t,I,e),n(t,p,e),n(t,z,e),E(u,t,e),n(t,S,e),n(t,d,e),E(h,d,null),G(d,W),G(d,w),n(t,V,e),E(v,t,e),n(t,j,e),n(t,l,e),E(g,l,null),G(l,X),G(l,A),n(t,k,e),E($,t,e),n(t,F,e),n(t,f,e),E(_,f,null),G(f,Y),G(f,y),n(t,R,e),n(t,q,e),B=!0},p:ot,i(t){B||(b(c.$$.fragment,t),b(u.$$.fragment,t),b(h.$$.fragment,t),b(v.$$.fragment,t),b(g.$$.fragment,t),b($.$$.fragment,t),b(_.$$.fragment,t),B=!0)},o(t){U(c.$$.fragment,t),U(u.$$.fragment,t),U(h.$$.fragment,t),U(v.$$.fragment,t),U(g.$$.fragment,t),U($.$$.fragment,t),U(_.$$.fragment,t),B=!1},d(t){t&&(i(H),i(P),i(M),i(I),i(p),i(z),i(S),i(d),i(V),i(j),i(l),i(k),i(F),i(f),i(R),i(q)),i(m),T(c,t),T(u,t),T(h),T(v,t),T(g),T($,t),T(_)}}}const ct='{"title":"Activation functions","local":"activation-functions","sections":[{"title":"GELU","local":"diffusers.models.activations.GELU","sections":[],"depth":2},{"title":"GEGLU","local":"diffusers.models.activations.GEGLU","sections":[],"depth":2},{"title":"ApproximateGELU","local":"diffusers.models.activations.ApproximateGELU","sections":[],"depth":2}],"depth":1}';function pt(tt){return rt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $t extends mt{constructor(m){super(),dt(this,m,pt,ft,st,{})}}export{$t as component};

Xet Storage Details

Size:
6.46 kB
·
Xet hash:
8d5f8519b4eef94234e59667a593449838da1507c3e75c35bd1c68ab634d8fc4

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.