                  skip_list.append(idx)
              # Items may be in the alignments file if skip-existing[-faces] is selected
              elif os.path.basename(filename) in self._alignments.data:
                  self._existing_count += 1
                  logger.trace("Removing image: '%s' due to previously existing", filename)
                  skip_list.append(idx)
          if self._existing_count != 0:
              logger.info("Skipping %s frames due to skip_existing/skip_existing_faces.",
                          self._existing_count)
          logger.debug("Adding skip list: %s", skip_list)
 
</s> remove                 logger.trace("Adding image '%s' to skip list due to extract_every_n = %s",
                             filename, self._skip_num)
 </s> add                 logger.trace("Adding image '%s' to skip list due to "  # type: ignore
                             "extract_every_n = %s", filename, self._skip_num) </s> remove         Returns
        -------
        bool
            ``True`` if the cache has been reset because of a face centering change due to
            legacy alignments, otherwise ``False``. """
        retval = self._has_reset
        if retval:
            logger.debug("Resetting 'has_reset' flag")
            self._has_reset = False
        return retval
 </s> add         Raises
        ------
        :class:`FaceswapError`
            If the number of images loaded is smaller than the selected batch size
        """
        length = len(self._images)
        msg = ("Number of images is lower than batch-size (Note that too few images may lead to "
               f"bad training). # images: {length}, batch-size: {self._batch_size}")
        try:
            assert length >= self._batch_size, msg
        except AssertionError as err:
            msg += ("\nYou should increase the number of images in your training set or lower "
                    "your batch-size.")
            raise FaceswapError(msg) from err </s> remove     def check_reset(self):
        """ Check whether this cache has been reset due to a face centering change, and reset the
        flag if it has.
 </s> add     # << INTERNAL METHODS >> #
    def _validate_samples(self) -> None:
        """ Ensures that the total number of images within :attr:`images` is greater or equal to
        the selected :attr:`batch_size`. </s> remove             logger.verbose("No faces were detected in image: %s",
 </s> add             logger.verbose("No faces were detected in image: %s",  # type: ignore </s> remove             logger.trace("Reloading image: '%s'", filename)
 </s> add             logger.trace("Reloading image: '%s'", filename)  # type: ignore
                logger.trace("Removing image: '%s' due to previously existing",  # type: ignore
                             filename)
                  skip_list.append(idx)
              # Items may be in the alignments file if skip-existing[-faces] is selected
              elif os.path.basename(filename) in self._alignments.data:
                  self._existing_count += 1
                logger.trace("Removing image: '%s' due to previously existing",  # type: ignore
                             filename)
                  skip_list.append(idx)
          if self._existing_count != 0:
              logger.info("Skipping %s frames due to skip_existing/skip_existing_faces.",
                          self._existing_count)
          logger.debug("Adding skip list: %s", skip_list)
keep keep keep keep replace keep keep keep keep keep
 Data Augmentation update (#1263)

- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor 
scripts/extract.py