                  not self._images.is_video and
                  self._args.reference_video is None):
              raise FaceswapError("Output as video selected, but using frames as input. You must "
                                  "provide a reference video ('-ref', '--reference-video').")
          if (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: "
 
</s> remove         mask_centering = detected_face.mask[self._args.mask_type].stored_centering
 </s> add         if self._args.mask_type != "none":
            mask_centering = detected_face.mask[self._args.mask_type].stored_centering
        else:
            mask_centering = "face"  # Unused but requires a valid value </s> remove         if self._alignments.version == 1.0:
            logger.error("The alignments file format has been updated since the given alignments "
                         "file was generated. You need to update the file to proceed.")
            logger.error("To do this run the 'Alignments Tool' > 'Extract' Job.")
            sys.exit(1)
 </s> add         self._validate() </s> remove                               masker="none",
 </s> add                               masker=self._args.mask_type,
        if (self._args.on_the_fly and
                self._args.mask_type not in ("none", "extended", "components")):
            logger.warning("You have selected an incompatible mask type ('%s') for On-The-Fly "
                           "conversion. Switching to 'extended'", self._args.mask_type)
            self._args.mask_type = "extended"

        if (not self._args.on_the_fly and
                self._args.mask_type not in ("none", "predicted") and
                  not self._images.is_video and
                  self._args.reference_video is None):
              raise FaceswapError("Output as video selected, but using frames as input. You must "
                                  "provide a reference video ('-ref', '--reference-video').")
        if (self._args.on_the_fly and
                self._args.mask_type not in ("none", "extended", "components")):
            logger.warning("You have selected an incompatible mask type ('%s') for On-The-Fly "
                           "conversion. Switching to 'extended'", self._args.mask_type)
            self._args.mask_type = "extended"

        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: "
keep keep keep keep replace keep keep keep keep keep
 bugfix: Convert - don't error if no mask is selected 
scripts/convert.py