pub struct ZBlockRef<'a> {}Expand description
One Z-Image transformer block’s device inputs (noise refiner, context
refiner or main layer — all share this shape). Weights are tensor
indices into model.tensors (diffusers names under dit.); the codec
is whatever the container holds (F16/Bf16/Q8Row/Q8_2f/Q4TiledP…), and a
backend that cannot expand a codec declines (returns false).
Norm vectors are f32 host slices that live as long as the caller’s
ZImageDit; a backend may cache them by pointer (they do not change).
Fields§
§wq: usizeattention.to_q/to_k/to_v/to_out.0.weight, each [hidden, hidden].
wk: usize§wv: usize§wo: usize§w1: usizefeed_forward.w1 (gate) / w3 (up) [inter, hidden], w2 (down)
[hidden, inter]. FFN = w2(silu(w1·x) ⊙ w3·x).
w3: usize§w2: usize§norm1: &'a [f32]attention_norm1 / attention_norm2, [hidden] (plain-w RMSNorm).
norm2: &'a [f32]§ffn_norm1: &'a [f32]ffn_norm1 / ffn_norm2, [hidden].
ffn_norm2: &'a [f32]§norm_q: &'a [f32]attention.norm_q / norm_k, [hd] (per-head RMSNorm before RoPE).
norm_k: &'a [f32]