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: ### Get image from the latent representation
  
  We scale down by the scaling factor and then decode.
docstr_tok: ["#","#","#","Get","image","from","the","latent","representation","We","scale","down","by","the","scaling","factor","and","then","decode","."]
code: def autoencoder_decode(self, z: torch.Tensor):
      """
      ### Get image from the latent representation
  
      We scale down by the scaling factor and then decode.
      """
      return self.first_stage_model.decode(
          z / self.latent_scaling_factor
      )
  
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 5 for calling the LatentDiffusion obj's underlying member method code with example usage: obj.autoencoder_decode(z) and returns: self