"extra_options_txt2img":shared.OptionInfo([],"Options in main UI - txt2img",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that also appear in txt2img interfaces").needs_reload_ui(),
"extra_options_img2img":shared.OptionInfo([],"Options in main UI - img2img",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that also appear in img2img interfaces").needs_reload_ui(),
"extra_options_cols":shared.OptionInfo(1,"Options in main UI - number of columns",gr.Number,{"precision":0}).needs_reload_ui(),
"extra_options_accordion":shared.OptionInfo(False,"Options in main UI - place into an accordion").needs_reload_ui()
shared.options_templates.update(shared.options_section(('settings_in_ui',"Settings in UI","ui"),{
"settings_in_ui":shared.OptionHTML("""
This page allows you to add some settings to the main interface of txt2img and img2img tabs.
"""),
"extra_options_txt2img":shared.OptionInfo([],"Settings for txt2img",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that also appear in txt2img interfaces").needs_reload_ui(),
"extra_options_img2img":shared.OptionInfo([],"Settings for img2img",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that also appear in img2img interfaces").needs_reload_ui(),
"extra_options_cols":shared.OptionInfo(1,"Number of columns for added settings",gr.Number,{"precision":0}).needs_reload_ui(),
"extra_options_accordion":shared.OptionInfo(False,"Place added settings into an accordion").needs_reload_ui()
"sd_hypernetwork":OptionInfo("None","Add hypernetwork to prompt",gr.Dropdown,lambda:{"choices":["None",*shared.hypernetworks]},refresh=shared_items.reload_hypernetworks),
"gradio_theme":OptionInfo("Default","Gradio theme",ui_components.DropdownEditable,lambda:{"choices":["Default"]+shared_gradio_themes.gradio_hf_hub_themes}).info("you can also manually enter any of themes from the <a href='https://huggingface.co/spaces/gradio/theme-gallery'>gallery</a>.").needs_reload_ui(),
"gradio_themes_cache":OptionInfo(True,"Cache gradio themes locally").info("disable to update the selected Gradio theme"),
"gallery_height":OptionInfo("","Gallery height",gr.Textbox).info("an be any valid CSS value").needs_reload_ui(),
"return_grid":OptionInfo(True,"Show grid in results for web"),
"do_not_show_images":OptionInfo(False,"Do not show any images in results for web"),
"send_seed":OptionInfo(True,"Send seed when sending prompt or image to other interface"),
"send_size":OptionInfo(True,"Send size when sending prompt or image to another interface"),
"js_modal_lightbox":OptionInfo(True,"Enable full page image viewer"),
"js_modal_lightbox_initially_zoomed":OptionInfo(True,"Show images zoomed in by default in full page image viewer"),
"js_modal_lightbox_gamepad":OptionInfo(False,"Navigate image viewer with gamepad"),
"js_modal_lightbox_gamepad_repeat":OptionInfo(250,"Gamepad repeat period, in milliseconds"),
"show_progress_in_title":OptionInfo(True,"Show generation progress in window title."),
"keyedit_precision_attention":OptionInfo(0.1,"Precision for (attention:1.1) when editing the prompt with Ctrl+up/down",gr.Slider,{"minimum":0.01,"maximum":0.2,"step":0.001}),
"keyedit_precision_extra":OptionInfo(0.05,"Precision for <extra networks:0.9> when editing the prompt with Ctrl+up/down",gr.Slider,{"minimum":0.01,"maximum":0.2,"step":0.001}),
"keyedit_delimiters":OptionInfo(r".,\/!?%^*;:{}=`~() ","Word delimiters when editing the prompt with Ctrl+up/down"),
"compact_prompt_box":OptionInfo(False,"Compact prompt layout").info("puts prompt and negative prompt inside the Generate tab, leaving more vertical space for the image on the right").needs_reload_ui(),
"samplers_in_dropdown":OptionInfo(True,"Use dropdown for sampler selection instead of radio group").needs_reload_ui(),
"dimensions_and_batch_together":OptionInfo(True,"Show Width/Height and Batch sliders in same row").needs_reload_ui(),
"keyedit_precision_attention":OptionInfo(0.1,"Ctrl+up/down precision when editing (attention:1.1)",gr.Slider,{"minimum":0.01,"maximum":0.2,"step":0.001}),
"keyedit_precision_extra":OptionInfo(0.05,"Ctrl+up/down precision when editing <extra networks:0.9>",gr.Slider,{"minimum":0.01,"maximum":0.2,"step":0.001}),
"keyedit_delimiters":OptionInfo(r".,\/!?%^*;:{}=`~() ","Ctrl+up/down word delimiters"),
"quicksettings_list":OptionInfo(["sd_model_checkpoint"],"Quicksettings list",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that appear at the top of page rather than in settings tab").needs_reload_ui(),
"sd_checkpoint_dropdown_use_short":OptionInfo(False,"Checkpoint dropdown: use filenames without paths").info("models in subdirectories like photo/sd15.ckpt will be listed as just sd15.ckpt"),
"hires_fix_show_sampler":OptionInfo(False,"Hires fix: show hires checkpoint and sampler selection").needs_reload_ui(),
"hires_fix_show_prompts":OptionInfo(False,"Hires fix: show hires prompt and negative prompt").needs_reload_ui(),
"txt2img_settings_accordion":OptionInfo(False,"Settings in txt2img hidden under Accordion").needs_reload_ui(),
"img2img_settings_accordion":OptionInfo(False,"Settings in img2img hidden under Accordion").needs_reload_ui(),
"compact_prompt_box":OptionInfo(False,"Compact prompt layout").info("puts prompt and negative prompt inside the Generate tab, leaving more vertical space for the image on the right").needs_reload_ui(),
"quicksettings_list":OptionInfo(["sd_model_checkpoint"],"Quicksettings list",ui_components.DropdownMulti,lambda:{"choices":list(shared.opts.data_labels.keys())}).js("info","settingsHintsShowQuicksettings").info("setting entries that appear at the top of page rather than in settings tab").needs_reload_ui(),
"ui_reorder_list":OptionInfo([],"UI item order for txt2img/img2img tabs",ui_components.DropdownMulti,lambda:{"choices":list(shared_items.ui_reorder_categories())}).info("selected items appear first").needs_reload_ui(),
"gradio_theme":OptionInfo("Default","Gradio theme",ui_components.DropdownEditable,lambda:{"choices":["Default"]+shared_gradio_themes.gradio_hf_hub_themes}).info("you can also manually enter any of themes from the <a href='https://huggingface.co/spaces/gradio/theme-gallery'>gallery</a>.").needs_reload_ui(),
"gradio_themes_cache":OptionInfo(True,"Cache gradio themes locally").info("disable to update the selected Gradio theme"),
"show_progress_in_title":OptionInfo(True,"Show generation progress in window title."),
"send_seed":OptionInfo(True,"Send seed when sending prompt or image to other interface"),
"send_size":OptionInfo(True,"Send size when sending prompt or image to another interface"),