diff options
author | trufty <trufty@gmail.com> | 2022-10-17 14:58:21 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-18 11:19:06 +0000 |
commit | 8b02662215917d39f76f86b703a322818d5a8ad4 (patch) | |
tree | 79786c0e6e4634f926e2cce3296bf23d626bc35e /modules/ui.py | |
parent | cd9c6e0edf98ccd9a912f90661bd3e67ff169780 (diff) | |
download | stable-diffusion-webui-gfx803-8b02662215917d39f76f86b703a322818d5a8ad4.tar.gz stable-diffusion-webui-gfx803-8b02662215917d39f76f86b703a322818d5a8ad4.tar.bz2 stable-diffusion-webui-gfx803-8b02662215917d39f76f86b703a322818d5a8ad4.zip |
Disable auto weights swap with config option
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py index 1dae4a65..75eb0b0c 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -542,6 +542,10 @@ def apply_setting(key, value): if value is None:
return gr.update()
+ # dont allow model to be swapped when model hash exists in prompt
+ if key == "sd_model_checkpoint" and opts.disable_weights_auto_swap:
+ return gr.update()
+
if key == "sd_model_checkpoint":
ckpt_info = sd_models.get_closet_checkpoint_match(value)
|