aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models_config.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-12 20:52:43 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-12 20:52:43 +0000
commitda464a3fb39ecc6ea7b22fe87271194480d8501c (patch)
treefd67d92762d0490d9d4784aaae3f2a3c2f31c6ca /modules/sd_models_config.py
parentaf081211ee93622473ee575de30fed2fd8263c09 (diff)
downloadstable-diffusion-webui-gfx803-da464a3fb39ecc6ea7b22fe87271194480d8501c.tar.gz
stable-diffusion-webui-gfx803-da464a3fb39ecc6ea7b22fe87271194480d8501c.tar.bz2
stable-diffusion-webui-gfx803-da464a3fb39ecc6ea7b22fe87271194480d8501c.zip
SDXL support
Diffstat (limited to 'modules/sd_models_config.py')
-rw-r--r--modules/sd_models_config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/sd_models_config.py b/modules/sd_models_config.py
index 96501569..2e92479a 100644
--- a/modules/sd_models_config.py
+++ b/modules/sd_models_config.py
@@ -14,6 +14,7 @@ config_sd2 = os.path.join(sd_repo_configs_path, "v2-inference.yaml")
config_sd2v = os.path.join(sd_repo_configs_path, "v2-inference-v.yaml")
config_sd2v = os.path.join(sd_xl_repo_configs_path, "sd_2_1_768.yaml")
config_sd2_inpainting = os.path.join(sd_repo_configs_path, "v2-inpainting-inference.yaml")
+config_sdxl = os.path.join(sd_xl_repo_configs_path, "sd_xl_base.yaml")
config_depth_model = os.path.join(sd_repo_configs_path, "v2-midas-inference.yaml")
config_unclip = os.path.join(sd_repo_configs_path, "v2-1-stable-unclip-l-inference.yaml")
config_unopenclip = os.path.join(sd_repo_configs_path, "v2-1-stable-unclip-h-inference.yaml")
@@ -70,7 +71,9 @@ def guess_model_config_from_state_dict(sd, filename):
diffusion_model_input = sd.get('model.diffusion_model.input_blocks.0.0.weight', None)
sd2_variations_weight = sd.get('embedder.model.ln_final.weight', None)
- if sd.get('depth_model.model.pretrained.act_postprocess3.0.project.0.bias', None) is not None:
+ if sd.get('conditioner.embedders.1.model.ln_final.weight', None) is not None:
+ return config_sdxl
+ elif sd.get('depth_model.model.pretrained.act_postprocess3.0.project.0.bias', None) is not None:
return config_depth_model
elif sd2_variations_weight is not None and sd2_variations_weight.shape[0] == 768:
return config_unclip