              masks3 = [orig_masks, *pred_masks]
          else:
              masks3 = np.repeat(np.expand_dims(orig_masks, axis=0), 3, axis=0)
  
          retval: List[np.ndarray] = []
          alpha = 1.0 - self._mask_opacity
          for previews, compiled_masks in zip(faces, masks3):
              overlays = previews.copy()
              overlays[np.where((compiled_masks == 1.).all(axis=3))] = self._mask_color
              retval.append(np.array([cv2.addWeighted(img, alpha, ovl, self._mask_opacity, 0)
 
</s> remove         masks3: Union[List[np.ndarray], np.ndarray] = []
 </s> add         masks3: T.Union[T.List[np.ndarray], np.ndarray] = [] </s> remove         self.images: Dict[Literal["a", "b"], List[np.ndarray]] = {}
 </s> add         self.images: T.Dict[Literal["a", "b"], T.List[np.ndarray]] = {} </s> remove         if get_backend() == "amd":  # Expand out AMD inputs + targets
            model_inputs = [inp for side in model_inputs for inp in side]  # type: ignore
            model_targets = [tgt for side in model_targets for tgt in side]  # type: ignore
 </s> add  </s> remove         inputs = Input(self._input_shape)
        var_x = Conv2D(64, 3, strides=2, activation="relu", name="features.0")(inputs)
 </s> add         inputs = layers.Input(self._input_shape)
        var_x = layers.Conv2D(64, 3, strides=2, activation="relu", name="features.0")(inputs) </s> remove         predicted: List[np.ndarray] = inbound if isinstance(inbound, list) else [inbound]
 </s> add         predicted: T.List[np.ndarray] = inbound if isinstance(inbound, list) else [inbound]
        retval: T.List[np.ndarray] = []
              masks3 = [orig_masks, *pred_masks]
          else:
              masks3 = np.repeat(np.expand_dims(orig_masks, axis=0), 3, axis=0)
  
        retval: T.List[np.ndarray] = []
          alpha = 1.0 - self._mask_opacity
          for previews, compiled_masks in zip(faces, masks3):
              overlays = previews.copy()
              overlays[np.where((compiled_masks == 1.).all(axis=3))] = self._mask_color
              retval.append(np.array([cv2.addWeighted(img, alpha, ovl, self._mask_opacity, 0)
keep keep keep keep replace keep keep keep keep keep
 Remove plaidML support (#1325)

* Remove PlaidML reference from readme files

* Remove AMD option from installers

* remove amd requirements and update setup.py

* remove plaidml test from CI workflow

* gpustats: remove plaidml backend

* plaid removals:
  - faceswap.py - python version check
  - setup.cfg - plaidml typing ignore
  - lib.keras_utils - All plaid code
  - lib.launcher.py - All plaidml checks and configuration

* remove tf2.2 specific code from GUI event reader

* lib.model - remove all plaidml implementations

* plugins.extract - remove plaidml code

* plugins.train remove plaidml code

* lib.convert - remove plaidml code

* tools.model: remove plaidml code

* Remove plaidML tests from unit tests

* remove plaidml_utils and docsting cleanups

* Remove plaidML refs from configs

* fix keras imports 
plugins/train/trainer/_base.py