  
      @property
      def use_mask(self):
          """ Return True if a mask has been set else false """
          return self.config.get("replicate_input_mask", False)
  
      @property
      def ae_dims(self):
          """ Set the Autoencoder Dimensions or set to default """
          retval = self.config["autoencoder_dims"]
 
</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         retval = opts["warp_to_landmarks"]
 </s> add         retval = bool(opts.get("mask_type", None) or opts["warp_to_landmarks"]) </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         targets_use_mask = self.model.training_opts["replicate_input_mask"]
        model_inputs = batch["feed"] + batch["masks"] if self.use_mask else batch["feed"]
        model_targets = batch["targets"] + batch["masks"] if targets_use_mask else batch["targets"]
        return model_inputs, model_targets
 </s> add         if self.use_mask:
            batch = [[batch["feed"], batch["masks"]], batch["targets"] + [batch["masks"]]]
        else:
            batch = [batch["feed"], batch["targets"]]
        self.generate_preview(do_preview)
        return batch </s> remove             Items should come out as: (sample, warped, targets, [mask]) """
        logger.debug("Generating targets")
 </s> add             Items should come out as: (warped, target [, mask]) """
        return self.config.get("mask_type", None) is not None
  
      @property
      def use_mask(self):
          """ Return True if a mask has been set else false """
        return self.config.get("mask_type", None) is not None
  
      @property
      def ae_dims(self):
          """ Set the Autoencoder Dimensions or set to default """
          retval = self.config["autoencoder_dims"]
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/model/dfl_sae.py