              if selection not in ("1", "2", "3", "4"):
                  print(f"'{selection}' is not a valid selection. Please try again")
                  continue
              break
          fs_backend = self._backends[selection].lower()
          config = {"backend": fs_backend}
          with open(self._config_file, "w", encoding="utf8") as cnf:
              json.dump(config, cnf)
          print(f"Faceswap config written to: {self._config_file}")
          return fs_backend
 
</s> remove _FS_BACKEND = _Backend().backend
 </s> add _FS_BACKEND: ValidBackends = _Backend().backend </s> remove         fs_backend = config.get("backend", None)
        if fs_backend is None or fs_backend.lower() not in self._backends.values():
 </s> add         fs_backend = config.get("backend", "").lower()
        if not fs_backend or fs_backend not in self._backends.values(): </s> remove         return fs_backend.lower()
 </s> add         return fs_backend </s> remove             fs_backend = os.environ["FACESWAP_BACKEND"].lower()
 </s> add             fs_backend = cast(ValidBackends, os.environ["FACESWAP_BACKEND"].lower())
            assert fs_backend in get_args(ValidBackends), (
                f"Faceswap backend must be one of {get_args(ValidBackends)}") </s> remove         return None
 </s> add         return ""
        fs_backend = cast(ValidBackends, self._backends[selection].lower())
              if selection not in ("1", "2", "3", "4"):
                  print(f"'{selection}' is not a valid selection. Please try again")
                  continue
              break
        fs_backend = cast(ValidBackends, self._backends[selection].lower())
          config = {"backend": fs_backend}
          with open(self._config_file, "w", encoding="utf8") as cnf:
              json.dump(config, cnf)
          print(f"Faceswap config written to: {self._config_file}")
          return fs_backend
keep keep keep keep replace keep keep keep keep keep
 lib.Utils - add DPI detector 
lib/utils.py