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

Mô hình Transformer flux đã được chỉnh sửa từ Bria

BriaFiboTransformer2DModel

lớp 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 )

Tham số

  • patch_size (int) — Kích thước patch để chuyển dữ liệu đầu vào thành các patch nhỏ.
  • in_channels (int, tùy chọn, mặc định là 16) — Số lượng kênh trong đầu vào.
  • num_layers (int, tùy chọn, mặc định là 18) — Số lượng lớp của các khối MMDiT được sử dụng.
  • num_single_layers (int, tùy chọn, mặc định là 18) — Số lượng lớp của các khối DiT đơn cần sử dụng.
  • attention_head_dim (int, tùy chọn, mặc định là 64) — Số lượng kênh trong mỗi head.
  • num_attention_heads (int, tùy chọn, mặc định là 18) — Số lượng đầu (heads) được sử dụng cho chú ý đa đầu (multi-head attention).
  • joint_attention_dim (int, tùy chọn) — Số chiều của encoder_hidden_states cần sử dụng.
  • pooled_projection_dim (int) — Số chiều được sử dụng khi chiếu pooled_projections.
  • guidance_embeds (bool, mặc định là False) — Có sử dụng guidance embeddings hay không.
  • … —

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 )

Tham số

  • hidden_states (torch.FloatTensor có hình dạng (batch size, channel, height, width)) — hidden_states đầu vào.
  • encoder_hidden_states (torch.FloatTensor có hình dạng (batch size, sequence_len, embed_dims)) — Các embedding điều kiện (embedding được tính từ các điều kiện đầu vào như prompt) cần sử dụng.
  • text_encoder_layers (list của torch.Tensor) — Trạng thái ẩn của bộ mã hóa văn bản theo từng khối, một tensor cho mỗi khối transformer.
  • pooled_projections (torch.FloatTensor có hình dạng (batch_size, projection_dim)) — Các embedding được chiếu từ các embedding của điều kiện đầu vào.
  • timestep ( torch.LongTensor) — Dùng để chỉ bước khử nhiễu.
  • img_ids (torch.Tensor) — Các id vị trí ảnh được sử dụng để tính các nhúng vị trí quay (rotary positional embeddings).
  • txt_ids (torch.Tensor) — Các id vị trí văn bản được sử dụng để tính các nhúng vị trí quay (rotary positional embeddings).
  • guidance (torch.Tensor, tùy chọn) — Nhúng thang độ dẫn hướng được sử dụng cho các biến thể mô hình đã được chưng cất dẫn hướng.
  • joint_attention_kwargs (dict, tùy chọn) — Một từ điển kwargs, nếu được chỉ định, sẽ được truyền đến AttentionProcessor như đã định nghĩa dưới self.processor trong diffusers.models.attention_processor.
  • return_dict (bool, tùy chọn, mặc định là True) — Có nên trả về một ~models.transformer_2d.Transformer2DModelOutput thay vì một tuple thông thường hay không.
Update on GitHub