          fs_backend = config.get("backend", None)
          if fs_backend is None or fs_backend.lower() not in self._backends.values():
              fs_backend = self._configure_backend()
          if current_process().name == "MainProcess":
              print("Setting Faceswap backend to {}".format(fs_backend.upper()))
          return fs_backend.lower()
  
      def _configure_backend(self):
          """ Get user input to select the backend that Faceswap should use.
  
 
</s> remove             print("Setting Faceswap backend from environment variable to "
                  "{}".format(fs_backend.upper()))
 </s> add             print(f"Setting Faceswap backend from environment variable to {fs_backend.upper()}") </s> remove         print("Faceswap config written to: {}".format(self._config_file))
 </s> add         print(f"Faceswap config written to: {self._config_file}") </s> remove         with open(self._config_file, "w") as cnf:
 </s> add         with open(self._config_file, "w", encoding="utf8") as cnf: </s> remove                 print("'{}' is not a valid selection. Please try again".format(selection))
 </s> add                 print(f"'{selection}' is not a valid selection. Please try again") </s> remove         chk = Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE)
        stdout, stderr = chk.communicate()
 </s> add         with Popen("nvcc -V", shell=True, stdout=PIPE, stderr=PIPE) as chk:
            stdout, stderr = chk.communicate()
            print(f"Setting Faceswap backend to {fs_backend.upper()}")
          fs_backend = config.get("backend", None)
          if fs_backend is None or fs_backend.lower() not in self._backends.values():
              fs_backend = self._configure_backend()
          if current_process().name == "MainProcess":
            print(f"Setting Faceswap backend to {fs_backend.upper()}")
          return fs_backend.lower()
  
      def _configure_backend(self):
          """ Get user input to select the backend that Faceswap should use.
  
keep keep keep keep replace keep keep keep keep keep
 Update code to support Tensorflow versions up to 2.8 (#1213)

* Update maximum tf version in setup + requirements

* - bump max version of tf version in launcher
- standardise tf version check

* update keras get_custom_objects  for tf>2.6

* bugfix: force black text in GUI file dialogs (linux)

* dssim loss - Move to stock tf.ssim function

* Update optimizer imports for compatibility

* fix logging for tf2.8

* Fix GUI graphing for TF2.8

* update tests

* bump requirements.txt versions

* Remove limit on nvidia-ml-py

* Graphing bugfixes
  - Prevent live graph from displaying if data not yet available

* bugfix: Live graph. Collect loss labels correctly

* fix: live graph - swallow inconsistent loss errors

* Bugfix: Prevent live graph from clearing during training

* Fix graphing for AMD 
lib/utils.py