code: def __init__(self, dirname):
      self.name = "ESRGAN"
      self.model_url = "https://github.com/cszn/KAIR/releases/download/v1.0/ESRGAN.pth"
      self.model_name = "ESRGAN_4x"
      self.scalers = []
      self.user_path = dirname
      super().__init__()
      model_paths = self.find_models(ext_filter=[".pt", ".pth"])
      scalers = []
      if len(model_paths) == 0:
          scaler_data = UpscalerData(
              self.model_name, self.model_url, self, 4
          )
          scalers.append(scaler_data)
      for file in model_paths:
          if file.startswith("http"):
              name = self.model_name
          else:
              name = modelloader.friendly_name(file)
  
          scaler_data = UpscalerData(name, file, self, 4)
          self.scalers.append(scaler_data)
  
file_path: stable-diffusion-webui/modules/esrgan_model.py
imports: import sys
  import numpy
  import torch
  from PIL import Image
  import modules.esrgan_model_arch
  from modules import modelloader, images, devices
  from modules.shared import opts
  from modules.upscaler import Upscaler, UpscalerData
label_desc: Use image node_id 1 to create a new UpscalerESRGAN object from inherited base classes: Upscaler with example: obj = UpscalerESRGAN(dirname)