code: def process(
      self,
      pp: scripts_postprocessing.PostprocessedImage,
      upscale_mode=1,
      upscale_by=2.0,
      upscale_to_width=None,
      upscale_to_height=None,
      upscale_crop=False,
      upscaler_1_name=None,
      upscaler_2_name=None,
      upscaler_2_visibility=0.0,
  ):
      if upscaler_1_name == "None":
          upscaler_1_name = None
  
      upscaler1 = next(
          iter(
              [
                  x
                  for x in shared.sd_upscalers
                  if x.name == upscaler_1_name
              ]
          ),
          None,
      )
      assert upscaler1 or (
          upscaler_1_name is None
      ), f"could not find upscaler named {upscaler_1_name}"
  
      if not upscaler1:
          return
  
      if upscaler_2_name == "None":
          upscaler_2_name = None
  
      upscaler2 = next(
          iter(
              [
                  x
                  for x in shared.sd_upscalers
                  if x.name == upscaler_2_name and x.name != "None"
              ]
          ),
          None,
      )
      assert upscaler2 or (
          upscaler_2_name is None
      ), f"could not find upscaler named {upscaler_2_name}"
  
      upscaled_image = self.upscale(
          pp.image,
          pp.info,
          upscaler1,
          upscale_mode,
          upscale_by,
          upscale_to_width,
          upscale_to_height,
          upscale_crop,
      )
      pp.info["Postprocess upscaler"] = upscaler1.name
  
      if upscaler2 and upscaler_2_visibility > 0:
          second_upscale = self.upscale(
              pp.image,
              pp.info,
              upscaler2,
              upscale_mode,
              upscale_by,
              upscale_to_width,
              upscale_to_height,
              upscale_crop,
          )
          upscaled_image = Image.blend(
              upscaled_image, second_upscale, upscaler_2_visibility
          )
  
          pp.info["Postprocess upscaler 2"] = upscaler2.name
  
      pp.image = upscaled_image
  
file_path: stable-diffusion-webui/scripts/postprocessing_upscale.py
imports: from PIL import Image
  import numpy
  from modules import scripts_postprocessing, shared
  import gradio
  from modules.ui_components import FormRow, ToolButton
  from modules.ui import switch_values_symbol
label_desc: Use image node_id 4 for calling the ScriptPostprocessingUpscale obj's underlying member method code with example usage: obj.process(pp, upscale_mode, upscale_by, upscale_to_width, upscale_to_height, upscale_crop, upscaler_1_name, upscaler_2_name, upscaler_2_visibility) without return types