mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2025-12-28 13:42:02 +00:00
block some settings from extra_options for txt2img/img2img (#2218)
There are various negative effects if these settings are allowed in the extra options for txt2img or img2img. This PR removes them from the extra_options lists at load time. 'sd_model_checkpoint' and 'CLIP_stop_at_last_layers' will invisibly override main UI settings, leading to confusing behaviour 'sd_vae' doesn't seem harmful, but can create an empty block in the UI section 'forge_additional_modules' causes an error that prevents the UI from loading
This commit is contained in:
parent
077933deca
commit
ecd4d28e46
@ -25,6 +25,11 @@ class ExtraOptionsSection(scripts.Script):
|
||||
extra_options = shared.opts.extra_options_img2img if is_img2img else shared.opts.extra_options_txt2img
|
||||
elem_id_tabname = "extra_options_" + ("img2img" if is_img2img else "txt2img")
|
||||
|
||||
not_allowed = ['sd_model_checkpoint', 'sd_vae', 'CLIP_stop_at_last_layers', 'forge_additional_modules']
|
||||
for na in not_allowed:
|
||||
if na in extra_options:
|
||||
extra_options.remove(na)
|
||||
|
||||
mapping = {k: v for v, k in infotext_utils.infotext_to_setting_name_mapping}
|
||||
|
||||
with gr.Blocks() as interface:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user