          This could be quicker if parellizing in threads, however, Windows (at least) does not seem
          to like this and has a tendency to throw permission errors, so this remains single threaded
          for now.
          """
          items = cast(Dict[str, List[int]], self._items.items)
          srcs = [(x[0], x[1]["source"])
                  for x in cast(List[Tuple[str, "PNGHeaderDict"]], self._items.file_list_sorted)]
          to_update = [  # Items whose face index has changed
              x for x in srcs
              if x[1]["face_index"] != items[x[1]["source_filename"]].index(x[1]["face_index"])]
 
</s> remove                 for x in cast(List[Tuple[str, "PNGHeaderDict"]], self._items.file_list_sorted)]
 </s> add                 for x in T.cast(list[tuple[str, "PNGHeaderDict"]], self._items.file_list_sorted)] </s> remove         items = cast(Dict[str, List[int]], self._items.items)
 </s> add         items = T.cast(dict[str, list[int]], self._items.items) </s> remove         filelist = cast(List[Tuple[str, "PNGHeaderDict"]], self._faces.file_list_sorted)
 </s> add         filelist = T.cast(list[tuple[str, "PNGHeaderDict"]], self._faces.file_list_sorted) </s> remove         min_scale = min(1.0, min(min_scales))
 </s> add         min_scale = min(1.0, *min_scales) </s> remove         bins: List[List[str]] = [[] for _ in range(self._num_bins)]
 </s> add         bins: list[list[str]] = [[] for _ in range(self._num_bins)]
        items = T.cast(dict[str, list[int]], self._items.items)
          This could be quicker if parellizing in threads, however, Windows (at least) does not seem
          to like this and has a tendency to throw permission errors, so this remains single threaded
          for now.
          """
        items = T.cast(dict[str, list[int]], self._items.items)
          srcs = [(x[0], x[1]["source"])
                  for x in cast(List[Tuple[str, "PNGHeaderDict"]], self._items.file_list_sorted)]
          to_update = [  # Items whose face index has changed
              x for x in srcs
              if x[1]["face_index"] != items[x[1]["source_filename"]].index(x[1]["face_index"])]
keep keep keep keep replace keep keep keep keep keep
 Rebase code (#1326)

* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test 
tools/alignments/jobs_faces.py