pub struct ZConfig {Show 17 fields
pub dim: usize,
pub n_layers: usize,
pub n_refiner: usize,
pub n_heads: usize,
pub n_kv_heads: usize,
pub head_dim: usize,
pub ffn_dim: usize,
pub cap_feat_dim: usize,
pub t_embed_dim: usize,
pub t_hidden: usize,
pub patch: usize,
pub in_channels: usize,
pub norm_eps: f32,
pub final_eps: f32,
pub rope_theta: f64,
pub axes_dims: [usize; 3],
pub t_scale: f32,
}Expand description
dit.config_json / transformer config.json fields the runtime uses.
Fields§
§dim: usize3840
n_layers: usize30 main layers
n_refiner: usize2 noise-refiner and 2 context-refiner blocks
n_heads: usize30 heads, 30 kv heads, head_dim 128
n_kv_heads: usize§head_dim: usize§ffn_dim: usizeint(dim / 3 · 8) = 10240
cap_feat_dim: usize2560 (Qwen3-4B hidden)
t_embed_dim: usize256 (ADALN_EMBED_DIM) and the t-embedder MLP width 1024
patch: usizepatch 2, latent channels 16 → patch vector 64
in_channels: usize§norm_eps: f321e-5 (all RMSNorms), 1e-6 (final LayerNorm)
final_eps: f32§rope_theta: f64256.0 and [32, 48, 48]
axes_dims: [usize; 3]§t_scale: f321000.0
Implementations§
Source§impl ZConfig
impl ZConfig
Sourcepub fn from_json(v: &Value) -> Result<Self, String>
pub fn from_json(v: &Value) -> Result<Self, String>
Parse the diffusers transformer config.json (the same JSON is
stored as dit.config_json in the container).
pub fn geom(&self) -> ZGeom
Sourcepub fn n_mod_blocks(&self) -> usize
pub fn n_mod_blocks(&self) -> usize
Blocks carrying adaLN: the noise refiner, then the main layers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZConfig
impl RefUnwindSafe for ZConfig
impl Send for ZConfig
impl Sync for ZConfig
impl Unpin for ZConfig
impl UnsafeUnpin for ZConfig
impl UnwindSafe for ZConfig
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