      @property
      def landmarks_required(self):
          """ Return True if Landmarks are required """
          opts = self.model.training_opts
          retval = opts["warp_to_landmarks"]
          logger.debug(retval)
          return retval
  
      @property
      def use_mask(self):
 
</s> remove         retval = (self.model.training_opts.get("replicate_input_mask", False) or
                  self.model.training_opts.get("penalized_mask_loss", True))
 </s> add         retval = bool(self.model.training_opts.get("mask_type", None)) </s> remove         return self.config.get("replicate_input_mask", False)
 </s> add         return self.config.get("mask_type", None) is not None </s> remove             logger.debug("Serializer set from argument: '%s'", serializer)
            retval = get_serializer(serializer)
 </s> add             logger.debug("Returning default Pickle serializer")
            retval = get_serializer("compressed") </s> remove     logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    return _JSONSerializer()
 </s> add         retval = _JSONSerializer
    else:
        logger.warning("Unrecognized serializer: '%s'. Returning json serializer", serializer)
    logger.debug(retval)
    return retval </s> remove         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]]
 </s> add         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 = bool(opts.get("mask_type", None) or opts["warp_to_landmarks"])
      @property
      def landmarks_required(self):
          """ Return True if Landmarks are required """
          opts = self.model.training_opts
        retval = bool(opts.get("mask_type", None) or opts["warp_to_landmarks"])
          logger.debug(retval)
          return retval
  
      @property
      def use_mask(self):
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