          # Random Warp
          if self._warp_to_landmarks:
              landmarks = np.array([face.aligned.landmarks for face in detected_faces])
              batch_dst_pts = self._get_closest_match(filenames, landmarks)
              warp_kwargs = dict(batch_src_points=landmarks, batch_dst_points=batch_dst_pts)
          else:
              warp_kwargs = {}
  
          warped = batch[..., :3] if self._no_warp else self._processing.warp(
              batch[..., :3],
 
</s> remove         lm_side: Literal["a", "b"] = "a" if self._side == "b" else "b"
 </s> add         lm_side: T.Literal["a", "b"] = "a" if self._side == "b" else "b" </s> remove             detected_faces: Dict[str, ExtractMedia] = {}
 </s> add             detected_faces: dict[str, ExtractMedia] = {} </s> remove                 centering: "CenteringType" = ("legacy" if self._alignments is not None and
                                              self._alignments.version == 1.0
                                              else mask.stored_centering)
 </s> add                 centering: CenteringType = ("legacy" if self._alignments is not None and
                                            self._alignments.version == 1.0
                                            else mask.stored_centering) </s> remove         old_face = cast(np.ndarray, reference_face.face)[..., :3] / 255.0
 </s> add         old_face = T.cast(np.ndarray, reference_face.face)[..., :3] / 255.0 </s> remove         for side in get_args(Literal["a", "b"]):
 </s> add         for side in T.get_args(T.Literal["a", "b"]):
            warp_kwargs = {"batch_src_points": landmarks, "batch_dst_points": batch_dst_pts}
          # Random Warp
          if self._warp_to_landmarks:
              landmarks = np.array([face.aligned.landmarks for face in detected_faces])
              batch_dst_pts = self._get_closest_match(filenames, landmarks)
            warp_kwargs = {"batch_src_points": landmarks, "batch_dst_points": batch_dst_pts}
          else:
              warp_kwargs = {}
  
          warped = batch[..., :3] if self._no_warp else self._processing.warp(
              batch[..., :3],
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/training/generator.py