Skip to main content

Module dit

Module dit 

Source
Expand description

Lumina2 Next-DiT forward (the Lumina-Image 2.0 denoiser): noisy latent + caption features + timestep → velocity prediction.

Third increment of the image-generation runtime (docs/GENERATIVE.ru.md). Standalone f32 forward loaded from a diffusers transformer/ directory, mirroring Lumina2Transformer2DModel exactly: plain-w RMSNorm (not Gemma’s 1+w), per-head qk-norm, 3-axis complex-interleaved RoPE θ=10000 (caption tokens advance axis 0, image tokens sit at axis0=cap_len with row/col on axes 1/2), AdaLN modulation with tanh gates from the 1024-d timestep embedding, sandwich RMSNorms, SwiGLU FFN, and a final LayerNorm(eps 1e-6, no affine) scaled by (1+scale) before the patch projection. Attention is full/bidirectional.

Parity: python/nextdit_ref.py + tests/dit_parity.rs on the real Lumina transformer weights.

Structs§

NextDit
Next-DiT: exact f32 from a diffusers directory, or CMF-quantized (mmap-resident) from a packaged file.