aboutsummaryrefslogtreecommitdiffstats
path: root/modules/shared.py
diff options
context:
space:
mode:
authord8ahazard <d8ahazard@gmail.com>2022-11-08 16:03:56 +0000
committerd8ahazard <d8ahazard@gmail.com>2022-11-08 16:03:56 +0000
commitcfcadeae9a61e1aff32960864f90299412c86d5c (patch)
treedf519035ab27e7cd68de38181f7deec76014fdb4 /modules/shared.py
parentac085628540d0ec6a988fad93f5b8f2154209571 (diff)
downloadstable-diffusion-webui-gfx803-cfcadeae9a61e1aff32960864f90299412c86d5c.tar.gz
stable-diffusion-webui-gfx803-cfcadeae9a61e1aff32960864f90299412c86d5c.tar.bz2
stable-diffusion-webui-gfx803-cfcadeae9a61e1aff32960864f90299412c86d5c.zip
Add option to preload extensions
By creating a file called "preload.py" in an extension folder and declaring a preload(parser) method, we can add extra command-line args for an extension.
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/shared.py b/modules/shared.py
index e8bacd3c..222ad4fb 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -15,7 +15,7 @@ import modules.memmon
import modules.sd_models
import modules.styles
import modules.devices as devices
-from modules import sd_samplers, sd_models, localization, sd_vae
+from modules import sd_samplers, sd_models, localization, sd_vae, extensions
from modules.hypernetworks import hypernetwork
from modules.paths import models_path, script_path, sd_path
@@ -91,7 +91,10 @@ parser.add_argument("--tls-keyfile", type=str, help="Partially enables TLS, requ
parser.add_argument("--tls-certfile", type=str, help="Partially enables TLS, requires --tls-keyfile to fully function", default=None)
parser.add_argument("--server-name", type=str, help="Sets hostname of server", default=None)
+extensions.preload_extensions(parser)
+
cmd_opts = parser.parse_args()
+
restricted_opts = {
"samples_filename_pattern",
"directories_filename_pattern",