import{s as se,n as ae,o as ie}from"../chunks/scheduler.53228c21.js";import{S as de,i as le,e as l,s as r,c as f,h as me,a as m,d as o,b as s,f as B,g as c,j as N,k as S,l as z,m as n,n as u,t as p,o as h,p as _}from"../chunks/index.100fac89.js";import{C as fe}from"../chunks/CopyLLMTxtMenu.4f0519ef.js";import{D as re}from"../chunks/Docstring.d02a9fa5.js";import{C as ce}from"../chunks/CodeBlock.d30a6509.js";import{H as F,E as ue}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.62dbb7c4.js";function pe(K){let a,C,w,R,T,q,g,Z,$,ee='A Diffusion Transformer model for 3D data from <a href="https://huggingface.co/Lightricks/LTX-Video" rel="nofollow">LTX</a> was introduced by Lightricks.',J,b,te="The model can be loaded with the following code snippet.",U,M,H,v,W,i,y,A,V,oe='A Transformer model for video-like data used in <a href="https://huggingface.co/Lightricks/LTX-Video" rel="nofollow">LTX</a>.',G,x,j,d,D,Q,X,ne='The output of <a href="/docs/diffusers/main/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a>.',E,L,P,k,I;return T=new fe({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),g=new F({props:{title:"LTXVideoTransformer3DModel",local:"ltxvideotransformer3dmodel",headingTag:"h1"}}),M=new ce({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMExUWFZpZGVvVHJhbnNmb3JtZXIzRE1vZGVsJTBBJTBBdHJhbnNmb3JtZXIlMjAlM0QlMjBMVFhWaWRlb1RyYW5zZm9ybWVyM0RNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyTGlnaHRyaWNrcyUyRkxUWC1WaWRlbyUyMiUyQyUyMHN1YmZvbGRlciUzRCUyMnRyYW5zZm9ybWVyJTIyJTJDJTIwdG9yY2hfZHR5cGUlM0R0b3JjaC5iZmxvYXQxNikudG8oJTIyY3VkYSUyMik=",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> LTXVideoTransformer3DModel

