Diffusers documentation

BriaFiboTransformer2DModel

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.42.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

BriaFiboTransformer2DModel

Bria에서 수정한 flux Transformer 모델

BriaFiboTransformer2DModel

class diffusers.BriaFiboTransformer2DModel

< >

( patch_size: int = 1in_channels: int = 64num_layers: int = 19num_single_layers: int = 38attention_head_dim: int = 128num_attention_heads: int = 24joint_attention_dim: int = 4096pooled_projection_dim: int = Noneguidance_embeds: bool = Falseaxes_dims_rope: list = [16, 56, 56]rope_theta = 10000time_theta = 10000text_encoder_dim: int = 2048 )

매개변수

  • patch_size (int) — 입력 데이터를 작은 패치로 변환할 때 사용할 패치 크기.
  • in_channels (int, 선택 사항, 기본값 16) — 입력의 채널 수입니다.
  • num_layers (int, 선택 사항, 기본값 18) — 사용할 MMDiT 블록의 레이어 수입니다.
  • num_single_layers (int, 선택 사항, 기본값 18) — 사용할 단일 DiT 블록의 레이어 수입니다.
  • attention_head_dim (int, 선택 사항, 기본값 64) — 각 헤드당 채널 수입니다.
  • num_attention_heads (int, 선택 사항, 기본값 18) — 멀티헤드 어텐션에 사용할 헤드의 수입니다.
  • joint_attention_dim (int, 선택 사항) — 사용할 encoder_hidden_states 차원의 수입니다.
  • pooled_projection_dim (int) — pooled_projections을 투사할 때 사용할 차원의 수.
  • guidance_embeds (bool, 기본값 False) — guidance embeddings를 사용할지 여부.
  • … —

forward

< >

( hidden_states: Tensorencoder_hidden_states: Tensor = Nonetext_encoder_layers: list = Nonepooled_projections: Tensor = Nonetimestep: LongTensor = Noneimg_ids: Tensor = Nonetxt_ids: Tensor = Noneguidance: Tensor = Nonejoint_attention_kwargs: dict[str, typing.Any] | None = Nonereturn_dict: bool = True )

매개변수

  • hidden_states (torch.FloatTensor, shape (batch size, channel, height, width)) — 입력 hidden_states.
  • encoder_hidden_states (torch.FloatTensor, shape (batch size, sequence_len, embed_dims)) — 사용할 조건 임베딩(프롬프트와 같은 입력 조건에서 계산된 임베딩).
  • text_encoder_layers (list of torch.Tensor) — 트랜스포머 블록별로 하나씩, 블록별 텍스트 인코더 히든 상태입니다.
  • pooled_projections (torch.FloatTensor, shape (batch_size, projection_dim)) — 입력 조건의 임베딩에서 투영된 임베딩.
  • timestep ( torch.LongTensor) — 디노이징 단계를 나타내는 데 사용됩니다.
  • img_ids (torch.Tensor) — 회전 위치 임베딩을 계산하는 데 사용되는 이미지 위치 id입니다.
  • txt_ids (torch.Tensor) — 회전 위치 임베딩을 계산하는 데 사용되는 텍스트 위치 id입니다.
  • guidance (torch.Tensor, optional) — Guidance scale embedding used for guidance-distilled variants of the model.
  • joint_attention_kwargs (dict, 선택 사항) — 지정된 경우 diffusers.models.attention_processor의 self.processor에서 정의된 AttentionProcessor로 전달되는 kwargs 사전입니다.
  • return_dict (bool, 선택 사항, 기본값 True) — 단순 tuple 대신 ~models.transformer_2d.Transformer2DModelOutput를 반환할지 여부.
Update on GitHub