code: def __init__(self, args):
      self.sr_image_shape = [
          int(v) for v in args.sr_image_shape.split(",")
      ]
      self.sr_batch_num = args.sr_batch_num
  
      (
          self.predictor,
          self.input_tensor,
          self.output_tensors,
          self.config,
      ) = utility.create_predictor(args, "sr", logger)
      self.benchmark = args.benchmark
      if args.benchmark:
          import auto_log
  
          pid = os.getpid()
          gpu_id = utility.get_infer_gpuid()
          self.autolog = auto_log.AutoLogger(
              model_name="sr",
              model_precision=args.precision,
              batch_size=args.sr_batch_num,
              data_shape="dynamic",
              save_path=None,  # args.save_log_path,
              inference_config=self.config,
              pids=pid,
              process_name=None,
              gpu_ids=gpu_id if args.use_gpu else None,
              time_keys=[
                  "preprocess_time",
                  "inference_time",
                  "postprocess_time",
              ],
              warmup=0,
              logger=logger,
          )
  
file_path: PaddleOCR/tools/infer/predict_sr.py
imports: import os
  import sys
  from PIL import Image
  import cv2
  import numpy
  import math
  import time
  import traceback
  import paddle
  import tools.infer.utility
  from ppocr.postprocess import build_post_process
  from ppocr.utils.logging import get_logger
  from ppocr.utils.utility import get_image_file_list, check_and_read
label_desc: Use image node_id 1 to create a new TextSR object from inherited base classes: object with example: obj = TextSR(args)