          :class:`numpy.ndarray`
              The swapped face with the requested mask added to the Alpha channel
          """
          logger.trace("Getting mask. Image shape: %s", new_face.shape)
          if self._centering == "legacy":
              crop_offset = reference_face.pose.offset["face"] * -1
          else:
              crop_offset = np.array((0, 0))
          mask, raw_mask = self._adjustments["mask"].run(detected_face, crop_offset, predicted_mask)
          if new_face.shape[2] == 4:
              logger.trace("Combining mask with alpha channel box mask")
 
</s> remove         mask = self._get_mask(detected_face, predicted_mask, sub_crop_offset)
 </s> add         mask = self._get_mask(detected_face, predicted_mask, centering, sub_crop_offset) </s> remove     def _get_mask(self, detected_face, predicted_mask, sub_crop_offset):
 </s> add     def _get_mask(self, detected_face, predicted_mask, centering, sub_crop_offset): </s> remove         if self._extract_version > 1.0 and self._centering == "legacy":
            mask.set_sub_crop(self._cache[key]["aligned_face"].pose.offset["face"] * -1)
 </s> add         mask.set_sub_crop(self._cache[key]["aligned_face"].pose.offset[mask.stored_centering] * -1,
                          self._centering) </s> remove     def add_mask(self, name, mask, affine_matrix, interpolator, storage_size=128):
 </s> add     def add_mask(self, name, mask, affine_matrix, interpolator,
                 storage_size=128, storage_centering="face"): </s> remove                 centering = "legacy" if self._alignments.version == 1.0 else "face"
 </s> add                 centering = "legacy" if self._alignments.version == 1.0 else mask.stored_centering
        mask_centering = detected_face.mask[self._args.mask_type].stored_centering
        if self._centering != mask_centering:
            crop_offset = reference_face.pose.offset[mask_centering] * -1
          :class:`numpy.ndarray`
              The swapped face with the requested mask added to the Alpha channel
          """
          logger.trace("Getting mask. Image shape: %s", new_face.shape)
        mask_centering = detected_face.mask[self._args.mask_type].stored_centering
        if self._centering != mask_centering:
            crop_offset = reference_face.pose.offset[mask_centering] * -1
        mask_centering = detected_face.mask[self._args.mask_type].stored_centering
        if self._centering != mask_centering:
            crop_offset = reference_face.pose.offset[mask_centering] * -1
          else:
              crop_offset = np.array((0, 0))
          mask, raw_mask = self._adjustments["mask"].run(detected_face, crop_offset, predicted_mask)
          if new_face.shape[2] == 4:
              logger.trace("Combining mask with alpha channel box mask")
keep keep keep keep replace replace keep keep keep keep keep
 Add support for different mask centering types 
lib/convert.py