diff --git a/faceswap.py b/faceswap.py index b8857eb697..d6aa46f4be 100755 --- a/faceswap.py +++ b/faceswap.py @@ -22,6 +22,25 @@ _PARSER = cli_args.FullHelpArgumentParser() +def _bad_args(*args) -> None: # pylint:disable=unused-argument + """ Print help to console when bad arguments are provided. """ + print(cli_args) + _PARSER.print_help() + sys.exit(0) + + +def _main() -> None: + """ The main entry point into Faceswap. + +if sys.version_info < (3, 7): + raise Exception("This program requires at least python3.7") +if get_backend() == "amd" and sys.version_info >= (3, 9): + raise Exception("The AMD version of Faceswap cannot run on versions of Python higher than 3.8") + + +_PARSER = cli_args.FullHelpArgumentParser() + + def _bad_args(*args) -> None: # pylint:disable=unused-argument """ Print help to console when bad arguments are provided. """ print(cli_args)