Buckets:

rtrm's picture
download
raw
7.39 kB
import{s as rt,n as mt,o as dt}from"../chunks/scheduler.8c3d61f6.js";import{S as lt,i as ft,g as o,s as a,r as c,A as ct,h as r,f as i,c as s,j as C,u,x as Q,k as H,y as w,a as n,v as p,d as h,t as g,w as v}from"../chunks/index.589a98e8.js";import{D as et}from"../chunks/Docstring.27406313.js";import{H as X,E as ut}from"../chunks/EditOnGithub.e5a8d9cb.js";function pt(it){let m,M,q,I,$,z,b,nt="Customized activation functions for supporting various models in 🤗 Diffusers.",S,_,V,d,x,Y,A,at="GELU activation function with tanh approximation support with <code>approximate=&quot;tanh&quot;</code>.",W,G,j,l,L,Z,y,st='A <a href="https://arxiv.org/abs/2002.05202" rel="nofollow">variant</a> of the gated linear unit activation function.',k,E,F,f,U,tt,P,ot=`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>.`,O,T,R,D,B;return $=new X({props:{title:"Activation functions",local:"activation-functions",headingTag:"h1"}}),_=new X({props:{title:"GELU",local:"diffusers.models.activations.GELU",headingTag:"h2"}}),x=new et({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'"},{name:"bias",val:": bool = True"}],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"},{anchor:"diffusers.models.activations.GELU.bias",description:"<strong>bias</strong> (<code>bool</code>, defaults to True) &#x2014; Whether to use a bias in the linear layer.",name:"bias"}],source:"https://github.com/huggingface/diffusers/blob/vr_7973/src/diffusers/models/activations.py#L65"}}),G=new X({props:{title:"GEGLU",local:"diffusers.models.activations.GEGLU",headingTag:"h2"}}),L=new et({props:{name:"class diffusers.models.activations.GEGLU",anchor:"diffusers.models.activations.GEGLU",parameters:[{name:"dim_in",val:": int"},{name:"dim_out",val:": int"},{name:"bias",val:": bool = True"}],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"},{anchor:"diffusers.models.activations.GEGLU.bias",description:"<strong>bias</strong> (<code>bool</code>, defaults to True) &#x2014; Whether to use a bias in the linear layer.",name:"bias"}],source:"https://github.com/huggingface/diffusers/blob/vr_7973/src/diffusers/models/activations.py#L93"}}),E=new X({props:{title:"ApproximateGELU",local:"diffusers.models.activations.ApproximateGELU",headingTag:"h2"}}),U=new et({props:{name:"class diffusers.models.activations.ApproximateGELU",anchor:"diffusers.models.activations.ApproximateGELU",parameters:[{name:"dim_in",val:": int"},{name:"dim_out",val:": int"},{name:"bias",val:": bool = True"}],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"},{anchor:"diffusers.models.activations.ApproximateGELU.bias",description:"<strong>bias</strong> (<code>bool</code>, defaults to True) &#x2014; Whether to use a bias in the linear layer.",name:"bias"}],source:"https://github.com/huggingface/diffusers/blob/vr_7973/src/diffusers/models/activations.py#L126"}}),T=new ut({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/activations.md"}}),{c(){m=o("meta"),M=a(),q=o("p"),I=a(),c($.$$.fragment),z=a(),b=o("p"),b.textContent=nt,S=a(),c(_.$$.fragment),V=a(),d=o("div"),c(x.$$.fragment),Y=a(),A=o("p"),A.innerHTML=at,W=a(),c(G.$$.fragment),j=a(),l=o("div"),c(L.$$.fragment),Z=a(),y=o("p"),y.innerHTML=st,k=a(),c(E.$$.fragment),F=a(),f=o("div"),c(U.$$.fragment),tt=a(),P=o("p"),P.innerHTML=ot,O=a(),c(T.$$.fragment),R=a(),D=o("p"),this.h()},l(t){const e=ct("svelte-u9bgzb",document.head);m=r(e,"META",{name:!0,content:!0}),e.forEach(i),M=s(t),q=r(t,"P",{}),C(q).forEach(i),I=s(t),u($.$$.fragment,t),z=s(t),b=r(t,"P",{"data-svelte-h":!0}),Q(b)!=="svelte-us8qu2"&&(b.textContent=nt),S=s(t),u(_.$$.fragment,t),V=s(t),d=r(t,"DIV",{class:!0});var J=C(d);u(x.$$.fragment,J),Y=s(J),A=r(J,"P",{"data-svelte-h":!0}),Q(A)!=="svelte-1uqox6j"&&(A.innerHTML=at),J.forEach(i),W=s(t),u(G.$$.fragment,t),j=s(t),l=r(t,"DIV",{class:!0});var K=C(l);u(L.$$.fragment,K),Z=s(K),y=r(K,"P",{"data-svelte-h":!0}),Q(y)!=="svelte-120b58p"&&(y.innerHTML=st),K.forEach(i),k=s(t),u(E.$$.fragment,t),F=s(t),f=r(t,"DIV",{class:!0});var N=C(f);u(U.$$.fragment,N),tt=s(N),P=r(N,"P",{"data-svelte-h":!0}),Q(P)!=="svelte-1e2dlz3"&&(P.innerHTML=ot),N.forEach(i),O=s(t),u(T.$$.fragment,t),R=s(t),D=r(t,"P",{}),C(D).forEach(i),this.h()},h(){H(m,"name","hf:doc:metadata"),H(m,"content",ht),H(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(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){w(document.head,m),n(t,M,e),n(t,q,e),n(t,I,e),p($,t,e),n(t,z,e),n(t,b,e),n(t,S,e),p(_,t,e),n(t,V,e),n(t,d,e),p(x,d,null),w(d,Y),w(d,A),n(t,W,e),p(G,t,e),n(t,j,e),n(t,l,e),p(L,l,null),w(l,Z),w(l,y),n(t,k,e),p(E,t,e),n(t,F,e),n(t,f,e),p(U,f,null),w(f,tt),w(f,P),n(t,O,e),p(T,t,e),n(t,R,e),n(t,D,e),B=!0},p:mt,i(t){B||(h($.$$.fragment,t),h(_.$$.fragment,t),h(x.$$.fragment,t),h(G.$$.fragment,t),h(L.$$.fragment,t),h(E.$$.fragment,t),h(U.$$.fragment,t),h(T.$$.fragment,t),B=!0)},o(t){g($.$$.fragment,t),g(_.$$.fragment,t),g(x.$$.fragment,t),g(G.$$.fragment,t),g(L.$$.fragment,t),g(E.$$.fragment,t),g(U.$$.fragment,t),g(T.$$.fragment,t),B=!1},d(t){t&&(i(M),i(q),i(I),i(z),i(b),i(S),i(V),i(d),i(W),i(j),i(l),i(k),i(F),i(f),i(O),i(R),i(D)),i(m),v($,t),v(_,t),v(x),v(G,t),v(L),v(E,t),v(U),v(T,t)}}}const ht='{"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 gt(it){return dt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xt extends lt{constructor(m){super(),ft(this,m,gt,pt,rt,{})}}export{xt as component};

Xet Storage Details

Size:
7.39 kB
·
Xet hash:
511c5988e78da9fe84f05bf4a8404ca956a9a7d1aa2aaf6bd9a1e064008b76c1

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