aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-13 18:17:50 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-13 18:17:50 +0000
commit6c5f83b19b331d51bde28c5033d13d0d64c11e54 (patch)
tree201ceae91b2cdb0dc3e49e51705cda6b7164413c /modules/sd_models.py
parentff73841c608f5f02e6352bb235d9dbf63d922990 (diff)
downloadstable-diffusion-webui-gfx803-6c5f83b19b331d51bde28c5033d13d0d64c11e54.tar.gz
stable-diffusion-webui-gfx803-6c5f83b19b331d51bde28c5033d13d0d64c11e54.tar.bz2
stable-diffusion-webui-gfx803-6c5f83b19b331d51bde28c5033d13d0d64c11e54.zip
add support for SDXL loras with te1/te2 modules
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 9e8cb3cf..07702175 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -289,7 +289,8 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer
if state_dict is None:
state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
- if hasattr(model, 'conditioner'):
+ model.is_sdxl = hasattr(model, 'conditioner')
+ if model.is_sdxl:
sd_models_xl.extend_sdxl(model)
model.load_state_dict(state_dict, strict=False)