code: def gfpgann():
      global loaded_gfpgan_model
      global model_path
      global model_file_path
      if loaded_gfpgan_model is not None:
          loaded_gfpgan_model.gfpgan.to(devices.device_gfpgan)
          return loaded_gfpgan_model
  
      if gfpgan_constructor is None:
          return None
  
      models = modelloader.load_models(
          model_path, model_url, user_path, ext_filter=[".pth"]
      )
  
      if len(models) == 1 and models[0].startswith("http"):
          model_file = models[0]
      elif len(models) != 0:
          gfp_models = []
          for item in models:
              if "GFPGAN" in os.path.basename(item):
                  gfp_models.append(item)
          latest_file = max(gfp_models, key=os.path.getctime)
          model_file = latest_file
      else:
          print("Unable to load gfpgan model!")
          return None
  
      if hasattr(facexlib.detection.retinaface, "device"):
          facexlib.detection.retinaface.device = devices.device_gfpgan
      model_file_path = model_file
      model = gfpgan_constructor(
          model_path=model_file,
          upscale=1,
          arch="clean",
          channel_multiplier=2,
          bg_upsampler=None,
          device=devices.device_gfpgan,
      )
      loaded_gfpgan_model = model
  
      return model
  
file_path: stable-diffusion-webui/modules/gfpgan_model.py
imports: import os
  import facexlib
  import gfpgan
  import modules.face_restoration
  from modules import paths, shared, devices, modelloader, errors
label_desc: Use image node_id 1 for calling a global function with example usage: gfpgann() and returns: model, loaded_gfpgan_model, None, None