              logger.trace("Saving face: (frame: %s, face index: %s)", frame_name, face_index)
  
              self._alignments.update_face(frame_name, face_index, face.to_alignment())
              metadata = dict(alignments=face.to_png_meta(),
                              source=extractor_output.mask_tool_face_info)
              self._faces_saver.save(extractor_output.filename,
                                     encode_image(extractor_output.image, ".png", metadata=metadata))
  
              if self._saver is not None:
                  face.image = extractor_output.image
 
</s> remove             frame_name = extractor_output.mask_tool_face_info["source_filename"]
            face_index = extractor_output.mask_tool_face_info["face_index"]
            logger.trace("Saving face: (frame: %s, face index: %s)", frame_name, face_index)
 </s> add             frame_name = extractor_output.frame_metadata["source_filename"]
            face_index = extractor_output.frame_metadata["face_index"]
            logger.trace("Saving face: (frame: %s, face index: %s)",  # type: ignore
                         frame_name, face_index) </s> remove     def _update_frames(self, extractor_output):
 </s> add     def _update_frames(self, extractor_output: ExtractMedia) -> None: </s> remove     def _save(self, frame, idx, detected_face):
 </s> add     def _save(self, frame: str, idx: int, detected_face: DetectedFace) -> None: </s> remove     def _input_faces(self, *args):
 </s> add     def _process_face(self,
                      filename: str,
                      image: np.ndarray,
                      metadata: Dict[str, Any]) -> Optional["ExtractMedia"]:
        """ Process a single face when masking from face images

        filename: str
            the filename currently being processed
        image: :class:`numpy.ndarray`
            The current face being processed
        metadata: dict
            The source frame metadata from the PNG header

        Returns
        -------
        :class:`plugins.pipeline.ExtractMedia` or ``None``
            If the update type is 'output' then nothing is returned otherwise the extract media for
            the face is returned
        """
        frame_name = metadata["source"]["source_filename"]
        face_index = metadata["source"]["face_index"]
        alignment = self._alignments.get_faces_in_frame(frame_name)
        if not alignment or face_index > len(alignment) - 1:
            self._counts["skip"] += 1
            logger.warning("Skipping Face not found in alignments file: '%s'", filename)
            return None
        alignment = alignment[face_index]
        self._counts["face"] += 1

        if self._check_for_missing(frame_name, face_index, alignment):
            return None

        detected_face = self._get_detected_face(alignment)
        if self._update_type == "output":
            detected_face.image = image
            self._save(frame_name, face_index, detected_face)
            return None

        media = ExtractMedia(filename, image, detected_faces=[detected_face])
        media.add_frame_metadata(metadata["source"])
        self._counts["update"] += 1
        return media

    def _input_faces(self, *args: Union[tuple, Tuple["EventQueue"]]) -> None:
                            source=extractor_output.frame_metadata)
              logger.trace("Saving face: (frame: %s, face index: %s)", frame_name, face_index)
  
              self._alignments.update_face(frame_name, face_index, face.to_alignment())
              metadata = dict(alignments=face.to_png_meta(),
                            source=extractor_output.frame_metadata)
              self._faces_saver.save(extractor_output.filename,
                                     encode_image(extractor_output.image, ".png", metadata=metadata))
  
              if self._saver is not None:
                  face.image = extractor_output.image
keep keep keep keep replace keep keep keep keep keep
 Minor updates and fixups
  - Mask Tool - Typing + BiSeNet mask update fix
  - Alignments Tool - Auto search for alignments file 
tools/mask/mask.py