flux_double_block

FLUX double-stream (MMDiT) transformer block

Description

Image and text streams each get adaLN-Zero modulation and a feed-forward; attention is joint across both streams. Reference: diffusers FluxTransformerBlock.

Usage

flux_double_block(dim, num_attention_heads, attention_head_dim)

Arguments

  • dim: Integer. Model dimension.
  • num_attention_heads: Integer. Attention heads.
  • attention_head_dim: Integer. Per-head dimension.

Value

Module whose forward(hidden_states, encoder_hidden_states, temb, image_rotary_emb) returns list(encoder_hidden_states, hidden_states).