          num_images = self.config.get("preview_images", 14)
          num_images = min(batch_size, num_images) if batch_size is not None else num_images
          logger.debug("Compiling samples: (side: '%s', samples: %s)", self.side, num_images)
          images = images if images is not None else self.target
          masks = masks if masks is not None else self.masks
          samples = samples if samples is not None else self.samples
          retval = [samples[0:num_images], images[0:num_images], masks[0:num_images]]
          return retval
  
      def compile_timelapse_sample(self):
          """ Timelapse samples """
          batch = next(self.timelapse_feed)
 
</s> remove     def compile_sample(self, batch_size, samples=None, images=None, masks=None):
 </s> add     def compile_sample(self, batch_size, samples=None, images=None): </s> remove         images = batch["targets"][self.model.largest_face_index]
        masks = batch["masks"][0]
        sample = self.compile_sample(batchsize,
                                     samples=batch["samples"],
                                     images=images,
                                     masks=masks)
 </s> add         images = [batch["targets"][self.model.largest_face_index]]
        if self.use_mask:
            images = images + [batch["masks"]]
        sample = self.compile_sample(batchsize, samples=batch["samples"], images=images) </s> remove             self.masks = None
 </s> add  </s> remove         self.masks = None
 </s> add         self.mask = None
        retval = [samples[0:num_images]] if samples is not None else [self.samples[0:num_images]]
        if self.use_mask:
            retval.extend(tgt[0:num_images] for tgt in images)
        else:
            retval.extend(images[0:num_images])
          num_images = self.config.get("preview_images", 14)
          num_images = min(batch_size, num_images) if batch_size is not None else num_images
          logger.debug("Compiling samples: (side: '%s', samples: %s)", self.side, num_images)
          images = images if images is not None else self.target
        retval = [samples[0:num_images]] if samples is not None else [self.samples[0:num_images]]
        if self.use_mask:
            retval.extend(tgt[0:num_images] for tgt in images)
        else:
            retval.extend(images[0:num_images])
        retval = [samples[0:num_images]] if samples is not None else [self.samples[0:num_images]]
        if self.use_mask:
            retval.extend(tgt[0:num_images] for tgt in images)
        else:
            retval.extend(images[0:num_images])
        retval = [samples[0:num_images]] if samples is not None else [self.samples[0:num_images]]
        if self.use_mask:
            retval.extend(tgt[0:num_images] for tgt in images)
        else:
            retval.extend(images[0:num_images])
          return retval
  
      def compile_timelapse_sample(self):
          """ Timelapse samples """
          batch = next(self.timelapse_feed)
keep keep keep keep replace replace 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