Buckets:
| 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.cac5d66a.js";import{C as fe}from"../chunks/CopyLLMTxtMenu.4912207d.js";import{D as re}from"../chunks/Docstring.1e7ac4f3.js";import{C as ce}from"../chunks/CodeBlock.606cbaf4.js";import{H as F,E as ue}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.323ee77a.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,v,H,y,W,i,M,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,D,E,d,L,Q,X,ne='The output of <a href="/docs/diffusers/pr_13745/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a>.',P,x,j,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"}}),v=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">"Lightricks/LTX-Video"</span>, subfolder=<span class="hljs-string">"transformer"</span>, torch_dtype=torch.bfloat16).to(<span class="hljs-string">"cuda"</span>)`,lang:"python",wrap:!1}}),y=new F({props:{title:"LTXVideoTransformer3DModel",local:"diffusers.LTXVideoTransformer3DModel",headingTag:"h2"}}),M=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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>"gelu-approximate"</code>) — | |
| 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>"rms_norm_across_heads"</code>) — | |
| The normalization layer to use.`,name:"qk_norm"}],source:"https://github.com/huggingface/diffusers/blob/vr_13745/src/diffusers/models/transformers/transformer_ltx.py#L385"}}),D=new F({props:{title:"Transformer2DModelOutput",local:"diffusers.models.modeling_outputs.Transformer2DModelOutput",headingTag:"h2"}}),L=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/pr_13745/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a> is discrete) — | |
| 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/vr_13745/src/diffusers/models/modeling_outputs.py#L21"}}),x=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(v.$$.fragment),H=r(),f(y.$$.fragment),W=r(),i=l("div"),f(M.$$.fragment),A=r(),V=l("p"),V.innerHTML=oe,G=r(),f(D.$$.fragment),E=r(),d=l("div"),f(L.$$.fragment),Q=r(),X=l("p"),X.innerHTML=ne,P=r(),f(x.$$.fragment),j=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(v.$$.fragment,e),H=s(e),c(y.$$.fragment,e),W=s(e),i=m(e,"DIV",{class:!0});var O=B(i);c(M.$$.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(D.$$.fragment,e),E=s(e),d=m(e,"DIV",{class:!0});var Y=B(d);c(L.$$.fragment,Y),Q=s(Y),X=m(Y,"P",{"data-svelte-h":!0}),N(X)!=="svelte-clyat2"&&(X.innerHTML=ne),Y.forEach(o),P=s(e),c(x.$$.fragment,e),j=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(v,e,t),n(e,H,t),u(y,e,t),n(e,W,t),n(e,i,t),u(M,i,null),z(i,A),z(i,V),n(e,G,t),u(D,e,t),n(e,E,t),n(e,d,t),u(L,d,null),z(d,Q),z(d,X),n(e,P,t),u(x,e,t),n(e,j,t),n(e,k,t),I=!0},p:ae,i(e){I||(p(T.$$.fragment,e),p(g.$$.fragment,e),p(v.$$.fragment,e),p(y.$$.fragment,e),p(M.$$.fragment,e),p(D.$$.fragment,e),p(L.$$.fragment,e),p(x.$$.fragment,e),I=!0)},o(e){h(T.$$.fragment,e),h(g.$$.fragment,e),h(v.$$.fragment,e),h(y.$$.fragment,e),h(M.$$.fragment,e),h(D.$$.fragment,e),h(L.$$.fragment,e),h(x.$$.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(E),o(d),o(P),o(j),o(k)),o(a),_(T,e),_(g,e),_(v,e),_(y,e),_(M),_(D,e),_(L),_(x,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 Me extends de{constructor(a){super(),le(this,a,_e,pe,se,{})}}export{Me as component}; | |
Xet Storage Details
- Size:
- 9.51 kB
- Xet hash:
- b5e1596d5aef7bc5cab983d0645e836b95b5a80c0fe4b455a16e2baa2837ae30
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.