              # have created their own scripts, but these should be few and far between and those
              # people should already know what they are doing.
              return
  
          if linux_update:
              conda_libs = os.path.join(conda_prefix, "lib")
              activate = ["#!/bin/sh\n\n",
                          "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                          f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
              deactivate = ["#!/bin/sh\n\n",
                            "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                            "unset OLD_LD_LIBRARY_PATH\n"]
              logger.info("Cuda search path set to '%s'", conda_libs)
  
          if windows_update:
              activate = ["@ECHO OFF\n",
                          "set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=1\n"]
              deactivate = ["@ECHO OFF\n",
                            "set CONDA_DLL_SEARCH_MODIFICATION_ENABLE=\n"]
              logger.verbose("CONDA_DLL_SEARCH_MODIFICATION_ENABLE set to 1")  # type: ignore
  
          with open(activate_script, "w", encoding="utf8") as afile:
              afile.writelines(activate)
          with open(deactivate_script, "w", encoding="utf8") as afile:
              afile.writelines(deactivate)
 
</s> remove         ext = ".bat" if windows_update else ".sh"
        activate_script = os.path.join(conda_prefix, activate_folder, f"env_vars{ext}")
        deactivate_script = os.path.join(conda_prefix, deactivate_folder, f"env_vars{ext}")
 </s> add         activate_script = os.path.join(conda_prefix, activate_folder, "env_vars.sh")
        deactivate_script = os.path.join(conda_prefix, deactivate_folder, "env_vars.sh") </s> remove         if not linux_update and not windows_update:
 </s> add         if not linux_update: </s> remove         It is important to note that any models and sub-models should not call
        :class:`keras.models.Model` directly, but rather call
        :class:`plugins.train.model._base.KerasModel`. This acts as a wrapper for Keras' Model
        class, but handles some minor differences which need to be handled between Nvidia and AMD
        backends.

 </s> add  </s> remove         model_inputs: List[List[np.ndarray]] = []
        model_targets: List[List[np.ndarray]] = []
 </s> add         model_inputs: T.List[T.List[np.ndarray]] = []
        model_targets: T.List[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 
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
              # have created their own scripts, but these should be few and far between and those
              # people should already know what they are doing.
              return
  
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
        conda_libs = os.path.join(conda_prefix, "lib")
        activate = ["#!/bin/sh\n\n",
                    "export OLD_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}\n",
                    f"export LD_LIBRARY_PATH='{conda_libs}':${{LD_LIBRARY_PATH}}\n"]
        deactivate = ["#!/bin/sh\n\n",
                      "export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}\n",
                      "unset OLD_LD_LIBRARY_PATH\n"]
        logger.info("Cuda search path set to '%s'", conda_libs)
  
          with open(activate_script, "w", encoding="utf8") as afile:
              afile.writelines(activate)
          with open(deactivate_script, "w", encoding="utf8") as afile:
              afile.writelines(deactivate)
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace 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 
setup.py