# BriaFiboTransformer2DModel

A modified flux Transformer model from [Bria](https://huggingface.co/briaai/FIBO)

## BriaFiboTransformer2DModel[[diffusers.BriaFiboTransformer2DModel]]

<div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8">


<docstring><name>class diffusers.BriaFiboTransformer2DModel</name><anchor>diffusers.BriaFiboTransformer2DModel</anchor><source>https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/transformer_bria_fibo.py#L432</source><parameters>[{"name": "patch_size", "val": ": int = 1"}, {"name": "in_channels", "val": ": int = 64"}, {"name": "num_layers", "val": ": int = 19"}, {"name": "num_single_layers", "val": ": int = 38"}, {"name": "attention_head_dim", "val": ": int = 128"}, {"name": "num_attention_heads", "val": ": int = 24"}, {"name": "joint_attention_dim", "val": ": int = 4096"}, {"name": "pooled_projection_dim", "val": ": int = None"}, {"name": "guidance_embeds", "val": ": bool = False"}, {"name": "axes_dims_rope", "val": ": typing.List[int] = [16, 56, 56]"}, {"name": "rope_theta", "val": " = 10000"}, {"name": "time_theta", "val": " = 10000"}, {"name": "text_encoder_dim", "val": ": int = 2048"}]</parameters><paramsdesc>- **patch_size** (`int`) -- Patch size to turn the input data into small patches.
- **in_channels** (`int`, *optional*, defaults to 16) -- The number of channels in the input.
- **num_layers** (`int`, *optional*, defaults to 18) -- The number of layers of MMDiT blocks to use.
- **num_single_layers** (`int`, *optional*, defaults to 18) -- The number of layers of single DiT blocks to use.
- **attention_head_dim** (`int`, *optional*, defaults to 64) -- The number of channels in each head.
- **num_attention_heads** (`int`, *optional*, defaults to 18) -- The number of heads to use for multi-head attention.
- **joint_attention_dim** (`int`, *optional*) -- The number of `encoder_hidden_states` dimensions to use.
- **pooled_projection_dim** (`int`) -- Number of dimensions to use when projecting the `pooled_projections`.
- **guidance_embeds** (`bool`, defaults to False) -- Whether to use guidance embeddings.
- **...** --</paramsdesc><paramgroups>0</paramgroups></docstring>





<div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8">


<docstring><name>forward</name><anchor>diffusers.BriaFiboTransformer2DModel.forward</anchor><source>https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/transformers/transformer_bria_fibo.py#L513</source><parameters>[{"name": "hidden_states", "val": ": Tensor"}, {"name": "encoder_hidden_states", "val": ": Tensor = None"}, {"name": "text_encoder_layers", "val": ": list = None"}, {"name": "pooled_projections", "val": ": Tensor = None"}, {"name": "timestep", "val": ": LongTensor = None"}, {"name": "img_ids", "val": ": Tensor = None"}, {"name": "txt_ids", "val": ": Tensor = None"}, {"name": "guidance", "val": ": Tensor = None"}, {"name": "joint_attention_kwargs", "val": ": typing.Optional[typing.Dict[str, typing.Any]] = None"}, {"name": "return_dict", "val": ": bool = True"}]</parameters><paramsdesc>- **hidden_states** (`torch.FloatTensor` of shape `(batch size, channel, height, width)`) --
  Input `hidden_states`.
- **encoder_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.
- **pooled_projections** (`torch.FloatTensor` of shape `(batch_size, projection_dim)`) -- Embeddings projected
  from the embeddings of input conditions.
- **timestep** ( `torch.LongTensor`) --
  Used to indicate denoising step.
- **joint_attention_kwargs** (`dict`, *optional*) --
  A kwargs dictionary that if specified is passed along to the `AttentionProcessor` as defined under
  `self.processor` in
  [diffusers.models.attention_processor](https://github.com/huggingface/diffusers/blob/main/src/diffusers/models/attention_processor.py).
- **return_dict** (`bool`, *optional*, defaults to `True`) --
  Whether or not to return a `~models.transformer_2d.Transformer2DModelOutput` instead of a plain
  tuple.</paramsdesc><paramgroups>0</paramgroups><retdesc>If `return_dict` is True, an `~models.transformer_2d.Transformer2DModelOutput` is returned, otherwise a
`tuple` where the first element is the sample tensor.</retdesc></docstring>







</div></div>

<EditOnGithub source="https://github.com/huggingface/diffusers/blob/main/docs/source/en/api/models/transformer_bria_fibo.md" />