          num_images = (frame_dims[0] // thumbnail_size) * (frame_dims[1] // thumbnail_size)
          logger.debug("num_images: %s", num_images)
          if num_images == 0:
              return False
          samples: List[np.ndarray] = []
          start_idx = len(image_files) - num_images if len(image_files) > num_images else 0
          show_files = sorted(image_files, key=os.path.getctime)[start_idx:]
          dropped_files = []
          for fname in show_files:
              try:
 
</s> remove         retval: T.Dict[Literal["a", "b"], T.List[np.ndarray]] = {}
        for side in get_args(Literal["a", "b"]):
 </s> add         retval: dict[T.Literal["a", "b"], list[np.ndarray]] = {}
        for side in T.get_args(T.Literal["a", "b"]): </s> remove         data = [(f"file{idx}.png", dict(source=dict(source_filename=f"src{idx // 2}.png",
                                                    face_index=0 if idx % 2 == 0 else 1)))
 </s> add         data = [(f"file{idx}.png", {"source": {"source_filename": f"src{idx // 2}.png",
                                               "face_index": 0 if idx % 2 == 0 else 1}}) </s> remove         phases: List[List[str]] = []
        current_phase: List[str] = []
        available = cast(int, self._vram_stats["vram_free"])
 </s> add         phases: list[list[str]] = []
        current_phase: list[str] = []
        available = T.cast(int, self._vram_stats["vram_free"]) </s> remove         for side in get_args(Literal["a", "b"]):
 </s> add         for side in T.get_args(T.Literal["a", "b"]): </s> remove         retval: T.Dict[Literal["a", "b"], T.Generator[BatchType, None, None]] = {}
 </s> add         retval: dict[T.Literal["a", "b"], Generator[BatchType, None, None]] = {}
        samples: list[np.ndarray] = []
          num_images = (frame_dims[0] // thumbnail_size) * (frame_dims[1] // thumbnail_size)
          logger.debug("num_images: %s", num_images)
          if num_images == 0:
              return False
        samples: list[np.ndarray] = []
          start_idx = len(image_files) - num_images if len(image_files) > num_images else 0
          show_files = sorted(image_files, key=os.path.getctime)[start_idx:]
          dropped_files = []
          for fname in show_files:
              try:
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 
lib/gui/utils/image.py