diff options
author | zhaohu xing <920232796@qq.com> | 2022-11-29 02:28:41 +0000 |
---|---|---|
committer | zhaohu xing <920232796@qq.com> | 2022-11-29 02:28:41 +0000 |
commit | 75c4511e6b81ae8fb0dbd932043e8eb35cd09f72 (patch) | |
tree | 6f4662507be1d532a4e992f54f82d905fc450f3a /modules/shared.py | |
parent | 828438b4a190759807f9054932cae3a8b880ddf1 (diff) | |
download | stable-diffusion-webui-gfx803-75c4511e6b81ae8fb0dbd932043e8eb35cd09f72.tar.gz stable-diffusion-webui-gfx803-75c4511e6b81ae8fb0dbd932043e8eb35cd09f72.tar.bz2 stable-diffusion-webui-gfx803-75c4511e6b81ae8fb0dbd932043e8eb35cd09f72.zip |
add AltDiffusion to webui
Signed-off-by: zhaohu xing <920232796@qq.com>
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/shared.py b/modules/shared.py index c93ae2a3..9941d2f4 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -21,7 +21,7 @@ from modules.paths import models_path, script_path, sd_path sd_model_file = os.path.join(script_path, 'model.ckpt')
default_sd_model_file = sd_model_file
parser = argparse.ArgumentParser()
-parser.add_argument("--config", type=str, default=os.path.join(sd_path, "configs/stable-diffusion/v1-inference.yaml"), help="path to config which constructs model",)
+parser.add_argument("--config", type=str, default="configs/altdiffusion/ad-inference.yaml", help="path to config which constructs model",)
parser.add_argument("--ckpt", type=str, default=sd_model_file, help="path to checkpoint of stable diffusion model; if specified, this checkpoint will be added to the list of checkpoints and loaded",)
parser.add_argument("--ckpt-dir", type=str, default=None, help="Path to directory with stable diffusion checkpoints")
parser.add_argument("--gfpgan-dir", type=str, help="GFPGAN directory", default=('./src/gfpgan' if os.path.exists('./src/gfpgan') else './GFPGAN'))
@@ -106,6 +106,10 @@ restricted_opts = { "outdir_txt2img_grids",
"outdir_save",
}
+from omegaconf import OmegaConf
+config = OmegaConf.load(f"{cmd_opts.config}")
+# XLMR-Large
+text_model_name = config.model.params.cond_stage_config.params.name
cmd_opts.disable_extension_access = (cmd_opts.share or cmd_opts.listen or cmd_opts.server_name) and not cmd_opts.enable_insecure_extension_access
|