          face = DetectedFace()
          face.from_alignment(alignment)
          new_filename = f"{os.path.splitext(source_info['source_filename'])[0]}_{new_index}.png"
  
          logger.trace("Updating png header for '%s': (face index from %s to %s, original filename "
                       "from '%s' to '%s'", face_path, source_info["face_index"], new_index,
                       source_info["original_filename"], new_filename)
  
          source_info["face_index"] = new_index
          source_info["original_filename"] = new_filename
          meta = dict(alignments=face.to_png_meta(), source=source_info)
          update_existing_metadata(face_path, meta)
 
</s> remove     def _sort_alignments(self, alignments: dict) -> dict:
 </s> add     def _sort_alignments(self,
                         alignments: Dict[str, Dict[str, List[Tuple[int,
                                                               AlignmentFileDict,
                                                               str,
                                                               dict]]]]
                         ) -> Dict[str, Dict[str, List[AlignmentFileDict]]] : </s> remove         logger.trace("Annotating frame: '%s'", frame_name)
 </s> add         logger.trace("Annotating frame: '%s'", frame_name)  # type:ignore </s> remove             logger.trace("Updating mask centering for frame '%s', face index: %s, version: %s",
                         frame_name, face_index, version)
 </s> add             logger.trace("Updating mask centering for frame '%s', face index: %s, "  # type:ignore
                         "version: %s", frame_name, face_index, version) </s> remove                 logger.trace("Adding image '%s' to skip list due to extract_every_n = %s",
                             item["frame_fullname"], skip_num)
 </s> add                 logger.trace("Adding image '%s' to skip list due to "  # type:ignore
                             "extract_every_n = %s", item["frame_fullname"], skip_num) </s> remove         d_align = {}
 </s> add         d_align: Dict[str, Dict[str, List[Tuple[int, AlignmentFileDict, str, dict]]]] = {}
        logger.trace("Updating png header for '%s': (face index from %s to %s, "  # type:ignore
                     "original filename from '%s' to '%s'", face_path, source_info["face_index"],
                     new_index, source_info["original_filename"], new_filename)
          face = DetectedFace()
          face.from_alignment(alignment)
          new_filename = f"{os.path.splitext(source_info['source_filename'])[0]}_{new_index}.png"
  
        logger.trace("Updating png header for '%s': (face index from %s to %s, "  # type:ignore
                     "original filename from '%s' to '%s'", face_path, source_info["face_index"],
                     new_index, source_info["original_filename"], new_filename)
        logger.trace("Updating png header for '%s': (face index from %s to %s, "  # type:ignore
                     "original filename from '%s' to '%s'", face_path, source_info["face_index"],
                     new_index, source_info["original_filename"], new_filename)
        logger.trace("Updating png header for '%s': (face index from %s to %s, "  # type:ignore
                     "original filename from '%s' to '%s'", face_path, source_info["face_index"],
                     new_index, source_info["original_filename"], new_filename)
  
          source_info["face_index"] = new_index
          source_info["original_filename"] = new_filename
          meta = dict(alignments=face.to_png_meta(), source=source_info)
          update_existing_metadata(face_path, meta)
keep keep keep keep replace replace replace keep keep keep keep keep
 Bugfix: Alignments tool - don't error on from-faces job 
tools/alignments/jobs.py