                      raise FaceswapError(
                          f"Some of the faces being passed in from '{self.folder}' could not be "
                          f"matched to the alignments file '{self._alignments.file}'\nPlease double "
                          "check your sources and try again.")
                  sub_dict = data if self._with_alignments else data["source"]
              else:
                  sub_dict = (metadata["itxt"] if self._with_alignments
                              else metadata["itxt"]["source"])
  
              retval: Union[Tuple[str, "PNGHeaderDict"], Tuple[str, "PNGHeaderSourceDict"]]
 
</s> remove                 sub_dict = (metadata["itxt"] if self._with_alignments
                            else metadata["itxt"]["source"])
 </s> add                 sub_dict = cast("PNGHeaderDict", metadata["itxt"]) </s> remove             retval: Union[Tuple[str, "PNGHeaderDict"], Tuple[str, "PNGHeaderSourceDict"]]
            retval = (os.path.basename(fullpath), sub_dict)  # type:ignore
 </s> add             retval = (os.path.basename(fullpath), sub_dict) </s> remove         for face in cast(Union[List[Tuple[str, "PNGHeaderDict"]],
                               List[Tuple[str, "PNGHeaderSourceDict"]]],
                         self.file_list_sorted):
            src: "PNGHeaderSourceDict" = cast(
                "PNGHeaderDict",
                face[1])["source"] if self._with_alignments else cast("PNGHeaderSourceDict",
                                                                      face[1])
 </s> add         for face in cast(List[Tuple[str, "PNGHeaderDict"]], self.file_list_sorted):
            src = face[1]["source"] </s> remove         filelist = cast(List[Tuple[str, "PNGHeaderSourceDict"]], self._items.file_list_sorted)
 </s> add  </s> remove     def __init__(self,
                 folder: str,
                 alignments: Optional[Alignments] = None,
                 with_alignments: bool = False) -> None:
 </s> add     def __init__(self, folder: str, alignments: Optional[Alignments] = None) -> None:
                sub_dict = data
                      raise FaceswapError(
                          f"Some of the faces being passed in from '{self.folder}' could not be "
                          f"matched to the alignments file '{self._alignments.file}'\nPlease double "
                          "check your sources and try again.")
                sub_dict = data
              else:
                  sub_dict = (metadata["itxt"] if self._with_alignments
                              else metadata["itxt"]["source"])
  
              retval: Union[Tuple[str, "PNGHeaderDict"], Tuple[str, "PNGHeaderSourceDict"]]
keep keep keep keep replace keep keep keep keep keep
 Alignments Tool updates
  - Copy info back to alignments file from faces 
tools/alignments/media.py