diff options
Diffstat (limited to 'modules/paths.py')
-rw-r--r-- | modules/paths.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/modules/paths.py b/modules/paths.py index d991cc71..5f6474c0 100644 --- a/modules/paths.py +++ b/modules/paths.py @@ -1,16 +1,9 @@ -import argparse
import os
import sys
-import modules.safe
+from modules.paths_internal import models_path, script_path, data_path, extensions_dir, extensions_builtin_dir # noqa: F401
-script_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+import modules.safe # noqa: F401
-# Parse the --data-dir flag first so we can use it as a base for our other argument default values
-parser = argparse.ArgumentParser(add_help=False)
-parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored",)
-cmd_opts_pre = parser.parse_known_args()[0]
-data_path = cmd_opts_pre.data_dir
-models_path = os.path.join(data_path, "models")
# data_path = cmd_opts_pre.data
sys.path.insert(0, script_path)
@@ -23,7 +16,7 @@ for possible_sd_path in possible_sd_paths: sd_path = os.path.abspath(possible_sd_path)
break
-assert sd_path is not None, "Couldn't find Stable Diffusion in any of: " + str(possible_sd_paths)
+assert sd_path is not None, f"Couldn't find Stable Diffusion in any of: {possible_sd_paths}"
path_dirs = [
(sd_path, 'ldm', 'Stable Diffusion', []),
|