          saver = ImagesSaver(str(get_folder(output_folder)), as_bytes=True)
          loader = ImagesLoader(self._input_location, count=self._alignments.frames_count)
          extension = ".png"
  
          for frame_idx, (filename, image) in enumerate(loader.load()):
              logger.trace("Outputting frame: %s: %s", frame_idx, filename)
              src_filename = os.path.basename(filename)
              frame_name = os.path.splitext(src_filename)[0]
              progress_queue.put(1)
  
 
</s> remove         saver = ImagesSaver(str(get_folder(output_folder)), as_bytes=True)
        loader = ImagesLoader(self._input_location, count=self._alignments.frames_count)
        extension = ".png"
 </s> add         _io = dict(saver=ImagesSaver(str(get_folder(output_folder)), as_bytes=True),
                   loader=ImagesLoader(self._input_location, count=self._alignments.frames_count)) </s> remove                 output = "{}_{}{}".format(frame_name, str(face_idx), extension)
 </s> add                 output = "{}_{}{}".format(frame_name, str(face_idx), ".png") </s> remove         if self._globals.filter_mode != "No Faces":
            for frame_idx, face_count in enumerate(self._detected_faces.face_count_per_index):
                if face_count <= 1 and self._globals.filter_mode == "Multiple Faces":
                    continue
                for face_idx in range(face_count):
                    frame_indices.append(frame_idx)
                    face_indices.append(face_idx)
        logger.trace("frame_indices: %s, face_indices: %s", frame_indices, face_indices)
 </s> add         face_counts = self._detected_faces.face_count_per_index  # Copy to avoid recalculations

        for frame_idx in self.frames_list:
            for face_idx in range(face_counts[frame_idx]):
                frame_indices.append(frame_idx)
                face_indices.append(face_idx)
 </s> remove         faces.extend(deepcopy(self._faces_at_frame_index(idx)))
 </s> add         # aligned_face cannot be deep copied, so remove and recreate
        to_copy = self._faces_at_frame_index(idx)
        for face in to_copy:
            face.aligned = None
        copied = deepcopy(to_copy)

        for old_face, new_face in zip(to_copy, copied):
            old_face.load_aligned(None)
            new_face.load_aligned(None)

        faces.extend(copied)
        for frame_idx, (filename, image) in enumerate(_io["loader"].load()):
          saver = ImagesSaver(str(get_folder(output_folder)), as_bytes=True)
          loader = ImagesLoader(self._input_location, count=self._alignments.frames_count)
          extension = ".png"
  
        for frame_idx, (filename, image) in enumerate(_io["loader"].load()):
              logger.trace("Outputting frame: %s: %s", frame_idx, filename)
              src_filename = os.path.basename(filename)
              frame_name = os.path.splitext(src_filename)[0]
              progress_queue.put(1)
  
keep keep keep keep replace keep keep keep keep keep
 Add Misalignment Detection
  - lib.align.AlignedFace - Add average_distance property (distance from mean_face)
  - tools.manual - Add misaligned Faces filter
  - tools.sort - Add sort by distance (misaligned sort)Add "Misaligned Faces" filter to manual tool 
tools/manual/detected_faces.py