mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
Enable override_settings to take effect for hypernetworks
This commit is contained in:
parent
d7622d97f2
commit
bc60768606
@ -422,13 +422,15 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
for k, v in p.override_settings.items():
|
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)
|
res = process_images_inner(p)
|
||||||
|
|
||||||
finally:
|
finally: # restore opts to original state
|
||||||
for k, v in stored_opts.items():
|
for k, v in stored_opts.items():
|
||||||
opts.data[k] = v
|
opts.data[k] = v
|
||||||
|
if k == 'sd_hypernetwork': shared.reload_hypernetworks()
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user