class_docstr: ## Latent diffusion model
  
  This contains following components:
  
  * [AutoEncoder](model/autoencoder.html)
  * [U-Net](model/unet.html) with [attention](model/unet_attention.html)
  * [CLIP embeddings generator](model/clip_embedder.html)
class_docstr_tok: ["#","#","Latent","diffusion","model","This","contains","following","components",":","*","[","AutoEncoder","]","(","model\/autoencoder.html",")","*","[","U-Net","]","(","model\/unet.html",")","with","[","attention","]","(","model\/unet_attention.html",")","*","[","CLIP","embeddings","generator","]","(","model\/clip_embedder.html",")"]
docstr: ### Predict noise
  
  Predict noise given the latent representation $x_t$, time step $t$, and the
  conditioning context $c$.
  
  $$\epsilon_     ext{cond}(x_t, c)$$
docstr_tok: ["#","#","#","Predict","noise","Predict","noise","given","the","latent","representation","$","x_t","$",",","time","step","$","t","$",",","and","the","conditioning","context","$","c","$",".","$","$","\\epsilon_","ext","{","cond","}","(","x_t",",","c",")","$","$"]
code: def forward(
      self, x: torch.Tensor, t: torch.Tensor, context: torch.Tensor
  ):
      """
      ### Predict noise
  
      Predict noise given the latent representation $x_t$, time step $t$, and the
      conditioning context $c$.
  
      $$\epsilon_\text{cond}(x_t, c)$$
      """
      return self.model(x, t, context)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/diffusion/stable_diffusion/latent_diffusion.py
imports: from typing import List
  import torch
  import torch.nn
  from labml_nn.diffusion.stable_diffusion.model.autoencoder import Autoencoder
  from labml_nn.diffusion.stable_diffusion.model.clip_embedder import CLIPTextEmbedder
  from labml_nn.diffusion.stable_diffusion.model.unet import UNetModel
label_desc: Use image node_id 6 for calling the LatentDiffusion obj's underlying member method code with example usage: obj.forward(x, t, context) and returns: self