class_docstr: Norm layer modified to incorporate timestep embeddings.
  
  Parameters:
      embedding_dim (`int`): The size of each embedding vector.
      num_embeddings (`int`): The size of the dictionary of embeddings.
class_docstr_tok: ["Norm","layer","modified","to","incorporate","timestep","embeddings",".","Parameters",":","embedding_dim","(","`","int","`",")",":","The","size","of","each","embedding","vector",".","num_embeddings","(","`","int","`",")",":","The","size","of","the","dictionary","of","embeddings","."]
code: def forward(
      self, x: torch.Tensor, timestep: torch.Tensor
  ) -> torch.Tensor:
      emb = self.linear(self.silu(self.emb(timestep)))
      scale, shift = torch.chunk(emb, 2)
      x = self.norm(x) * (1 + scale) + shift
      return x
  
imports: from typing import Any, Dict, Optional, Tuple
  import torch
  import torch.nn.functional
  from torch import nn
  from ..utils import USE_PEFT_BACKEND
  from ..utils.torch_utils import maybe_allow_in_graph
  from .activations import get_activation
  from .attention_processor import Attention
  from .embeddings import CombinedTimestepLabelEmbeddings
  from .lora import LoRACompatibleLinear
label_desc: Use image node_id 2 for calling the AdaLayerNorm obj's underlying member method code with example usage: obj.forward(x, timestep) and returns: x