move option access checking to options class out of various places scattered through code

This commit is contained in:
AUTOMATIC
2022-11-04 09:42:25 +03:00
parent 26108a7f1c
commit f2b69709ea
3 changed files with 18 additions and 17 deletions

View File

@@ -418,13 +418,13 @@ 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
setattr(opts, k, v) # we don't call onchange for simplicity which makes changing model, hypernet impossible
res = process_images_inner(p)
finally:
for k, v in stored_opts.items():
opts.data[k] = v
setattr(opts, k, v)
return res