Diffusers documentation
Normalization layers
Get started
Tutorials
OverviewUnderstanding pipelines, models and schedulersAutoPipelineTrain a diffusion modelLoad LoRAs for inferenceAccelerate inference of text-to-image diffusion models
Load pipelines and adapters
Load pipelinesLoad community pipelines and componentsLoad schedulers and modelsModel files and layoutsLoad adaptersPush files to the Hub
Generative tasks
Unconditional image generationText-to-imageImage-to-imageInpaintingText or image-to-videoDepth-to-image
Inference techniques
OverviewDistributed inference with multiple GPUsMerge LoRAsScheduler featuresPipeline callbacksReproducible pipelinesControlling image qualityPrompt techniques
Advanced inference
Specific pipeline examples
Stable Diffusion XLSDXL TurboKandinskyIP-AdapterControlNetT2I-AdapterLatent Consistency ModelTextual inversionShap-EDiffEditTrajectory Consistency Distillation-LoRAStable Video DiffusionMarigold Computer Vision
Training
Accelerate inference and reduce memory
Speed up inferenceReduce memory usagePyTorch 2.0xFormersToken mergingDeepCacheTGATE
Optimized model formats
Optimized hardware
Conceptual Guides
PhilosophyControlled generationHow to contribute?Diffusers' Ethical GuidelinesEvaluating Diffusion Models
API
Main Classes
Loaders
Models
Pipelines
Schedulers
Internal classes
You are viewing v0.29.2 version. A newer version v0.38.0 is available.
Normalization layers
Customized normalization layers for supporting various models in 🤗 Diffusers.
AdaLayerNorm
class diffusers.models.normalization.AdaLayerNorm
< source >( embedding_dim: int num_embeddings: int )
Norm layer modified to incorporate timestep embeddings.
AdaLayerNormZero
class diffusers.models.normalization.AdaLayerNormZero
< source >( embedding_dim: int num_embeddings: Optional = None )
Norm layer adaptive layer norm zero (adaLN-Zero).
AdaLayerNormSingle
class diffusers.models.normalization.AdaLayerNormSingle
< source >( embedding_dim: int use_additional_conditions: bool = False )
Norm layer adaptive layer norm single (adaLN-single).
As proposed in PixArt-Alpha (see: https://arxiv.org/abs/2310.00426; Section 2.3).
AdaGroupNorm
class diffusers.models.normalization.AdaGroupNorm
< source >( embedding_dim: int out_dim: int num_groups: int act_fn: Optional = 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 toNone) — The activation function to use. - eps (
float, optional, defaults to1e-5) — The epsilon value to use for numerical stability.
GroupNorm layer modified to incorporate timestep embeddings.