do not import modules.paths in launch.py

This commit is contained in:
AUTOMATIC 2023-03-12 08:58:58 +03:00
parent adf723a9b2
commit 5c9f2bbb74

View File

@ -7,9 +7,12 @@ import shlex
import platform
import argparse
import json
try:
from modules.paths import script_path, data_path
except ModuleNotFoundError:
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument("--ui-settings-file", type=str, default='config.json')
parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.realpath(__file__)))
args, _ = parser.parse_known_args(sys.argv)
script_path = os.path.dirname(__file__)
data_path = os.getcwd()
@ -257,10 +260,6 @@ def prepare_environment():
sys.argv += shlex.split(commandline_args)
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument("--ui-settings-file", type=str, help="filename to use for ui settings", default='config.json')
args, _ = parser.parse_known_args(sys.argv)
sys.argv, _ = extract_arg(sys.argv, '-f')
sys.argv, update_all_extensions = extract_arg(sys.argv, '--update-all-extensions')
sys.argv, skip_torch_cuda_test = extract_arg(sys.argv, '--skip-torch-cuda-test')