code: def __init__(self, create_dirs=False):
      self.mod_pad_h = None
      self.tile_size = modules.shared.opts.ESRGAN_tile
      self.tile_pad = modules.shared.opts.ESRGAN_tile_overlap
      self.device = modules.shared.device
      self.img = None
      self.output = None
      self.scale = 1
      self.half = not modules.shared.cmd_opts.no_half
      self.pre_pad = 0
      self.mod_scale = None
      self.model_download_path = None
  
      if self.model_path is None and self.name:
          self.model_path = os.path.join(shared.models_path, self.name)
      if self.model_path and create_dirs:
          os.makedirs(self.model_path, exist_ok=True)
  
      try:
          import cv2  # noqa: F401
  
          self.can_tile = True
      except Exception:
          pass
  
imports: import os
  from abc import abstractmethod
  import PIL
  from PIL import Image
  import modules.shared
  from modules import modelloader, shared
label_desc: Use image node_id 1 to create a new Upscaler object  with example: obj = Upscaler(create_dirs)