diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-17 15:56:14 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-07-17 15:56:22 +0000 |
commit | 699108bfbb05c2a7d2ee4a2c7abcfaa0a244d8ea (patch) | |
tree | ce0373b2bd14f507bb3c42c545727c4ebc9213c0 /modules/sd_models.py | |
parent | f97e35929bece737ed00ebf34c6c528158af9801 (diff) | |
download | stable-diffusion-webui-gfx803-699108bfbb05c2a7d2ee4a2c7abcfaa0a244d8ea.tar.gz stable-diffusion-webui-gfx803-699108bfbb05c2a7d2ee4a2c7abcfaa0a244d8ea.tar.bz2 stable-diffusion-webui-gfx803-699108bfbb05c2a7d2ee4a2c7abcfaa0a244d8ea.zip |
hide cards for networks of incompatible stable diffusion version in Lora extra networks interface
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 729f03d7..4d9382dd 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -290,6 +290,9 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
model.is_sdxl = hasattr(model, 'conditioner')
+ model.is_sd2 = not model.is_sdxl and hasattr(model.cond_stage_model, 'model')
+ model.is_sd1 = not model.is_sdxl and not model.is_sd2
+
if model.is_sdxl:
sd_models_xl.extend_sdxl(model)
|