Disable auto weights swap with config option

This commit is contained in:
trufty
2022-10-17 10:58:21 -04:00
committed by AUTOMATIC1111
parent cd9c6e0edf
commit 8b02662215
2 changed files with 5 additions and 0 deletions

View File

@@ -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)