pub struct DitBlockArgs<'a> {Show 26 fields
pub n: usize,
pub hidden: usize,
pub inter: usize,
pub nh: usize,
pub nkv: usize,
pub hd: usize,
pub eps: f32,
pub rope_cos: &'a [f32],
pub rope_sin: &'a [f32],
pub norm1: &'a [f32],
pub norm2: &'a [f32],
pub ffn_norm1: &'a [f32],
pub ffn_norm2: &'a [f32],
pub norm_q: &'a [f32],
pub norm_k: &'a [f32],
pub s_msa: &'a [f32],
pub gate_msa: &'a [f32],
pub s_mlp: &'a [f32],
pub gate_mlp: &'a [f32],
pub wq: usize,
pub wk: usize,
pub wv: usize,
pub wo: usize,
pub w1: usize,
pub w3: usize,
pub w2: usize,
}Expand description
One whole modulated DiT block for dit_block: geometry, norm
weights, AdaLN scale/gate vectors (gates pre-tanh’d), a per-token
f32 RoPE cos/sin table, and the directory indices of the seven
q4t projections. x is in-out [n, hidden].
Fields§
§n: usize§inter: usize§nh: usize§nkv: usize§hd: usize§eps: f32§rope_cos: &'a [f32]§rope_sin: &'a [f32]§norm1: &'a [f32]§norm2: &'a [f32]§ffn_norm1: &'a [f32]§ffn_norm2: &'a [f32]§norm_q: &'a [f32]§norm_k: &'a [f32]§s_msa: &'a [f32]§gate_msa: &'a [f32]§s_mlp: &'a [f32]§gate_mlp: &'a [f32]§wq: usize§wk: usize§wv: usize§wo: usize§w1: usize§w3: usize§w2: usizeAuto Trait Implementations§
impl<'a> Freeze for DitBlockArgs<'a>
impl<'a> RefUnwindSafe for DitBlockArgs<'a>
impl<'a> Send for DitBlockArgs<'a>
impl<'a> Sync for DitBlockArgs<'a>
impl<'a> Unpin for DitBlockArgs<'a>
impl<'a> UnsafeUnpin for DitBlockArgs<'a>
impl<'a> UnwindSafe for DitBlockArgs<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more