              List of GPU device indices that should not be made available to Tensorflow. Pass
              ``None`` if all devices should be made available
          """
          backend = get_backend()
          if backend == "amd":
              return  # No settings for AMD
          if backend == "cpu":
              logger.verbose("Hiding GPUs from Tensorflow")  # type:ignore
              tf.config.set_visible_devices([], "GPU")
              return
  
 
</s> remove             logger.verbose("Hiding GPUs from Tensorflow")  # type:ignore
 </s> add             logger.verbose("Hiding GPUs from Tensorflow")  # type:ignore[attr-defined] </s> remove 
        Notes
        -----
        Clip-norm is ballooning VRAM usage, which is not expected behavior and may be a bug in
        Keras/Tensorflow.

        PlaidML has a bug regarding the clip-norm parameter See:
        https://github.com/plaidml/plaidml/issues/228. We workaround by simply not adding this
        parameter for AMD backend users.
 </s> add  </s> remove     def _amd_ask_enable(self) -> None:
        """ Set backend to 'amd' to use plaidML if AMD support required """
        msg = ""
        if self._env.os_version[0] == "Windows":
            msg = "AMD users should select 'DirectML support' if possible.\r\n"
        if self._env.os_version[0] == "Linux":
            msg = "AMD users should select 'ROCm support' if possible.\r\n"

        logger.info("AMD Support:\r\nThis version is deprecated and will be removed from a future "
                    "update.\r\n%s"
                    "Nvidia Users MUST answer 'no' to this option.", msg)
        i = input("Enable AMD Support? [y/N] ")
        if i in ("Y", "y"):
            logger.info("AMD Support Enabled")
            self._env.backend = "amd"

 </s> add  </s> remove         except Exception as err:
            if get_backend() == "amd":
                # pylint:disable=import-outside-toplevel
                from lib.plaidml_utils import is_plaidml_error
                if (is_plaidml_error(err) and (
                        "CL_MEM_OBJECT_ALLOCATION_FAILURE" in str(err).upper() or
                        "enough memory for the current schedule" in str(err).lower())):
                    msg = ("You do not have enough GPU memory available to run detection at "
                           "the selected batch size. You can try a number of things:"
                           "\n1) Close any other application that is using your GPU (web "
                           "browsers are particularly bad for this)."
                           "\n2) Lower the batchsize (the amount of images fed into the "
                           "model) by editing the plugin settings (GUI: Settings > Configure "
                           "extract settings, CLI: Edit the file "
                           "faceswap/config/extract.ini).")
                    raise FaceswapError(msg) from err
            raise
 </s> add  </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 
              List of GPU device indices that should not be made available to Tensorflow. Pass
              ``None`` if all devices should be made available
          """
          backend = get_backend()


          if backend == "cpu":
              logger.verbose("Hiding GPUs from Tensorflow")  # type:ignore
              tf.config.set_visible_devices([], "GPU")
              return
  
keep keep keep keep replace 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/model/_base/settings.py