          try:
              for side, batcher in self.batchers.items():
                  if self.pingpong.active and side != self.pingpong.side:
                      continue
                  loss[side] = batcher.train_one_batch()
                  if not do_preview and not do_timelapse:
                      continue
                  if do_preview:
                      batcher.generate_preview(do_preview)
                      self.samples.images[side] = batcher.compile_sample(None)
 
</s> remove                     batcher.generate_preview(do_preview)
 </s> add  </s> remove             self.masks = None
 </s> add  </s> remove         if self._training_opts["warp_to_landmarks"]:
 </s> add         if self._mask_class or to_landmarks: </s> remove         if not self.is_legacy or not self.predict:
 </s> add         if not self.is_legacy: </s> remove         # Random Warp # TODO change masks to have a input mask and a warped target mask
        processed["feed"] = [self._processing.warp(batch[..., :3],
                                                   self._training_opts["warp_to_landmarks"],
                                                   **warp_kwargs)]
 </s> add         # Random Warp
        if to_landmarks:
            warp_kwargs = dict(batch_src_points=batch_src_pts,
                               batch_dst_points=self._get_closest_match(filenames,
                                                                        side,
                                                                        batch_src_pts))
        else:
            warp_kwargs = dict()
        processed["feed"] = self._processing.warp(batch[..., :3], to_landmarks, **warp_kwargs)
                loss[side] = batcher.train_one_batch(do_preview)
          try:
              for side, batcher in self.batchers.items():
                  if self.pingpong.active and side != self.pingpong.side:
                      continue
                loss[side] = batcher.train_one_batch(do_preview)
                  if not do_preview and not do_timelapse:
                      continue
                  if do_preview:
                      batcher.generate_preview(do_preview)
                      self.samples.images[side] = batcher.compile_sample(None)
keep keep keep keep replace keep keep keep keep keep
 Serialize masks to alignments file

- Add new serializers (npy + compressed)
- Remove Serializer option from cli
- Revert get_aligned call in scripts/extract
- Default alignments to compressed
- Size masks to 128px and compress
- Remove mask thresholding/blur from generation code
- Add Mask class to lib/faces_detect
- Revert debug landmarks to aligned face
- Revert non-extraction code to staging version 
plugins/train/trainer/_base.py