Download modules/paths_internal.py from coding-alt/stable-diffusion-webui: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/coding-alt/stable-diffusion-webui/resolve/25c4c044341127cd0fc3d4be199d4cf24a883090/modules/paths_internal.py
- Command line
-
hf download hf://coding-alt/stable-diffusion-webui@25c4c044341127cd0fc3d4be199d4cf24a883090/modules/paths_internal.py
-
curl -L -o paths_internal.py https://huggingface.co/coding-alt/stable-diffusion-webui/resolve/25c4c044341127cd0fc3d4be199d4cf24a883090/modules/paths_internal.py
1.12 kB
| """this module defines internal paths used by program and is safe to import before dependencies are installed in launch.py""" | |
| import argparse | |
| import os | |
| script_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) | |
| sd_configs_path = os.path.join(script_path, "configs") | |
| sd_default_config = os.path.join(sd_configs_path, "v1-inference.yaml") | |
| sd_model_file = os.path.join(script_path, 'model.ckpt') | |
| default_sd_model_file = sd_model_file | |
| # Parse the --data-dir flag first so we can use it as a base for our other argument default values | |
| parser_pre = argparse.ArgumentParser(add_help=False) | |
| parser_pre.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_pre.parse_known_args()[0] | |
| data_path = cmd_opts_pre.data_dir | |
| models_path = os.path.join(data_path, "models") | |
| extensions_dir = os.path.join(data_path, "extensions") | |
| extensions_builtin_dir = os.path.join(script_path, "extensions-builtin") | |
| config_states_dir = os.path.join(script_path, "config_states") | |