code: def __init__(self, path):
      self.name = "RealESRGAN"
      self.user_path = path
      super().__init__()
      try:
          from basicsr.archs.rrdbnet_arch import RRDBNet  # noqa: F401
          from realesrgan import RealESRGANer  # noqa: F401
          from realesrgan.archs.srvgg_arch import (
              SRVGGNetCompact,
          )  # noqa: F401
  
          self.enable = True
          self.scalers = []
          scalers = self.load_models(path)
  
          local_model_paths = self.find_models(ext_filter=[".pth"])
          for scaler in scalers:
              if scaler.local_data_path.startswith("http"):
                  filename = modelloader.friendly_name(
                      scaler.local_data_path
                  )
                  local_model_candidates = [
                      local_model
                      for local_model in local_model_paths
                      if local_model.endswith(f"{filename}.pth")
                  ]
                  if local_model_candidates:
                      scaler.local_data_path = local_model_candidates[0]
  
              if scaler.name in opts.realesrgan_enabled_models:
                  self.scalers.append(scaler)
  
      except Exception:
          errors.report("Error importing Real-ESRGAN", exc_info=True)
          self.enable = False
          self.scalers = []
  
file_path: stable-diffusion-webui/modules/realesrgan_model.py
imports: import os
  import numpy
  from PIL import Image
  from realesrgan import RealESRGANer
  from modules.upscaler import Upscaler, UpscalerData
  from modules.shared import cmd_opts, opts
  from modules import modelloader, errors
label_desc: Use image node_id 1 to create a new UpscalerRealESRGAN object from inherited base classes: Upscaler with example: obj = UpscalerRealESRGAN(path)