import{s as R,n as J,o as K}from"../chunks/scheduler.8c3d61f6.js";import{S as Q,i as X,g as h,s,r as $,A as Y,h as _,f as n,c as i,j as q,u as T,x as j,k as A,y as w,a,v as L,d as D,t as M,w as y}from"../chunks/index.da70eac4.js";import{D as B}from"../chunks/Docstring.dcbc19b1.js";import{H as G,E as Z}from"../chunks/getInferenceSnippets.86beaec3.js";function ee(U){let o,x,b,O,m,N,l,V='A Diffusion Transformer model for 3D data from <a href="https://github.com/Vchitect/Latte" rel="nofollow">Latte</a>.',k,c,E,r,f,F,d,p,S,g,W='The <a href="/docs/diffusers/main/en/api/models/latte_transformer3d#diffusers.LatteTransformer3DModel">LatteTransformer3DModel</a> forward method.',P,u,C,v,H;return m=new G({props:{title:"LatteTransformer3DModel",local:"lattetransformer3dmodel",headingTag:"h2"}}),c=new G({props:{title:"LatteTransformer3DModel",local:"diffusers.LatteTransformer3DModel",headingTag:"h2"}}),f=new B({props:{name:"class diffusers.LatteTransformer3DModel",anchor:"diffusers.LatteTransformer3DModel",parameters:[{name:"num_attention_heads",val:": int = 16"},{name:"attention_head_dim",val:": int = 88"},{name:"in_channels",val:": typing.Optional[int] = None"},{name:"out_channels",val:": typing.Optional[int] = None"},{name:"num_layers",val:": int = 1"},{name:"dropout",val:": float = 0.0"},{name:"cross_attention_dim",val:": typing.Optional[int] = None"},{name:"attention_bias",val:": bool = False"},{name:"sample_size",val:": int = 64"},{name:"patch_size",val:": typing.Optional[int] = None"},{name:"activation_fn",val:": str = 'geglu'"},{name:"num_embeds_ada_norm",val:": typing.Optional[int] = None"},{name:"norm_type",val:": str = 'layer_norm'"},{name:"norm_elementwise_affine",val:": bool = True"},{name:"norm_eps",val:": float = 1e-05"},{name:"caption_channels",val:": int = None"},{name:"video_length",val:": int = 16"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/latte_transformer_3d.py#L29"}}),p=new B({props:{name:"forward",anchor:"diffusers.LatteTransformer3DModel.forward",parameters:[{name:"hidden_states",val:": Tensor"},{name:"timestep",val:": typing.Optional[torch.LongTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"enable_temporal_attentions",val:": bool = True"},{name:"return_dict",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.LatteTransformer3DModel.forward.hidden_states",description:`<strong>hidden_states</strong> shape <code>(batch size, channel, num_frame, height, width)</code> &#x2014;
Input <code>hidden_states</code>.`,name:"hidden_states"},{anchor:"diffusers.LatteTransformer3DModel.forward.timestep",description:`<strong>timestep</strong> ( <code>torch.LongTensor</code>, <em>optional</em>) &#x2014;
Used to indicate denoising step. Optional timestep to be applied as an embedding in <code>AdaLayerNorm</code>.`,name:"timestep"},{anchor:"diffusers.LatteTransformer3DModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> ( <code>torch.FloatTensor</code> of shape <code>(batch size, sequence len, embed dims)</code>, <em>optional</em>) &#x2014;
Conditional embeddings for cross attention layer. If not given, cross-attention defaults to
self-attention.`,name:"encoder_hidden_states"},{anchor:"diffusers.LatteTransformer3DModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> ( <code>torch.Tensor</code>, <em>optional</em>) &#x2014;
Cross-attention mask applied to <code>encoder_hidden_states</code>. Two formats supported:</p>
<ul>
<li>Mask <code>(batcheight, sequence_length)</code> True = keep, False = discard.</li>
<li>Bias <code>(batcheight, 1, sequence_length)</code> 0 = keep, -10000 = discard.</li>
</ul>
<p>If <code>ndim == 2</code>: will be interpreted as a mask, then converted into a bias consistent with the format
above. This bias will be added to the cross-attention scores.`,name:"encoder_attention_mask"},{anchor:"diffusers.LatteTransformer3DModel.forward.enable_temporal_attentions",description:`<strong>enable_temporal_attentions</strong> &#x2014;
(<code>bool</code>, <em>optional</em>, defaults to <code>True</code>): Whether to enable temporal attentions.`,name:"enable_temporal_attentions"},{anchor:"diffusers.LatteTransformer3DModel.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>~models.unet_2d_condition.UNet2DConditionOutput</code> instead of a plain
tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/latte_transformer_3d.py#L168",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>If <code>return_dict</code> is True, an <code>~models.transformer_2d.Transformer2DModelOutput</code> is returned, otherwise a
<code>tuple</code> where the first element is the sample tensor.</p>
`}}),u=new Z({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/latte_transformer3d.md"}}),{c(){o=h("meta"),x=s(),b=h("p"),O=s(),$(m.$$.fragment),N=s(),l=h("p"),l.innerHTML=V,k=s(),$(c.$$.fragment),E=s(),r=h("div"),$(f.$$.fragment),F=s(),d=h("div"),$(p.$$.fragment),S=s(),g=h("p"),g.innerHTML=W,P=s(),$(u.$$.fragment),C=s(),v=h("p"),this.h()},l(e){const t=Y("svelte-u9bgzb",document.head);o=_(t,"META",{name:!0,content:!0}),t.forEach(n),x=i(e),b=_(e,"P",{}),q(b).forEach(n),O=i(e),T(m.$$.fragment,e),N=i(e),l=_(e,"P",{"data-svelte-h":!0}),j(l)!=="svelte-1tn47os"&&(l.innerHTML=V),k=i(e),T(c.$$.fragment,e),E=i(e),r=_(e,"DIV",{class:!0});var I=q(r);T(f.$$.fragment,I),F=i(I),d=_(I,"DIV",{class:!0});var z=q(d);T(p.$$.fragment,z),S=i(z),g=_(z,"P",{"data-svelte-h":!0}),j(g)!=="svelte-1ah99n4"&&(g.innerHTML=W),z.forEach(n),I.forEach(n),P=i(e),T(u.$$.fragment,e),C=i(e),v=_(e,"P",{}),q(v).forEach(n),this.h()},h(){A(o,"name","hf:doc:metadata"),A(o,"content",te),A(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),A(r,"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,t){w(document.head,o),a(e,x,t),a(e,b,t),a(e,O,t),L(m,e,t),a(e,N,t),a(e,l,t),a(e,k,t),L(c,e,t),a(e,E,t),a(e,r,t),L(f,r,null),w(r,F),w(r,d),L(p,d,null),w(d,S),w(d,g),a(e,P,t),L(u,e,t),a(e,C,t),a(e,v,t),H=!0},p:J,i(e){H||(D(m.$$.fragment,e),D(c.$$.fragment,e),D(f.$$.fragment,e),D(p.$$.fragment,e),D(u.$$.fragment,e),H=!0)},o(e){M(m.$$.fragment,e),M(c.$$.fragment,e),M(f.$$.fragment,e),M(p.$$.fragment,e),M(u.$$.fragment,e),H=!1},d(e){e&&(n(x),n(b),n(O),n(N),n(l),n(k),n(E),n(r),n(P),n(C),n(v)),n(o),y(m,e),y(c,e),y(f),y(p),y(u,e)}}}const te='{"title":"LatteTransformer3DModel","local":"lattetransformer3dmodel","sections":[],"depth":2}';function ne(U){return K(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ie extends Q{constructor(o){super(),X(this,o,ne,ee,R,{})}}export{ie as component};
