          dict
              The side ("a" or "b") as key, :class:`~lib.training_data.TrainingDataGenerator` as
              value.
          """
          retval = {}
          for idx, side in enumerate(("a", "b")):
              logger.debug("Setting preview feed: (side: '%s')", side)
              preview_images = self._config.get("preview_images", 14)
              preview_images = min(max(preview_images, 2), 16)
              batchsize = min(len(self._images[side]), preview_images)
              retval[side] = self._load_generator(idx).minibatch_ab(self._images[side],
 
</s> remove             preview_images = self._config.get("preview_images", 14)
 </s> add             preview_images = int(self._config.get("preview_images", 14)) </s> remove             The side ("a" or "b") as key, :class:`~lib.training_data.TrainingDataGenerator` as
 </s> add             The side ("a" or "b") as key, :class:`~lib.training_data.PreviewDataGenerator` as </s> remove             retval[side] = self._load_generator(idx).minibatch_ab(self._images[side],
                                                                  batchsize,
                                                                  side,
                                                                  do_shuffle=True,
                                                                  is_preview=True)
        logger.debug("Set preview feed. Batchsize: %s", batchsize)
 </s> add             retval[side] = self._load_generator(side,
                                                True,
                                                batch_size=batchsize).minibatch_ab() </s> remove         num_images = self._config.get("preview_images", 14)
        num_images = min(batch_size, num_images) if batch_size is not None else num_images
        retval = {}
        for side in ("a", "b"):
 </s> add         num_images = min(image_count, int(self._config.get("preview_images", 14)))
        retval: Dict[Literal["a", "b"], List[np.ndarray]] = {}
        for side in get_args(Literal["a", "b"]): </s> remove         for idx, side in enumerate(("a", "b")):
            self._display_feeds["timelapse"][side] = self._load_generator(idx).minibatch_ab(
                images[side][:batch_size],
                batch_size,
                side,
                do_shuffle=False,
                is_timelapse=True)
 </s> add         # MyPy can't recurse into nested dicts to get the type :(
        iterator = cast(Dict[Literal["a", "b"], Generator[BatchType, None, None]],
                        self._display_feeds["timelapse"])

        for side in get_args(Literal["a", "b"]):
            imgs = images[side]
            logger.debug("Setting preview feed: (side: '%s', images: %s)", side, len(imgs))

            iterator[side] = self._load_generator(side,
                                                  True,
                                                  batch_size=batch_size,
                                                  images=imgs).minibatch_ab()
        retval: Dict[Literal["a", "b"], Generator[BatchType, None, None]] = {}
        for side in get_args(Literal["a", "b"]):
          dict
              The side ("a" or "b") as key, :class:`~lib.training_data.TrainingDataGenerator` as
              value.
          """
        retval: Dict[Literal["a", "b"], Generator[BatchType, None, None]] = {}
        for side in get_args(Literal["a", "b"]):
        retval: Dict[Literal["a", "b"], Generator[BatchType, None, None]] = {}
        for side in get_args(Literal["a", "b"]):
              logger.debug("Setting preview feed: (side: '%s')", side)
              preview_images = self._config.get("preview_images", 14)
              preview_images = min(max(preview_images, 2), 16)
              batchsize = min(len(self._images[side]), preview_images)
              retval[side] = self._load_generator(idx).minibatch_ab(self._images[side],
keep keep keep keep replace 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 
plugins/train/trainer/_base.py