diff options
author | Billy Cao <aliencaocao@gmail.com> | 2022-11-01 15:26:55 +0000 |
---|---|---|
committer | Billy Cao <aliencaocao@gmail.com> | 2022-11-01 15:26:55 +0000 |
commit | bc607686065b8c7751d1af7c05b960378fa256de (patch) | |
tree | 773e934ba9d163c19d5c023163251d030bca5297 | |
parent | d7622d97f213897a1e8fbebdfeae983dac06b043 (diff) | |
download | stable-diffusion-webui-gfx803-bc607686065b8c7751d1af7c05b960378fa256de.tar.gz stable-diffusion-webui-gfx803-bc607686065b8c7751d1af7c05b960378fa256de.tar.bz2 stable-diffusion-webui-gfx803-bc607686065b8c7751d1af7c05b960378fa256de.zip |
Enable override_settings to take effect for hypernetworks
-rw-r--r-- | modules/processing.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/processing.py b/modules/processing.py index 57d3a523..86d015af 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -422,13 +422,15 @@ def process_images(p: StableDiffusionProcessing) -> Processed: try:
for k, v in p.override_settings.items():
- opts.data[k] = v # we don't call onchange for simplicity which makes changing model, hypernet impossible
+ opts.data[k] = v # we don't call onchange for simplicity which makes changing model impossible
+ if k == 'sd_hypernetwork': shared.reload_hypernetworks() # make onchange call for changing hypernet since it is relatively fast to load on-change, while SD models are not
res = process_images_inner(p)
- finally:
+ finally: # restore opts to original state
for k, v in stored_opts.items():
opts.data[k] = v
+ if k == 'sd_hypernetwork': shared.reload_hypernetworks()
return res
|