code: def __init__(
      self,
      decoder_config,
      perceptual_weight=1.0,
      latent_weight=1.0,
      scale_input_to_tgt_size=False,
      scale_tgt_to_input_size=False,
      perceptual_weight_on_inputs=0.0,
  ):
      super().__init__()
      self.scale_input_to_tgt_size = scale_input_to_tgt_size
      self.scale_tgt_to_input_size = scale_tgt_to_input_size
      self.init_decoder(decoder_config)
      self.perceptual_loss = LPIPS().eval()
      self.perceptual_weight = perceptual_weight
      self.latent_weight = latent_weight
      self.perceptual_weight_on_inputs = perceptual_weight_on_inputs
  
file_path: generative-models/sgm/modules/autoencoding/losses/lpips.py
imports: import torch
  import torch.nn
  from ....util import default, instantiate_from_config
  from ..lpips.loss.lpips import LPIPS
label_desc: Use image node_id 1 to create a new LatentLPIPS object from inherited base classes: nn with example: obj = LatentLPIPS(decoder_config, perceptual_weight, latent_weight, scale_input_to_tgt_size, scale_tgt_to_input_size, perceptual_weight_on_inputs)