                  roi = self.get_cropped_roi(self._centering)
                  head_size = self._head_size
                  slice_in = [slice(max(roi[1], 0), max(roi[3], 0)),
                              slice(max(roi[0], 0), max(roi[2], 0))]
                  slice_out = [slice(max(roi[1] * -1, 0), self._size - max(0, roi[3] - head_size)),
                               slice(max(roi[0] * -1, 0), self._size - max(0, roi[2] - head_size))]
                  self._cache["cropped_slices"][0][self._centering] = {"in": slice_in,
                                                                       "out": slice_out}
                  logger.trace("centering: %s, cropped_slices: %s",
                               self._centering, self._cache["cropped_slices"][0][self._centering])
          return self._cache["cropped_slices"][0][self._centering]
 
</s> remove                 head_size = self._head_size
 </s> add  </s> remove         self._sub_crop["slice_out"] = [slice(max(roi[1] * -1, 0),
                                             crop_size - max(0, roi[3] - self.stored_size)),
                                       slice(max(roi[0] * -1, 0),
                                             crop_size - max(0, roi[2] - self.stored_size))]
 </s> add         self._sub_crop["slice_out"] = [
            slice(max(roi[1] * -1, 0),
                  crop_size - min(crop_size, max(0, roi[3] - self.stored_size))),
            slice(max(roi[0] * -1, 0),
                  crop_size - min(crop_size, max(0, roi[2] - self.stored_size)))]
 </s> remove                 offset = self.pose.offset.get(centering, np.float32((0, 0)))  # legacy = 0,0
 </s> add                 offset = self.pose.offset.get(centering, np.float32((0, 0)))  # legacy = 0.0
                slice_out = [slice(max(roi[1] * -1, 0),
                                   self._size - min(self._size, max(0, roi[3] - self._head_size))),
                             slice(max(roi[0] * -1, 0),
                                   self._size - min(self._size, max(0, roi[2] - self._head_size)))]
                  roi = self.get_cropped_roi(self._centering)
                  head_size = self._head_size
                  slice_in = [slice(max(roi[1], 0), max(roi[3], 0)),
                              slice(max(roi[0], 0), max(roi[2], 0))]
                slice_out = [slice(max(roi[1] * -1, 0),
                                   self._size - min(self._size, max(0, roi[3] - self._head_size))),
                             slice(max(roi[0] * -1, 0),
                                   self._size - min(self._size, max(0, roi[2] - self._head_size)))]
                slice_out = [slice(max(roi[1] * -1, 0),
                                   self._size - min(self._size, max(0, roi[3] - self._head_size))),
                             slice(max(roi[0] * -1, 0),
                                   self._size - min(self._size, max(0, roi[2] - self._head_size)))]
                  self._cache["cropped_slices"][0][self._centering] = {"in": slice_in,
                                                                       "out": slice_out}
                  logger.trace("centering: %s, cropped_slices: %s",
                               self._centering, self._cache["cropped_slices"][0][self._centering])
          return self._cache["cropped_slices"][0][self._centering]
keep keep keep keep replace replace keep keep keep keep keep
 bugfix - lib.align - Fix edge case aligned face sub crop 
lib/align/aligned_face.py