              The extracted face at the given size, with the given coverage of the given dtype or
              ``None`` if no image has been provided.
          """
          if image is None:
              logger.debug("_extract_face called without a loaded image. Returning empty face.")
              return None
  
          if self._is_aligned and self._centering != "head":  # Crop out the sub face from full head
              image = self._convert_centering(image)
  
 
</s> remove                     try:
                        detected_face = self._add_aligned_face(filename,
                                                               meta["alignments"],
                                                               batch.shape[1])
                    except IndexError:
                        logger.error("You have hit a bug being actively tracked by the devs")
                        logger.error("Please provide the crash report so that they can diagnose.")
                        logger.debug("Error: filename: %s, needs_cache: %s, meta: %s",
                                     filename, needs_cache, meta)
                        logger.debug("Error: Batch shape: %s", batch.shape)
                        if len(batch.shape) == 1:
                            logger.debug("Mismatch batch shapes? Shapes: %s",
                                         [b.shape for b in batch])
                        raise
 </s> add                     detected_face = self._add_aligned_face(filename,
                                                           meta["alignments"],
                                                           batch.shape[1])
            logger.trace("_extract_face called without a loaded image. Returning empty face.")
              The extracted face at the given size, with the given coverage of the given dtype or
              ``None`` if no image has been provided.
          """
          if image is None:
            logger.trace("_extract_face called without a loaded image. Returning empty face.")
              return None
  
          if self._is_aligned and self._centering != "head":  # Crop out the sub face from full head
              image = self._convert_centering(image)
  
keep keep keep keep replace keep keep keep keep keep
 lib.training.generator - Catch mismatched image sizes in training folder 
lib/align/aligned_face.py