import{s as ee,n as te,o as re}from"../chunks/scheduler.8c3d61f6.js";import{S as se,i as ae,g as m,s as a,r as M,A as ne,h as i,f as r,c as n,j as z,u as b,x as J,k as H,y as W,a as s,v as T,d as y,t as D,w}from"../chunks/index.da70eac4.js";import{D as Q}from"../chunks/Docstring.6b390b9a.js";import{C as oe}from"../chunks/CodeBlock.00a903b3.js";import{H as B,E as le}from"../chunks/EditOnGithub.1e64e623.js";function me(N){let o,U,A,C,f,Z,d,S='A Diffusion Transformer model for 3D data from <a href="https://github.com/rhymes-ai/Allegro" rel="nofollow">Allegro</a> was introduced in <a href="https://huggingface.co/papers/2410.15458" rel="nofollow">Allegro: Open the Black Box of Commercial-Level Video Generation Model</a> by RhymesAI.',j,p,X="The model can be loaded with the following code snippet.",k,u,F,c,G,g,h,V,_,L,l,$,I,x,Y='The output of <a href="/docs/diffusers/pr_10037/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a>.',O,v,P,E,q;return f=new B({props:{title:"AllegroTransformer3DModel",local:"allegrotransformer3dmodel",headingTag:"h1"}}),u=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEFsbGVncm9UcmFuc2Zvcm1lcjNETW9kZWwlMEElMEF0cmFuc2Zvcm1lciUyMCUzRCUyMEFsbGVncm9UcmFuc2Zvcm1lcjNETW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnJoeW1lcy1haSUyRkFsbGVncm8lMjIlMkMlMjBzdWJmb2xkZXIlM0QlMjJ0cmFuc2Zvcm1lciUyMiUyQyUyMHRvcmNoX2R0eXBlJTNEdG9yY2guYmZsb2F0MTYpLnRvKCUyMmN1ZGElMjIp",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AllegroTransformer3DModel

transformer = AllegroTransformer3DModel.from_pretrained(<span class="hljs-string">&quot;rhymes-ai/Allegro&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}}),c=new B({props:{title:"AllegroTransformer3DModel",local:"diffusers.AllegroTransformer3DModel",headingTag:"h2"}}),h=new Q({props:{name:"class diffusers.AllegroTransformer3DModel",anchor:"diffusers.AllegroTransformer3DModel",parameters:[{name:"patch_size",val:": int = 2"},{name:"patch_size_t",val:": int = 1"},{name:"num_attention_heads",val:": int = 24"},{name:"attention_head_dim",val:": int = 96"},{name:"in_channels",val:": int = 4"},{name:"out_channels",val:": int = 4"},{name:"num_layers",val:": int = 32"},{name:"dropout",val:": float = 0.0"},{name:"cross_attention_dim",val:": int = 2304"},{name:"attention_bias",val:": bool = True"},{name:"sample_height",val:": int = 90"},{name:"sample_width",val:": int = 160"},{name:"sample_frames",val:": int = 22"},{name:"activation_fn",val:": str = 'gelu-approximate'"},{name:"norm_elementwise_affine",val:": bool = False"},{name:"norm_eps",val:": float = 1e-06"},{name:"caption_channels",val:": int = 4096"},{name:"interpolation_scale_h",val:": float = 2.0"},{name:"interpolation_scale_w",val:": float = 2.0"},{name:"interpolation_scale_t",val:": float = 2.2"}],source:"https://github.com/huggingface/diffusers/blob/vr_10037/src/diffusers/models/transformers/transformer_allegro.py#L175"}}),_=new B({props:{title:"Transformer2DModelOutput",local:"diffusers.models.modeling_outputs.Transformer2DModelOutput",headingTag:"h2"}}),$=new Q({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_10037/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/vr_10037/src/diffusers/models/modeling_outputs.py#L20"}}),v=new le({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/allegro_transformer3d.md"}}),{c(){o=m("meta"),U=a(),A=m("p"),C=a(),M(f.$$.fragment),Z=a(),d=m("p"),d.innerHTML=S,j=a(),p=m("p"),p.textContent=X,k=a(),M(u.$$.fragment),F=a(),M(c.$$.fragment),G=a(),g=m("div"),M(h.$$.fragment),V=a(),M(_.$$.fragment),L=a(),l=m("div"),M($.$$.fragment),I=a(),x=m("p"),x.innerHTML=Y,O=a(),M(v.$$.fragment),P=a(),E=m("p"),this.h()},l(e){const t=ne("svelte-u9bgzb",document.head);o=i(t,"META",{name:!0,content:!0}),t.forEach(r),U=n(e),A=i(e,"P",{}),z(A).forEach(r),C=n(e),b(f.$$.fragment,e),Z=n(e),d=i(e,"P",{"data-svelte-h":!0}),J(d)!=="svelte-x6xll5"&&(d.innerHTML=S),j=n(e),p=i(e,"P",{"data-svelte-h":!0}),J(p)!=="svelte-1vuni30"&&(p.textContent=X),k=n(e),b(u.$$.fragment,e),F=n(e),b(c.$$.fragment,e),G=n(e),g=i(e,"DIV",{class:!0});var K=z(g);b(h.$$.fragment,K),K.forEach(r),V=n(e),b(_.$$.fragment,e),L=n(e),l=i(e,"DIV",{class:!0});var R=z(l);b($.$$.fragment,R),I=n(R),x=i(R,"P",{"data-svelte-h":!0}),J(x)!=="svelte-1netq91"&&(x.innerHTML=Y),R.forEach(r),O=n(e),b(v.$$.fragment,e),P=n(e),E=i(e,"P",{}),z(E).forEach(r),this.h()},h(){H(o,"name","hf:doc:metadata"),H(o,"content",ie),H(g,"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")},m(e,t){W(document.head,o),s(e,U,t),s(e,A,t),s(e,C,t),T(f,e,t),s(e,Z,t),s(e,d,t),s(e,j,t),s(e,p,t),s(e,k,t),T(u,e,t),s(e,F,t),T(c,e,t),s(e,G,t),s(e,g,t),T(h,g,null),s(e,V,t),T(_,e,t),s(e,L,t),s(e,l,t),T($,l,null),W(l,I),W(l,x),s(e,O,t),T(v,e,t),s(e,P,t),s(e,E,t),q=!0},p:te,i(e){q||(y(f.$$.fragment,e),y(u.$$.fragment,e),y(c.$$.fragment,e),y(h.$$.fragment,e),y(_.$$.fragment,e),y($.$$.fragment,e),y(v.$$.fragment,e),q=!0)},o(e){D(f.$$.fragment,e),D(u.$$.fragment,e),D(c.$$.fragment,e),D(h.$$.fragment,e),D(_.$$.fragment,e),D($.$$.fragment,e),D(v.$$.fragment,e),q=!1},d(e){e&&(r(U),r(A),r(C),r(Z),r(d),r(j),r(p),r(k),r(F),r(G),r(g),r(V),r(L),r(l),r(O),r(P),r(E)),r(o),w(f,e),w(u,e),w(c,e),w(h),w(_,e),w($),w(v,e)}}}const ie='{"title":"AllegroTransformer3DModel","local":"allegrotransformer3dmodel","sections":[{"title":"AllegroTransformer3DModel","local":"diffusers.AllegroTransformer3DModel","sections":[],"depth":2},{"title":"Transformer2DModelOutput","local":"diffusers.models.modeling_outputs.Transformer2DModelOutput","sections":[],"depth":2}],"depth":1}';function fe(N){return re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class he extends se{constructor(o){super(),ae(this,o,fe,me,ee,{})}}export{he as component};
