Diffusers documentation

Normalization layers

You are viewing v0.23.1 version. A newer version v0.31.0 is available.
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Normalization layers

Customized normalization layers for supporting various models in 🤗 Diffusers.

AdaLayerNorm

class diffusers.models.normalization.AdaLayerNorm

< >

( embedding_dim: int num_embeddings: int )

Parameters

  • embedding_dim (int) — The size of each embedding vector.
  • num_embeddings (int) — The size of the embeddings dictionary.

Norm layer modified to incorporate timestep embeddings.

AdaLayerNormZero

class diffusers.models.normalization.AdaLayerNormZero

< >

( embedding_dim: int num_embeddings: int )

Parameters

  • embedding_dim (int) — The size of each embedding vector.
  • num_embeddings (int) — The size of the embeddings dictionary.

Norm layer adaptive layer norm zero (adaLN-Zero).

AdaGroupNorm

class diffusers.models.normalization.AdaGroupNorm

< >

( embedding_dim: int out_dim: int num_groups: int act_fn: typing.Optional[str] = None eps: float = 1e-05 )

Parameters

  • embedding_dim (int) — The size of each embedding vector.
  • num_embeddings (int) — The size of the embeddings dictionary.
  • num_groups (int) — The number of groups to separate the channels into.
  • act_fn (str, optional, defaults to None) — The activation function to use.
  • eps (float, optional, defaults to 1e-5) — The epsilon value to use for numerical stability.

GroupNorm layer modified to incorporate timestep embeddings.