Buckets:
| import"../chunks/DsnmJJEf.js";import{i as b,h as N,C as v,H as l,D as c,E as L,s as M}from"../chunks/BtE7mKSK.js";import{p as y,o as w,s as e,f as k,a as f,b as z,c as u,d as _,n as h,r as p}from"../chunks/jDjavuwI.js";const A='{"title":"LuminaNextDiT2DModel","local":"luminanextdit2dmodel","sections":[{"title":"LuminaNextDiT2DModel","local":"diffusers.LuminaNextDiT2DModel","sections":[],"depth":2}],"depth":1}';var q=_('<meta name="hf:doc:metadata"/>'),I=_('<p></p> <!> <!> <p>A Next Version of Diffusion Transformer model for 2D data from <a href="https://github.com/Alpha-VLLM/Lumina-T2X" rel="nofollow">Lumina-T2X</a>.</p> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>LuminaNextDiT: Diffusion model with a Transformer backbone.</p> <p>Inherit ModelMixin and ConfigMixin to be compatible with the sampler StableDiffusionPipeline of diffusers.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>Forward pass of LuminaNextDiT.</p></div></div> <!> <p></p>',1);function H(g,T){y(T,!1),w(()=>{new URLSearchParams(window.location.search).get("fw")}),b();var o=I();N("1qzuugg",d=>{var m=q();M(m,"content",A),f(d,m)});var t=e(k(o),2);v(t,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var i=e(t,2);l(i,{title:"LuminaNextDiT2DModel",local:"luminanextdit2dmodel",headingTag:"h1"});var a=e(i,4);l(a,{title:"LuminaNextDiT2DModel",local:"diffusers.LuminaNextDiT2DModel",headingTag:"h2"});var n=e(a,2),s=u(n);c(s,{name:"class diffusers.LuminaNextDiT2DModel",anchor:"diffusers.LuminaNextDiT2DModel",source:"https://github.com/huggingface/diffusers/blob/vr_13966/src/diffusers/models/transformers/lumina_nextdit2d.py#L178",parameters:[{name:"sample_size",val:": int = 128"},{name:"patch_size",val:": int | None = 2"},{name:"in_channels",val:": int | None = 4"},{name:"hidden_size",val:": int | None = 2304"},{name:"num_layers",val:": int | None = 32"},{name:"num_attention_heads",val:": int | None = 32"},{name:"num_kv_heads",val:": int | None = None"},{name:"multiple_of",val:": int | None = 256"},{name:"ffn_dim_multiplier",val:": float | None = None"},{name:"norm_eps",val:": float | None = 1e-05"},{name:"learn_sigma",val:": bool | None = True"},{name:"qk_norm",val:": bool | None = True"},{name:"cross_attention_dim",val:": int | None = 2048"},{name:"scaling_factor",val:": float | None = 1.0"}],parametersDescription:[{anchor:"diffusers.LuminaNextDiT2DModel.sample_size",description:`<strong>sample_size</strong> (<code>int</code>) — The width of the latent images. This is fixed during training since | |
| it is used to learn a number of position embeddings.`,name:"sample_size"},{anchor:"diffusers.LuminaNextDiT2DModel.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, (<code>int</code>, <em>optional</em>, defaults to 2) — | |
| The size of each patch in the image. This parameter defines the resolution of patches fed into the model.`,name:"patch_size"},{anchor:"diffusers.LuminaNextDiT2DModel.in_channels",description:`<strong>in_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 4) — | |
| The number of input channels for the model. Typically, this matches the number of channels in the input | |
| images.`,name:"in_channels"},{anchor:"diffusers.LuminaNextDiT2DModel.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) — | |
| The dimensionality of the hidden layers in the model. This parameter determines the width of the model’s | |
| hidden representations.`,name:"hidden_size"},{anchor:"diffusers.LuminaNextDiT2DModel.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, default to 32) — | |
| The number of layers in the model. This defines the depth of the neural network.`,name:"num_layers"},{anchor:"diffusers.LuminaNextDiT2DModel.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) — | |
| The number of attention heads in each attention layer. This parameter specifies how many separate attention | |
| mechanisms are used.`,name:"num_attention_heads"},{anchor:"diffusers.LuminaNextDiT2DModel.num_kv_heads",description:`<strong>num_kv_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 8) — | |
| The number of key-value heads in the attention mechanism, if different from the number of attention heads. | |
| If None, it defaults to num_attention_heads.`,name:"num_kv_heads"},{anchor:"diffusers.LuminaNextDiT2DModel.multiple_of",description:`<strong>multiple_of</strong> (<code>int</code>, <em>optional</em>, defaults to 256) — | |
| A factor that the hidden size should be a multiple of. This can help optimize certain hardware | |
| configurations.`,name:"multiple_of"},{anchor:"diffusers.LuminaNextDiT2DModel.ffn_dim_multiplier",description:`<strong>ffn_dim_multiplier</strong> (<code>float</code>, <em>optional</em>) — | |
| A multiplier for the dimensionality of the feed-forward network. If None, it uses a default value based on | |
| the model configuration.`,name:"ffn_dim_multiplier"},{anchor:"diffusers.LuminaNextDiT2DModel.norm_eps",description:`<strong>norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) — | |
| A small value added to the denominator for numerical stability in normalization layers.`,name:"norm_eps"},{anchor:"diffusers.LuminaNextDiT2DModel.learn_sigma",description:`<strong>learn_sigma</strong> (<code>bool</code>, <em>optional</em>, defaults to True) — | |
| Whether the model should learn the sigma parameter, which might be related to uncertainty or variance in | |
| predictions.`,name:"learn_sigma"},{anchor:"diffusers.LuminaNextDiT2DModel.qk_norm",description:`<strong>qk_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to True) — | |
| Indicates if the queries and keys in the attention mechanism should be normalized.`,name:"qk_norm"},{anchor:"diffusers.LuminaNextDiT2DModel.cross_attention_dim",description:`<strong>cross_attention_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) — | |
| The dimensionality of the text embeddings. This parameter defines the size of the text representations used | |
| in the model.`,name:"cross_attention_dim"},{anchor:"diffusers.LuminaNextDiT2DModel.scaling_factor",description:`<strong>scaling_factor</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) — | |
| A scaling factor applied to certain parameters or layers in the model. This can be used for adjusting the | |
| overall scale of the model’s operations.`,name:"scaling_factor"}]});var r=e(s,6),x=u(r);c(x,{name:"forward",anchor:"diffusers.LuminaNextDiT2DModel.forward",source:"https://github.com/huggingface/diffusers/blob/vr_13966/src/diffusers/models/transformers/lumina_nextdit2d.py#L291",parameters:[{name:"hidden_states",val:": Tensor"},{name:"timestep",val:": Tensor"},{name:"encoder_hidden_states",val:": Tensor"},{name:"encoder_mask",val:": Tensor"},{name:"image_rotary_emb",val:": Tensor"},{name:"cross_attention_kwargs",val:": dict = None"},{name:"return_dict",val:" = True"}],parametersDescription:[{anchor:"diffusers.LuminaNextDiT2DModel.forward.hidden_states",description:"<strong>hidden_states</strong> (torch.Tensor) — Input tensor of shape (N, C, H, W).",name:"hidden_states"},{anchor:"diffusers.LuminaNextDiT2DModel.forward.timestep",description:"<strong>timestep</strong> (torch.Tensor) — Tensor of diffusion timesteps of shape (N,).",name:"timestep"},{anchor:"diffusers.LuminaNextDiT2DModel.forward.encoder_hidden_states",description:"<strong>encoder_hidden_states</strong> (torch.Tensor) — Tensor of caption features of shape (N, D).",name:"encoder_hidden_states"},{anchor:"diffusers.LuminaNextDiT2DModel.forward.encoder_mask",description:"<strong>encoder_mask</strong> (torch.Tensor) — Tensor of caption masks of shape (N, L).",name:"encoder_mask"},{anchor:"diffusers.LuminaNextDiT2DModel.forward.image_rotary_emb",description:`<strong>image_rotary_emb</strong> (<code>torch.Tensor</code>) — | |
| Pre-computed rotary positional embeddings.`,name:"image_rotary_emb"},{anchor:"diffusers.LuminaNextDiT2DModel.forward.cross_attention_kwargs",description:`<strong>cross_attention_kwargs</strong> (<code>dict</code>, <em>optional</em>) — | |
| A kwargs dictionary that if specified is passed along to the <code>AttentionProcessor</code> as defined under | |
| <code>self.processor</code> in | |
| <a href="https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py" rel="nofollow">diffusers.models.attention_processor</a>.`,name:"cross_attention_kwargs"},{anchor:"diffusers.LuminaNextDiT2DModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether or not to return a <code>~models.transformer_2d.Transformer2DModelOutput</code> instead of a plain | |
| tuple.`,name:"return_dict"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>If <code>return_dict</code> is True, a <code>~models.transformer_2d.Transformer2DModelOutput</code> is returned, otherwise | |
| a plain <code>tuple</code> is returned.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>~models.transformer_2d.Transformer2DModelOutput</code> or <code>tuple</code></p> | |
| `}),h(2),p(r),p(n);var D=e(n,2);L(D,{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/lumina_nextdit2d.md"}),h(2),f(g,o),z()}export{H as component}; | |
Xet Storage Details
- Size:
- 9.69 kB
- Xet hash:
- b83d353910c262932df72a6850e75ad2eeff066900ae55e959433cf6e7719546
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.