              mask = BlurMask(self._blur["type"],
                              mask,
                              self._blur["kernel"],
                              passes=self._blur["passes"]).blurred
          if self._sub_crop["size"]:  # Crop the mask to the given centering
              out = np.zeros((self._sub_crop["size"], self._sub_crop["size"], 1), dtype=mask.dtype)
              slice_in, slice_out = self._sub_crop["slice_in"], self._sub_crop["slice_out"]
              out[slice_out[0], slice_out[1], :] = mask[slice_in[0], slice_in[1], :]
              mask = out
          logger.trace("mask shape: %s", mask.shape)
          return mask
  
 
</s> remove         logger.trace("mask shape: %s", mask.shape)
 </s> add         logger.trace("mask shape: %s", mask.shape)  # type: ignore </s> remove             mask = np.float32(mask) / 255.
        return mask

    def _crop_to_coverage(self, mask: np.ndarray) -> np.ndarray:
        """ Crop the mask to the correct dimensions based on coverage ratio.

        Parameters
        ----------
        mask: :class:`numpy.ndarray`
            The original mask to be cropped

        Returns
        -------
        :class:`numpy.ndarray`
            The cropped mask
        """
        if self._coverage_ratio == 1.0:
            return mask
        mask_size = mask.shape[0]
        padding = round((mask_size * (1 - self._coverage_ratio)) / 2)
        mask_slice = slice(padding, mask_size - padding)
        mask = mask[mask_slice, mask_slice, :]
        logger.trace("mask_size: %s, coverage: %s, padding: %s, final shape: %s",  # type: ignore
                     mask_size, self._coverage_ratio, padding, mask.shape)
        return mask
 </s> add             face_mask = face_mask.astype("float32") / 255.
        return face_mask </s> remove                      "sub_crop_offset: %s, centering: '%s', predicted_mask: %s",
                     detected_face, sub_crop_offset, centering, predicted_mask is not None)
        mask = self._get_mask(detected_face, predicted_mask, centering, sub_crop_offset)
 </s> add                      "source_offset: %s, target_offset: %s, centering: '%s', predicted_mask: %s",
                     detected_face, source_offset, target_offset, centering,
                     predicted_mask is not None)
        mask = self._get_mask(detected_face,
                              predicted_mask,
                              centering,
                              source_offset,
                              target_offset) </s> remove         crop_offset = (reference_face.pose.offset[self._centering] -
                       reference_face.pose.offset[mask_centering])
        mask, raw_mask = self._adjustments["mask"].run(detected_face, crop_offset, self._centering,
 </s> add         mask, raw_mask = self._adjustments["mask"].run(detected_face,
                                                       reference_face.pose.offset[mask_centering],
                                                       reference_face.pose.offset[self._centering],
                                                       self._centering, </s> remove         blur_type = self._config["type"]
 </s> add         blur_type = self._config["type"].lower()
        if self._sub_crop_size:  # Crop the mask to the given centering
            out = np.zeros((self._sub_crop_size, self._sub_crop_size, 1), dtype=mask.dtype)
            slice_in, slice_out = self._sub_crop_slices["in"], self._sub_crop_slices["out"]
              mask = BlurMask(self._blur["type"],
                              mask,
                              self._blur["kernel"],
                              passes=self._blur["passes"]).blurred
        if self._sub_crop_size:  # Crop the mask to the given centering
            out = np.zeros((self._sub_crop_size, self._sub_crop_size, 1), dtype=mask.dtype)
            slice_in, slice_out = self._sub_crop_slices["in"], self._sub_crop_slices["out"]
        if self._sub_crop_size:  # Crop the mask to the given centering
            out = np.zeros((self._sub_crop_size, self._sub_crop_size, 1), dtype=mask.dtype)
            slice_in, slice_out = self._sub_crop_slices["in"], self._sub_crop_slices["out"]
        if self._sub_crop_size:  # Crop the mask to the given centering
            out = np.zeros((self._sub_crop_size, self._sub_crop_size, 1), dtype=mask.dtype)
            slice_in, slice_out = self._sub_crop_slices["in"], self._sub_crop_slices["out"]
              out[slice_out[0], slice_out[1], :] = mask[slice_in[0], slice_in[1], :]
              mask = out
          logger.trace("mask shape: %s", mask.shape)
          return mask
  
keep keep keep keep replace replace replace keep keep keep keep keep
 lib.detected_face.Mask
  - Add source + target offset and coverage to set_sub_crop method 
lib/align/detected_face.py