  
          if (not self._args.on_the_fly and
                  self._args.mask_type not in ("none", "predicted") and
                  not self._alignments.mask_is_valid(self._args.mask_type)):
              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))
              raise FaceswapError(msg)
  
          if self._args.mask_type == "predicted" and not self._predictor.has_predicted_mask:
              available_masks = [k for k, v in self._alignments.mask_summary.items()
                                 if k != "none" and v == self._alignments.faces_count]
 
</s> remove     def _add_queues(self):
 </s> add     def _add_queues(self) -> None: </s> remove         retval = list()
 </s> add         retval = [] </s> remove         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])
 </s> add         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]) </s> remove             tqdm.write("No alignment found for {}, "
                       "skipping".format(frame_name))
 </s> add             tqdm.write(f"No alignment found for {frame_name}, skipping") </s> remove     def _convert_images(self):
 </s> add     def _convert_images(self) -> None:
            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}")
  
          if (not self._args.on_the_fly and
                  self._args.mask_type not in ("none", "predicted") and
                  not self._alignments.mask_is_valid(self._args.mask_type)):
            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}")
            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}")
            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}")
            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}")
            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}")
            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}")
              raise FaceswapError(msg)
  
          if self._args.mask_type == "predicted" and not self._predictor.has_predicted_mask:
              available_masks = [k for k, v in self._alignments.mask_summary.items()
                                 if k != "none" and v == self._alignments.faces_count]
keep keep keep keep 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