code: def get_config(checkpoint_url):
      config = Swin2SRConfig()
  
      if "Swin2SR_ClassicalSR_X4_64" in checkpoint_url:
          config.upscale = 4
      elif "Swin2SR_CompressedSR_X4_48" in checkpoint_url:
          config.upscale = 4
          config.image_size = 48
          config.upsampler = "pixelshuffle_aux"
      elif "Swin2SR_Lightweight_X2_64" in checkpoint_url:
          config.depths = [6, 6, 6, 6]
          config.embed_dim = 60
          config.num_heads = [6, 6, 6, 6]
          config.upsampler = "pixelshuffledirect"
      elif "Swin2SR_RealworldSR_X4_64_BSRGAN_PSNR" in checkpoint_url:
          config.upscale = 4
          config.upsampler = "nearest+conv"
      elif "Swin2SR_Jpeg_dynamic" in checkpoint_url:
          config.num_channels = 1
          config.upscale = 1
          config.image_size = 126
          config.window_size = 7
          config.img_range = 255.0
          config.upsampler = ""
  
      return config
  
file_path: transformers/src/transformers/models/swin2sr/convert_swin2sr_original_to_pytorch.py
imports: import argparse
  import requests
  import torch
  from PIL import Image
  from torchvision.transforms import Compose, Normalize, Resize, ToTensor
  from transformers import Swin2SRConfig, Swin2SRForImageSuperResolution, Swin2SRImageProcessor
label_desc: Use image node_id 1 for calling a global function with example usage: get_config(checkpoint_url) and returns: config