Buckets:

rtrm's picture
download
raw
10.5 kB
import{s as be,o as ve,n as $e}from"../chunks/scheduler.8c3d61f6.js";import{S as we,i as xe,g as d,s as a,r as g,A as Te,h as m,f as n,c as i,j as N,u as $,x as y,k as Q,y as r,a as c,v as b,d as v,t as w,w as x}from"../chunks/index.da70eac4.js";import{T as he}from"../chunks/Tip.1d9b8c37.js";import{D as Z}from"../chunks/Docstring.6b390b9a.js";import{H as ge,E as De}from"../chunks/EditOnGithub.1e64e623.js";function Ae(q){let t,_="This API is 🧪 experimental.";return{c(){t=d("p"),t.textContent=_},l(s){t=m(s,"P",{"data-svelte-h":!0}),y(t)!=="svelte-89q1io"&&(t.textContent=_)},m(s,T){c(s,t,T)},p:$e,d(s){s&&n(t)}}}function Me(q){let t,_="This API is 🧪 experimental.";return{c(){t=d("p"),t.textContent=_},l(s){t=m(s,"P",{"data-svelte-h":!0}),y(t)!=="svelte-89q1io"&&(t.textContent=_)},m(s,T){c(s,t,T)},p:$e,d(s){s&&n(t)}}}function ye(q){let t,_,s,T,F,O,C,me='A Transformer model for image-like data from <a href="https://blog.fal.ai/auraflow/" rel="nofollow">AuraFlow</a>.',R,j,B,l,P,ee,I,fe='A 2D Transformer model as introduced in AuraFlow (<a href="https://blog.fal.ai/auraflow/" rel="nofollow">https://blog.fal.ai/auraflow/</a>).',te,u,z,oe,H,ce="Enables fused QKV projections.",ne,V,ue=`For self-attention modules, all projection matrices (i.e., query, key, value) are fused.
For cross-attention modules, only key and value projection matrices are fused.`,re,D,se,A,k,ae,S,pe="Sets the attention processor to use to compute attention.",ie,h,E,le,U,_e="Disables the fused QKV projection if enabled.",de,M,J,L,W,G,X;return F=new ge({props:{title:"AuraFlowTransformer2DModel",local:"auraflowtransformer2dmodel",headingTag:"h1"}}),j=new ge({props:{title:"AuraFlowTransformer2DModel",local:"diffusers.AuraFlowTransformer2DModel",headingTag:"h2"}}),P=new Z({props:{name:"class diffusers.AuraFlowTransformer2DModel",anchor:"diffusers.AuraFlowTransformer2DModel",parameters:[{name:"sample_size",val:": int = 64"},{name:"patch_size",val:": int = 2"},{name:"in_channels",val:": int = 4"},{name:"num_mmdit_layers",val:": int = 4"},{name:"num_single_dit_layers",val:": int = 32"},{name:"attention_head_dim",val:": int = 256"},{name:"num_attention_heads",val:": int = 12"},{name:"joint_attention_dim",val:": int = 2048"},{name:"caption_projection_dim",val:": int = 3072"},{name:"out_channels",val:": int = 4"},{name:"pos_embed_max_size",val:": int = 1024"}],parametersDescription:[{anchor:"diffusers.AuraFlowTransformer2DModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>) &#x2014; The width of the latent images. This is fixed during training since
it is used to learn a number of position embeddings.`,name:"sample_size"},{anchor:"diffusers.AuraFlowTransformer2DModel.patch_size",description:"<strong>patch_size</strong> (<code>int</code>) &#x2014; Patch size to turn the input data into small patches.",name:"patch_size"},{anchor:"diffusers.AuraFlowTransformer2DModel.in_channels",description:"<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>16</code>) &#x2014; The number of channels in the input.",name:"in_channels"},{anchor:"diffusers.AuraFlowTransformer2DModel.num_mmdit_layers",description:"<strong>num_mmdit_layers</strong> (<code>int</code>, <em>optional</em>, defaults to <code>4</code>) &#x2014; The number of layers of MMDiT Transformer blocks to use.",name:"num_mmdit_layers"},{anchor:"diffusers.AuraFlowTransformer2DModel.num_single_dit_layers",description:`<strong>num_single_dit_layers</strong> (<code>int</code>, <em>optional</em>, defaults to <code>4</code>) &#x2014;
The number of layers of Transformer blocks to use. These blocks use concatenated image and text
representations.`,name:"num_single_dit_layers"},{anchor:"diffusers.AuraFlowTransformer2DModel.attention_head_dim",description:"<strong>attention_head_dim</strong> (<code>int</code>, <em>optional</em>, defaults to <code>64</code>) &#x2014; The number of channels in each head.",name:"attention_head_dim"},{anchor:"diffusers.AuraFlowTransformer2DModel.num_attention_heads",description:"<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to <code>18</code>) &#x2014; The number of heads to use for multi-head attention.",name:"num_attention_heads"},{anchor:"diffusers.AuraFlowTransformer2DModel.joint_attention_dim",description:"<strong>joint_attention_dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The number of <code>encoder_hidden_states</code> dimensions to use.",name:"joint_attention_dim"},{anchor:"diffusers.AuraFlowTransformer2DModel.caption_projection_dim",description:"<strong>caption_projection_dim</strong> (<code>int</code>) &#x2014; Number of dimensions to use when projecting the <code>encoder_hidden_states</code>.",name:"caption_projection_dim"},{anchor:"diffusers.AuraFlowTransformer2DModel.out_channels",description:"<strong>out_channels</strong> (<code>int</code>, defaults to <code>16</code>) &#x2014; Number of output channels.",name:"out_channels"},{anchor:"diffusers.AuraFlowTransformer2DModel.pos_embed_max_size",description:"<strong>pos_embed_max_size</strong> (<code>int</code>, defaults to <code>4096</code>) &#x2014; Maximum positions to embed from the image latents.",name:"pos_embed_max_size"}],source:"https://github.com/huggingface/diffusers/blob/vr_9715/src/diffusers/models/transformers/auraflow_transformer_2d.py#L256"}}),z=new Z({props:{name:"fuse_qkv_projections",anchor:"diffusers.AuraFlowTransformer2DModel.fuse_qkv_projections",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_9715/src/diffusers/models/transformers/auraflow_transformer_2d.py#L407"}}),D=new he({props:{warning:!0,$$slots:{default:[Ae]},$$scope:{ctx:q}}}),k=new Z({props:{name:"set_attn_processor",anchor:"diffusers.AuraFlowTransformer2DModel.set_attn_processor",parameters:[{name:"processor",val:": Union"}],parametersDescription:[{anchor:"diffusers.AuraFlowTransformer2DModel.set_attn_processor.processor",description:`<strong>processor</strong> (Union[<code>dict</code>, <code>dict</code>AttentionProcessor&#x201C;]) &#x2014;
The instantiated processor class or a dictionary of processor classes to be set as the processor
for <strong>all</strong> <code>Attention</code> layers.</p>
<p>If <code>processor</code> is a dict, the key needs to define the path to the corresponding cross-attention processor.
This is strongly recommended when setting trainable attention processors.`,name:"processor"}],source:"https://github.com/huggingface/diffusers/blob/vr_9715/src/diffusers/models/transformers/auraflow_transformer_2d.py#L372"}}),E=new Z({props:{name:"unfuse_qkv_projections",anchor:"diffusers.AuraFlowTransformer2DModel.unfuse_qkv_projections",parameters:[],source:"https://github.com/huggingface/diffusers/blob/vr_9715/src/diffusers/models/transformers/auraflow_transformer_2d.py#L435"}}),M=new he({props:{warning:!0,$$slots:{default:[Me]},$$scope:{ctx:q}}}),L=new De({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/aura_flow_transformer2d.md"}}),{c(){t=d("meta"),_=a(),s=d("p"),T=a(),g(F.$$.fragment),O=a(),C=d("p"),C.innerHTML=me,R=a(),g(j.$$.fragment),B=a(),l=d("div"),g(P.$$.fragment),ee=a(),I=d("p"),I.innerHTML=fe,te=a(),u=d("div"),g(z.$$.fragment),oe=a(),H=d("p"),H.textContent=ce,ne=a(),V=d("p"),V.textContent=ue,re=a(),g(D.$$.fragment),se=a(),A=d("div"),g(k.$$.fragment),ae=a(),S=d("p"),S.textContent=pe,ie=a(),h=d("div"),g(E.$$.fragment),le=a(),U=d("p"),U.textContent=_e,de=a(),g(M.$$.fragment),J=a(),g(L.$$.fragment),W=a(),G=d("p"),this.h()},l(e){const o=Te("svelte-u9bgzb",document.head);t=m(o,"META",{name:!0,content:!0}),o.forEach(n),_=i(e),s=m(e,"P",{}),N(s).forEach(n),T=i(e),$(F.$$.fragment,e),O=i(e),C=m(e,"P",{"data-svelte-h":!0}),y(C)!=="svelte-1cl4wve"&&(C.innerHTML=me),R=i(e),$(j.$$.fragment,e),B=i(e),l=m(e,"DIV",{class:!0});var f=N(l);$(P.$$.fragment,f),ee=i(f),I=m(f,"P",{"data-svelte-h":!0}),y(I)!=="svelte-xp13t2"&&(I.innerHTML=fe),te=i(f),u=m(f,"DIV",{class:!0});var p=N(u);$(z.$$.fragment,p),oe=i(p),H=m(p,"P",{"data-svelte-h":!0}),y(H)!=="svelte-oj5ne1"&&(H.textContent=ce),ne=i(p),V=m(p,"P",{"data-svelte-h":!0}),y(V)!=="svelte-1sm9949"&&(V.textContent=ue),re=i(p),$(D.$$.fragment,p),p.forEach(n),se=i(f),A=m(f,"DIV",{class:!0});var Y=N(A);$(k.$$.fragment,Y),ae=i(Y),S=m(Y,"P",{"data-svelte-h":!0}),y(S)!=="svelte-1o77hl2"&&(S.textContent=pe),Y.forEach(n),ie=i(f),h=m(f,"DIV",{class:!0});var K=N(h);$(E.$$.fragment,K),le=i(K),U=m(K,"P",{"data-svelte-h":!0}),y(U)!=="svelte-1vhtc74"&&(U.textContent=_e),de=i(K),$(M.$$.fragment,K),K.forEach(n),f.forEach(n),J=i(e),$(L.$$.fragment,e),W=i(e),G=m(e,"P",{}),N(G).forEach(n),this.h()},h(){Q(t,"name","hf:doc:metadata"),Q(t,"content",Fe),Q(u,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Q(l,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,o){r(document.head,t),c(e,_,o),c(e,s,o),c(e,T,o),b(F,e,o),c(e,O,o),c(e,C,o),c(e,R,o),b(j,e,o),c(e,B,o),c(e,l,o),b(P,l,null),r(l,ee),r(l,I),r(l,te),r(l,u),b(z,u,null),r(u,oe),r(u,H),r(u,ne),r(u,V),r(u,re),b(D,u,null),r(l,se),r(l,A),b(k,A,null),r(A,ae),r(A,S),r(l,ie),r(l,h),b(E,h,null),r(h,le),r(h,U),r(h,de),b(M,h,null),c(e,J,o),b(L,e,o),c(e,W,o),c(e,G,o),X=!0},p(e,[o]){const f={};o&2&&(f.$$scope={dirty:o,ctx:e}),D.$set(f);const p={};o&2&&(p.$$scope={dirty:o,ctx:e}),M.$set(p)},i(e){X||(v(F.$$.fragment,e),v(j.$$.fragment,e),v(P.$$.fragment,e),v(z.$$.fragment,e),v(D.$$.fragment,e),v(k.$$.fragment,e),v(E.$$.fragment,e),v(M.$$.fragment,e),v(L.$$.fragment,e),X=!0)},o(e){w(F.$$.fragment,e),w(j.$$.fragment,e),w(P.$$.fragment,e),w(z.$$.fragment,e),w(D.$$.fragment,e),w(k.$$.fragment,e),w(E.$$.fragment,e),w(M.$$.fragment,e),w(L.$$.fragment,e),X=!1},d(e){e&&(n(_),n(s),n(T),n(O),n(C),n(R),n(B),n(l),n(J),n(W),n(G)),n(t),x(F,e),x(j,e),x(P),x(z),x(D),x(k),x(E),x(M),x(L,e)}}}const Fe='{"title":"AuraFlowTransformer2DModel","local":"auraflowtransformer2dmodel","sections":[{"title":"AuraFlowTransformer2DModel","local":"diffusers.AuraFlowTransformer2DModel","sections":[],"depth":2}],"depth":1}';function Ce(q){return ve(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Le extends we{constructor(t){super(),xe(this,t,Ce,ye,be,{})}}export{Le as component};

Xet Storage Details

Size:
10.5 kB
·
Xet hash:
c8ca679d82a6933761e68661c439301e9250985ca85479193bd1afc149138548

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