              logger.error("Couldn't find DFL alignments: %s", filename)
  
      @staticmethod
      def convert_dfl_alignment(dfl_alignments, f_hash, alignments):
          """ Add DFL Alignments to alignments in Faceswap format """
          sourcefile = dfl_alignments["source_filename"]
          left, top, right, bottom = dfl_alignments["source_rect"]
          alignment = {"x": left,
                       "w": right - left,
                       "y": top,
 
</s> remove         alignments.setdefault(sourcefile, list()).append(alignment)
 </s> add         alignments.setdefault(sourcefile, dict()).setdefault("faces", []).append(alignment) </s> remove         self.alignments.data = self.load_dfl()
        self.alignments.file = self.alignments.get_location(self.faces.folder, "alignments")
 </s> add         self.alignments.data_from_dfl(self.load_dfl(), self.faces.folder) </s> remove             yield frame_name, alignments, face_count, frame_fullname

    @staticmethod
    def yield_original_index_reverse(image_alignments, number_alignments):
        """ Return the correct original index for
            alignment in reverse order """
        for idx, _ in enumerate(reversed(image_alignments)):
            original_idx = number_alignments - 1 - idx
            logger.trace("Yielding: face index %s", original_idx)
            yield original_idx
 </s> add             yield frame_name, val["faces"], face_count, frame_fullname </s> remove         for alignments in self.data.values():
            for alignment in alignments:
 </s> add         for val in self._data.values():
            for alignment in val["faces"]: </s> remove         for alignments in self.data.values():
            for alignment in alignments:
 </s> add         for val in self._data.values():
            for alignment in val["faces"]:
        """ Add Deep Face Lab Alignments to alignments in Faceswap format """
              logger.error("Couldn't find DFL alignments: %s", filename)
  
      @staticmethod
      def convert_dfl_alignment(dfl_alignments, f_hash, alignments):
        """ Add Deep Face Lab Alignments to alignments in Faceswap format """
          sourcefile = dfl_alignments["source_filename"]
          left, top, right, bottom = dfl_alignments["source_rect"]
          alignment = {"x": left,
                       "w": right - left,
                       "y": top,
keep keep keep keep replace keep keep keep keep keep
 lib.alignments - Slight update (#978)

* lib.alignments update:
  - Minor structure change (faces to nested dictionary)
  - Refactor internal and external methods
  - Documentation 
tools/lib_alignments/jobs.py