          if hasattr(self._args, "trainer") and self._args.trainer:
              logger.debug("Trainer name provided: '%s'", self._args.trainer)
              return self._args.trainer
  
          statefile = [fname for fname in os.listdir(str(model_dir))
                       if fname.endswith("_state.json")]
          if len(statefile) != 1:
              raise FaceswapError("There should be 1 state file in your model folder. {} were "
                                  "found. Specify a trainer with the '-t', '--trainer' "
                                  "option.".format(len(statefile)))
          statefile = os.path.join(str(model_dir), statefile[0])
  
          state = self._serializer.load(statefile)
          trainer = state.get("name", None)
  
          if not trainer:
 
</s> remove     def _launch_predictor(self):
 </s> add     def _launch_predictor(self) -> MultiThread: </s> remove             msg = ("You have selected the Mask Type `{}` but at least one face does not have this "
                   "mask stored in the Alignments File.\nYou should generate the required masks "
                   "with the Mask Tool or set the Mask Type option to an existing Mask Type.\nA "
                   "summary of existing masks is as follows:\nTotal faces: {}, Masks: "
                   "{}".format(self._args.mask_type, self._alignments.faces_count,
                               self._alignments.mask_summary))
 </s> add             msg = (f"You have selected the Mask Type `{self._args.mask_type}` but at least one "
                   "face does not have this mask stored in the Alignments File.\nYou should "
                   "generate the required masks with the Mask Tool or set the Mask Type option to "
                   "an existing Mask Type.\nA summary of existing masks is as follows:\nTotal "
                   f"faces: {self._alignments.faces_count}, "
                   f"Masks: {self._alignments.mask_summary}") </s> remove             raise ValueError("Queue '{}' already exists.".format(name))
 </s> add             raise ValueError(f"Queue '{name}' already exists.") </s> remove         retval = list()
 </s> add         retval = [] </s> remove             retval.setdefault(meta["source_filename"], list()).append(meta["face_index"])
 </s> add             retval.setdefault(meta["source_filename"], []).append(meta["face_index"])
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
          if hasattr(self._args, "trainer") and self._args.trainer:
              logger.debug("Trainer name provided: '%s'", self._args.trainer)
              return self._args.trainer
  
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
        statefiles = [fname for fname in os.listdir(str(model_dir))
                      if fname.endswith("_state.json")]
        if len(statefiles) != 1:
            raise FaceswapError("There should be 1 state file in your model folder. "
                                f"{len(statefiles)} were found. Specify a trainer with the '-t', "
                                "'--trainer' option.")
        statefile = os.path.join(str(model_dir), statefiles[0])
  
          state = self._serializer.load(statefile)
          trainer = state.get("name", None)
  
          if not trainer:
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Bugfix: convert - Gif Writer
  - Fix non-launch error on Gif Writer
  - convert plugins - linting
  - convert/fs_media/preview/queue_manager - typing
  - Change convert items from dict to Dataclass 
scripts/convert.py