A modified flux Transformer model from Bria
( patch_size: int = 1 in_channels: int = 64 num_layers: int = 19 num_single_layers: int = 38 attention_head_dim: int = 128 num_attention_heads: int = 24 joint_attention_dim: int = 4096 pooled_projection_dim: int = None guidance_embeds: bool = False axes_dims_rope: typing.List[int] = [16, 56, 56] rope_theta = 10000 time_theta = 10000 text_encoder_dim: int = 2048 )
Parameters
int) — Patch size to turn the input data into small patches. int, optional, defaults to 16) — The number of channels in the input. int, optional, defaults to 18) — The number of layers of MMDiT blocks to use. int, optional, defaults to 18) — The number of layers of single DiT blocks to use. int, optional, defaults to 64) — The number of channels in each head. int, optional, defaults to 18) — The number of heads to use for multi-head attention. int, optional) — The number of encoder_hidden_states dimensions to use. int) — Number of dimensions to use when projecting the pooled_projections. bool, defaults to False) — Whether to use guidance embeddings. ( hidden_states: Tensor encoder_hidden_states: Tensor = None text_encoder_layers: list = None pooled_projections: Tensor = None timestep: LongTensor = None img_ids: Tensor = None txt_ids: Tensor = None guidance: Tensor = None joint_attention_kwargs: typing.Optional[typing.Dict[str, typing.Any]] = None return_dict: bool = True )
Parameters
torch.FloatTensor of shape (batch size, channel, height, width)) —
Input hidden_states. torch.FloatTensor of shape (batch size, sequence_len, embed_dims)) —
Conditional embeddings (embeddings computed from the input conditions such as prompts) to use. torch.FloatTensor of shape (batch_size, projection_dim)) — Embeddings projected
from the embeddings of input conditions. torch.LongTensor) —
Used to indicate denoising step. dict, optional) —
A kwargs dictionary that if specified is passed along to the AttentionProcessor as defined under
self.processor in
diffusers.models.attention_processor. bool, optional, defaults to True) —
Whether or not to return a ~models.transformer_2d.Transformer2DModelOutput instead of a plain
tuple.