          -------
          class: Faceswap Script
              The uninitialized script from the faceswap scripts folder.
          """
          self._test_for_tf_version()
          self._test_for_gui()
          cmd = os.path.basename(sys.argv[0])
          src = f"tools.{self._command.lower()}" if cmd == "tools.py" else "scripts"
          mod = ".".join((src, self._command.lower()))
 
</s> remove         if self._size is None:
            self._size = get_centered_size("legacy" if self._extract_version == 1.0 else "head",
                                           self._centering,
                                           image_size)

        detected_face = DetectedFace()
        detected_face.from_png_meta(alignments)
 </s> add         raw_faces, detected_faces = self._get_images_with_meta(filenames)
        batch = self._buffer()
        self._crop_to_coverage(filenames, raw_faces, detected_faces, batch)
        self._apply_mask(detected_faces, batch) </s> remove         if output is None:
 </s> add         if not output: </s> remove         logger.debug("Loading generator")
        input_size = self._model.model.input_shape[output_index][1]
        output_shapes = self._model.output_shapes[output_index]
        logger.debug("input_size: %s, output_shapes: %s", input_size, output_shapes)
        generator = TrainingDataGenerator(input_size,
                                          output_shapes,
                                          self._model.coverage_ratio,
                                          self._model.color_order,
                                          not self._model.command_line_arguments.no_augment_color,
                                          self._model.command_line_arguments.no_flip,
                                          self._model.command_line_arguments.no_warp,
                                          self._model.command_line_arguments.warp_to_landmarks,
                                          self._config)
        return generator

    def _set_preview_feed(self):
 </s> add         logger.debug("Loading generator, side: %s, is_display: %s,  batch_size: %s",
                     side, is_display, batch_size)
        generator = PreviewDataGenerator if is_display else TrainingDataGenerator
        retval = generator(self._config,
                           self._model,
                           side,
                           self._images[side] if images is None else images,
                           self._batch_size if batch_size is None else batch_size)
        return retval

    def _set_preview_feed(self) -> Dict[Literal["a", "b"], Generator[BatchType, None, None]]: </s> remove         full, faces = samples[:2]
 </s> add         faces, full = samples[:2]
        self._set_environment_variables()
          -------
          class: Faceswap Script
              The uninitialized script from the faceswap scripts folder.
          """
        self._set_environment_variables()
          self._test_for_tf_version()
          self._test_for_gui()
          cmd = os.path.basename(sys.argv[0])
          src = f"tools.{self._command.lower()}" if cmd == "tools.py" else "scripts"
          mod = ".".join((src, self._command.lower()))
keep keep keep add 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 
lib/cli/launcher.py