transformer = LTXVideoTransformer3DModel.from_pretrained(<span class="hljs-string">&quot;Lightricks/LTX-Video&quot;</span>, subfolder=<span class="hljs-string">&quot;transformer&quot;</span>, torch_dtype=torch.bfloat16).to(<span class="hljs-string">&quot;cuda&quot;</span>)`,wrap:!1}}),v=new F({props:{title:"LTXVideoTransformer3DModel",local:"diffusers.LTXVideoTransformer3DModel",headingTag:"h2"}}),y=new re({props:{name:"class diffusers.LTXVideoTransformer3DModel",anchor:"diffusers.LTXVideoTransformer3DModel",parameters:[{name:"in_channels",val:": int = 128"},{name:"out_channels",val:": int = 128"},{name:"patch_size",val:": int = 1"},{name:"patch_size_t",val:": int = 1"},{name:"num_attention_heads",val:": int = 32"},{name:"attention_head_dim",val:": int = 64"},{name:"cross_attention_dim",val:": int = 2048"},{name:"num_layers",val:": int = 28"},{name:"activation_fn",val:": str = 'gelu-approximate'"},{name:"qk_norm",val:": str = 'rms_norm_across_heads'"},{name:"norm_elementwise_affine",val:": bool = False"},{name:"norm_eps",val:": float = 1e-06"},{name:"caption_channels",val:": int = 4096"},{name:"attention_bias",val:": bool = True"},{name:"attention_out_bias",val:": bool = True"}],parametersDescription:[{anchor:"diffusers.LTXVideoTransformer3DModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, defaults to <code>128</code>) &#x2014;
The number of channels in the input.`,name:"in_channels"},{anchor:"diffusers.LTXVideoTransformer3DModel.out_channels",description:`<strong>out_channels</strong> (<code>int</code>, defaults to <code>128</code>) &#x2014;
The number of channels in the output.`,name:"out_channels"},{anchor:"diffusers.LTXVideoTransformer3DModel.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, defaults to <code>1</code>) &#x2014;
The size of the spatial patches to use in the patch embedding layer.`,name:"patch_size"},{anchor:"diffusers.LTXVideoTransformer3DModel.patch_size_t",description:`<strong>patch_size_t</strong> (<code>int</code>, defaults to <code>1</code>) &#x2014;
The size of the tmeporal patches to use in the patch embedding layer.`,name:"patch_size_t"},{anchor:"diffusers.LTXVideoTransformer3DModel.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, defaults to <code>32</code>) &#x2014;
The number of heads to use for multi-head attention.`,name:"num_attention_heads"},{anchor:"diffusers.LTXVideoTransformer3DModel.attention_head_dim",description:`<strong>attention_head_dim</strong> (<code>int</code>, defaults to <code>64</code>) &#x2014;
The number of channels in each head.`,name:"attention_head_dim"},{anchor:"diffusers.LTXVideoTransformer3DModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, defaults to <code>2048 </code>) &#x2014;
The number of channels for cross attention heads.`,name:"cross_attention_dim"},{anchor:"diffusers.LTXVideoTransformer3DModel.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, defaults to <code>28</code>) &#x2014;
The number of layers of Transformer blocks to use.`,name:"num_layers"},{anchor:"diffusers.LTXVideoTransformer3DModel.activation_fn",description:`<strong>activation_fn</strong> (<code>str</code>, defaults to <code>&quot;gelu-approximate&quot;</code>) &#x2014;
Activation function to use in feed-forward.`,name:"activation_fn"},{anchor:"diffusers.LTXVideoTransformer3DModel.qk_norm",description:`<strong>qk_norm</strong> (<code>str</code>, defaults to <code>&quot;rms_norm_across_heads&quot;</code>) &#x2014;
The normalization layer to use.`,name:"qk_norm"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/transformer_ltx.py#L383"}}),x=new F({props:{title:"Transformer2DModelOutput",local:"diffusers.models.modeling_outputs.Transformer2DModelOutput",headingTag:"h2"}}),D=new re({props:{name:"class diffusers.models.modeling_outputs.Transformer2DModelOutput",anchor:"diffusers.models.modeling_outputs.Transformer2DModelOutput",parameters:[{name:"sample",val:": torch.Tensor"}],parametersDescription:[{anchor:"diffusers.models.modeling_outputs.Transformer2DModelOutput.sample",description:`<strong>sample</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, height, width)</code> or <code>(batch size, num_vector_embeds - 1, num_latent_pixels)</code> if <a href="/docs/diffusers/main/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a> is discrete) &#x2014;
The hidden states output conditioned on the <code>encoder_hidden_states</code> input. If discrete, returns probability
distributions for the unnoised latent pixels.`,name:"sample"}],source:"https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/modeling_outputs.py#L21"}}),L=new ue({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/ltx_video_transformer3d.md"}}),{c(){a=l("meta"),C=r(),w=l("p"),R=r(),f(T.$$.fragment),q=r(),f(g.$$.fragment),Z=r(),$=l("p"),$.innerHTML=ee,J=r(),b=l("p"),b.textContent=te,U=r(),f(M.$$.fragment),H=r(),f(v.$$.fragment),W=r(),i=l("div"),f(y.$$.fragment),A=r(),V=l("p"),V.innerHTML=oe,G=r(),f(x.$$.fragment),j=r(),d=l("div"),f(D.$$.fragment),Q=r(),X=l("p"),X.innerHTML=ne,E=r(),f(L.$$.fragment),P=r(),k=l("p"),this.h()},l(e){const t=me("svelte-u9bgzb",document.head);a=m(t,"META",{name:!0,content:!0}),t.forEach(o),C=s(e),w=m(e,"P",{}),B(w).forEach(o),R=s(e),c(T.$$.fragment,e),q=s(e),c(g.$$.fragment,e),Z=s(e),$=m(e,"P",{"data-svelte-h":!0}),N($)!=="svelte-7itmwr"&&($.innerHTML=ee),J=s(e),b=m(e,"P",{"data-svelte-h":!0}),N(b)!=="svelte-1vuni30"&&(b.textContent=te),U=s(e),c(M.$$.fragment,e),H=s(e),c(v.$$.fragment,e),W=s(e),i=m(e,"DIV",{class:!0});var O=B(i);c(y.$$.fragment,O),A=s(O),V=m(O,"P",{"data-svelte-h":!0}),N(V)!=="svelte-6rnpr5"&&(V.innerHTML=oe),O.forEach(o),G=s(e),c(x.$$.fragment,e),j=s(e),d=m(e,"DIV",{class:!0});var Y=B(d);c(D.$$.fragment,Y),Q=s(Y),X=m(Y,"P",{"data-svelte-h":!0}),N(X)!=="svelte-1x8c0js"&&(X.innerHTML=ne),Y.forEach(o),E=s(e),c(L.$$.fragment,e),P=s(e),k=m(e,"P",{}),B(k).forEach(o),this.h()},h(){S(a,"name","hf:doc:metadata"),S(a,"content",he),S(i,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),S(d,"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){z(document.head,a),n(e,C,t),n(e,w,t),n(e,R,t),u(T,e,t),n(e,q,t),u(g,e,t),n(e,Z,t),n(e,$,t),n(e,J,t),n(e,b,t),n(e,U,t),u(M,e,t),n(e,H,t),u(v,e,t),n(e,W,t),n(e,i,t),u(y,i,null),z(i,A),z(i,V),n(e,G,t),u(x,e,t),n(e,j,t),n(e,d,t),u(D,d,null),z(d,Q),z(d,X),n(e,E,t),u(L,e,t),n(e,P,t),n(e,k,t),I=!0},p:ae,i(e){I||(p(T.$$.fragment,e),p(g.$$.fragment,e),p(M.$$.fragment,e),p(v.$$.fragment,e),p(y.$$.fragment,e),p(x.$$.fragment,e),p(D.$$.fragment,e),p(L.$$.fragment,e),I=!0)},o(e){h(T.$$.fragment,e),h(g.$$.fragment,e),h(M.$$.fragment,e),h(v.$$.fragment,e),h(y.$$.fragment,e),h(x.$$.fragment,e),h(D.$$.fragment,e),h(L.$$.fragment,e),I=!1},d(e){e&&(o(C),o(w),o(R),o(q),o(Z),o($),o(J),o(b),o(U),o(H),o(W),o(i),o(G),o(j),o(d),o(E),o(P),o(k)),o(a),_(T,e),_(g,e),_(M,e),_(v,e),_(y),_(x,e),_(D),_(L,e)}}}const he='{"title":"LTXVideoTransformer3DModel","local":"ltxvideotransformer3dmodel","sections":[{"title":"LTXVideoTransformer3DModel","local":"diffusers.LTXVideoTransformer3DModel","sections":[],"depth":2},{"title":"Transformer2DModelOutput","local":"diffusers.models.modeling_outputs.Transformer2DModelOutput","sections":[],"depth":2}],"depth":1}';function _e(K){return ie(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ye extends de{constructor(a){super(),le(this,a,_e,pe,se,{})}}export{ye as component};
