aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models_config.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-14 09:16:01 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-14 09:16:01 +0300
commit6d8dcdefa07d5f8f7e528046b0facdcc51185e60 (patch)
treec5298147907e890dc5e3094a9713f8e9a67c889e /modules/sd_models_config.py
parentdc3906185656dae75fcefe96625b1dcd0d31579c (diff)
initial SDXL refiner support
Diffstat (limited to 'modules/sd_models_config.py')
-rw-r--r--modules/sd_models_config.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/sd_models_config.py b/modules/sd_models_config.py
index 04c09ab0..8266fa39 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_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_sdxl_refiner = os.path.join(sd_xl_repo_configs_path, "sd_xl_refiner.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")
@@ -72,6 +73,8 @@ def guess_model_config_from_state_dict(sd, filename):
if sd.get('conditioner.embedders.1.model.ln_final.weight', None) is not None:
return config_sdxl
+ if sd.get('conditioner.embedders.0.model.ln_final.weight', None) is not None:
+ return config_sdxl_refiner
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: