import{s as ee,n as te,o as re}from"../chunks/scheduler.8c3d61f6.js";import{S as ae,i as se,g as m,s,r as b,A as ne,h as i,f as r,c as n,j as z,u as M,x as U,k as B,y as S,a,v as T,d as y,t as D,w}from"../chunks/index.da70eac4.js";import{D as Y}from"../chunks/Docstring.6b390b9a.js";import{C as oe}from"../chunks/CodeBlock.00a903b3.js";import{H as W,E as le}from"../chunks/EditOnGithub.1e64e623.js";function me(F){let o,Z,J,E,f,j,d,N='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.',H,p,X="The model can be loaded with the following code snippet.",k,u,C,c,G,h,g,I,_,L,l,$,R,x,K='The output of <a href="/docs/diffusers/pr_10001/en/api/models/transformer2d#diffusers.Transformer2DModel">Transformer2DModel</a>.',O,v,P,A,V;return f=new W({props:{title:"AllegroTransformer3DModel",local:"allegrotransformer3dmodel",headingTag:"h1"}}),u=new oe({props:{code:"ZnJvbSUyMGRpZmZ1c2VycyUyMGltcG9ydCUyMEFsbGVncm9UcmFuc2Zvcm1lcjNETW9kZWwlMEElMEF2YWUlMjAlM0QlMjBBbGxlZ3JvVHJhbnNmb3JtZXIzRE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJyaHltZXMtYWklMkZBbGxlZ3JvJTIyJTJDJTIwc3ViZm9sZGVyJTNEJTIydHJhbnNmb3JtZXIlMjIlMkMlMjB0b3JjaF9kdHlwZSUzRHRvcmNoLmJmbG9hdDE2KS50byglMjJjdWRhJTIyKQ==",highlighted:`<span class="hljs-keyword">from</span> diffusers <span class="hljs-keyword">import</span> AllegroTransformer3DModel

vae = 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 W({props:{title:"AllegroTransformer3DModel",local:"diffusers.AllegroTransformer3DModel",headingTag:"h2"}}),g=new Y({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_10001/src/diffusers/models/transformers/transformer_allegro.py#L175"}}),_=new W({props:{title:"Transformer2DModelOutput",local:"diffusers.models.modeling_outputs.Transformer2DModelOutput",headingTag:"h2"}}),$=new Y({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_10001/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_10001/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"),Z=s(),J=m("p"),E=s(),b(f.$$.fragment),j=s(),d=m("p"),d.innerHTML=N,H=s(),p=m("p"),p.textContent=X,k=s(),b(u.$$.fragment),C=s(),b(c.$$.fragment),G=s(),h=m("div"),b(g.$$.fragment),I=s(),b(_.$$.fragment),L=s(),l=m("div"),b($.$$.fragment),R=s(),x=m("p"),x.innerHTML=K,O=s(),b(v.$$.fragment),P=s(),A=m("p"),this.h()},l(e){const t=ne("svelte-u9bgzb",document.head);o=i(t,"META",{name:!0,content:!0}),t.forEach(r),Z=n(e),J=i(e,"P",{}),z(J).forEach(r),E=n(e),M(f.$$.fragment,e),j=n(e),d=i(e,"P",{"data-svelte-h":!0}),U(d)!=="svelte-x6xll5"&&(d.innerHTML=N),H=n(e),p=i(e,"P",{"data-svelte-h":!0}),U(p)!=="svelte-1vuni30"&&(p.textContent=X),k=n(e),M(u.$$.fragment,e),C=n(e),M(c.$$.fragment,e),G=n(e),h=i(e,"DIV",{class:!0});var Q=z(h);M(g.$$.fragment,Q),Q.forEach(r),I=n(e),M(_.$$.fragment,e),L=n(e),l=i(e,"DIV",{class:!0});var q=z(l);M($.$$.fragment,q),R=n(q),x=i(q,"P",{"data-svelte-h":!0}),U(x)!=="svelte-b926kg"&&(x.innerHTML=K),q.forEach(r),O=n(e),M(v.$$.fragment,e),P=n(e),A=i(e,"P",{}),z(A).forEach(r),this.h()},h(){B(o,"name","hf:doc:metadata"),B(o,"content",ie),B(h,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),B(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){S(document.head,o),a(e,Z,t),a(e,J,t),a(e,E,t),T(f,e,t),a(e,j,t),a(e,d,t),a(e,H,t),a(e,p,t),a(e,k,t),T(u,e,t),a(e,C,t),T(c,e,t),a(e,G,t),a(e,h,t),T(g,h,null),a(e,I,t),T(_,e,t),a(e,L,t),a(e,l,t),T($,l,null),S(l,R),S(l,x),a(e,O,t),T(v,e,t),a(e,P,t),a(e,A,t),V=!0},p:te,i(e){V||(y(f.$$.fragment,e),y(u.$$.fragment,e),y(c.$$.fragment,e),y(g.$$.fragment,e),y(_.$$.fragment,e),y($.$$.fragment,e),y(v.$$.fragment,e),V=!0)},o(e){D(f.$$.fragment,e),D(u.$$.fragment,e),D(c.$$.fragment,e),D(g.$$.fragment,e),D(_.$$.fragment,e),D($.$$.fragment,e),D(v.$$.fragment,e),V=!1},d(e){e&&(r(Z),r(J),r(E),r(j),r(d),r(H),r(p),r(k),r(C),r(G),r(h),r(I),r(L),r(l),r(O),r(P),r(A)),r(o),w(f,e),w(u,e),w(c,e),w(g),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(F){return re(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ge extends ae{constructor(o){super(),se(this,o,fe,me,ee,{})}}export{ge as component};
