          try:
              # Ensure tensorflow doesn't pin all threads to one core when using Math Kernel Library
              os.environ["TF_MIN_GPU_MULTIPROCESSOR_COUNT"] = "4"
              os.environ["KMP_AFFINITY"] = "disabled"
              import tensorflow as tf  # pylint:disable=import-outside-toplevel
          except ImportError as err:
              if "DLL load failed while importing" in str(err):
                  msg = (
                      f"A DLL library file failed to load. Make sure that you have Microsoft Visual "
                      "C++ Redistributable (2015, 2017, 2019) installed for your machine from: "
 
</s> remove         max_ver = 2.6
 </s> add         max_ver = 2.8 </s> remove             If Tensorflow is not found, or is not between versions 2.2 and 2.6
 </s> add             If Tensorflow is not found, or is not between versions 2.2 and 2.8 </s> remove                 raise FaceswapError(msg)
 </s> add                 raise FaceswapError(msg) from err </s> remove             msg = ("The minimum supported Tensorflow is version {} but you have version {} "
                   "installed. Please upgrade Tensorflow.".format(min_ver, tf_ver))
 </s> add             msg = (f"The minimum supported Tensorflow is version {min_ver} but you have version "
                   f"{tf_ver} installed. Please upgrade Tensorflow.") </s> remove from tensorflow.core.util import event_pb2
from tensorflow.python.framework import errors_impl as tf_errors
 </s> add from tensorflow.core.util import event_pb2  # pylint:disable=no-name-in-module
from tensorflow.python.framework import (  # pylint:disable=no-name-in-module
    errors_impl as tf_errors)
            import tensorflow as tf  # noqa pylint:disable=import-outside-toplevel,unused-import
          try:
              # Ensure tensorflow doesn't pin all threads to one core when using Math Kernel Library
              os.environ["TF_MIN_GPU_MULTIPROCESSOR_COUNT"] = "4"
              os.environ["KMP_AFFINITY"] = "disabled"
            import tensorflow as tf  # noqa pylint:disable=import-outside-toplevel,unused-import
          except ImportError as err:
              if "DLL load failed while importing" in str(err):
                  msg = (
                      f"A DLL library file failed to load. Make sure that you have Microsoft Visual "
                      "C++ Redistributable (2015, 2017, 2019) installed for your machine from: "
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/cli/launcher.py