mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-21 01:20:50 -08:00
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.
This commit is contained in:
parent
ac08562854
commit
cfcadeae9a
2 changed files with 26 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue