|
250 | 250 | "sd_hypernetwork":OptionInfo("None","Add hypernetwork to prompt",gr.Dropdown,lambda: {"choices": ["None",*shared.hypernetworks]},refresh=shared_items.reload_hypernetworks), |
251 | 251 | })) |
252 | 252 |
|
253 | | -options_templates.update(options_section(('ui',"User interface","ui"), { |
254 | | -"localization":OptionInfo("None","Localization",gr.Dropdown,lambda: {"choices": ["None"]+list(localization.localizations.keys())},refresh=lambda:localization.list_localizations(cmd_opts.localizations_dir)).needs_reload_ui(), |
255 | | -"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(), |
256 | | -"gradio_themes_cache":OptionInfo(True,"Cache gradio themes locally").info("disable to update the selected Gradio theme"), |
257 | | -"gallery_height":OptionInfo("","Gallery height",gr.Textbox).info("an be any valid CSS value").needs_reload_ui(), |
258 | | -"return_grid":OptionInfo(True,"Show grid in results for web"), |
259 | | -"do_not_show_images":OptionInfo(False,"Do not show any images in results for web"), |
260 | | -"send_seed":OptionInfo(True,"Send seed when sending prompt or image to other interface"), |
261 | | -"send_size":OptionInfo(True,"Send size when sending prompt or image to another interface"), |
262 | | -"js_modal_lightbox":OptionInfo(True,"Enable full page image viewer"), |
263 | | -"js_modal_lightbox_initially_zoomed":OptionInfo(True,"Show images zoomed in by default in full page image viewer"), |
264 | | -"js_modal_lightbox_gamepad":OptionInfo(False,"Navigate image viewer with gamepad"), |
265 | | -"js_modal_lightbox_gamepad_repeat":OptionInfo(250,"Gamepad repeat period, in milliseconds"), |
266 | | -"show_progress_in_title":OptionInfo(True,"Show generation progress in window title."), |
| 253 | +options_templates.update(options_section(('ui_prompt_editing',"Prompt editing","ui"), { |
| 254 | +"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}), |
| 255 | +"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}), |
| 256 | +"keyedit_delimiters":OptionInfo(r".,\/!?%^*;:{}=`~() ","Word delimiters when editing the prompt with Ctrl+up/down"), |
| 257 | +"disable_token_counters":OptionInfo(False,"Disable prompt token counters").needs_reload_ui(), |
| 258 | +})) |
| 259 | + |
| 260 | +options_templates.update(options_section(('ui_gallery',"Gallery","ui"), { |
| 261 | +"return_grid":OptionInfo(True,"Show grid in gallery"), |
| 262 | +"do_not_show_images":OptionInfo(False,"Do not show any images in gallery"), |
| 263 | +"js_modal_lightbox":OptionInfo(True,"Full page image viewer: enable"), |
| 264 | +"js_modal_lightbox_initially_zoomed":OptionInfo(True,"Full page image viewer: show images zoomed in by default"), |
| 265 | +"js_modal_lightbox_gamepad":OptionInfo(False,"Full page image viewer: navigate with gamepad"), |
| 266 | +"js_modal_lightbox_gamepad_repeat":OptionInfo(250,"Full page image viewer: gamepad repeat period").info("in milliseconds"), |
| 267 | +"gallery_height":OptionInfo("","Gallery height",gr.Textbox).info("can be any valid CSS value, for example 768px or 20em").needs_reload_ui(), |
| 268 | +})) |
| 269 | + |
| 270 | +options_templates.update(options_section(('ui_alternatives',"UI alternatives","ui"), { |
| 271 | +"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(), |
267 | 272 | "samplers_in_dropdown":OptionInfo(True,"Use dropdown for sampler selection instead of radio group").needs_reload_ui(), |
268 | 273 | "dimensions_and_batch_together":OptionInfo(True,"Show Width/Height and Batch sliders in same row").needs_reload_ui(), |
269 | | -"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}), |
270 | | -"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}), |
271 | | -"keyedit_delimiters":OptionInfo(r".,\/!?%^*;:{}=`~() ","Ctrl+up/down word delimiters"), |
272 | | -"keyedit_delimiters_whitespace":OptionInfo(["Tab","Carriage Return","Line Feed"],"Ctrl+up/down whitespace delimiters",gr.CheckboxGroup,lambda: {"choices": ["Tab","Carriage Return","Line Feed"]}), |
273 | | -"keyedit_move":OptionInfo(True,"Alt+left/right moves prompt elements"), |
274 | | -"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(), |
275 | | -"ui_tab_order":OptionInfo([],"UI tab order",ui_components.DropdownMulti,lambda: {"choices":list(shared.tab_names)}).needs_reload_ui(), |
276 | | -"hidden_tabs":OptionInfo([],"Hidden UI tabs",ui_components.DropdownMulti,lambda: {"choices":list(shared.tab_names)}).needs_reload_ui(), |
277 | | -"ui_reorder_list":OptionInfo([],"txt2img/img2img UI item order",ui_components.DropdownMulti,lambda: {"choices":list(shared_items.ui_reorder_categories())}).info("selected items appear first").needs_reload_ui(), |
278 | 274 | "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"), |
279 | 275 | "hires_fix_show_sampler":OptionInfo(False,"Hires fix: show hires checkpoint and sampler selection").needs_reload_ui(), |
280 | 276 | "hires_fix_show_prompts":OptionInfo(False,"Hires fix: show hires prompt and negative prompt").needs_reload_ui(), |
281 | | -"disable_token_counters":OptionInfo(False,"Disable prompt token counters").needs_reload_ui(), |
282 | 277 | "txt2img_settings_accordion":OptionInfo(False,"Settings in txt2img hidden under Accordion").needs_reload_ui(), |
283 | 278 | "img2img_settings_accordion":OptionInfo(False,"Settings in img2img hidden under Accordion").needs_reload_ui(), |
284 | | -"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(), |
| 279 | +})) |
| 280 | + |
| 281 | +options_templates.update(options_section(('ui',"User interface","ui"), { |
| 282 | +"localization":OptionInfo("None","Localization",gr.Dropdown,lambda: {"choices": ["None"]+list(localization.localizations.keys())},refresh=lambda:localization.list_localizations(cmd_opts.localizations_dir)).needs_reload_ui(), |
| 283 | +"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(), |
| 284 | +"ui_tab_order":OptionInfo([],"UI tab order",ui_components.DropdownMulti,lambda: {"choices":list(shared.tab_names)}).needs_reload_ui(), |
| 285 | +"hidden_tabs":OptionInfo([],"Hidden UI tabs",ui_components.DropdownMulti,lambda: {"choices":list(shared.tab_names)}).needs_reload_ui(), |
| 286 | +"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(), |
| 287 | +"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(), |
| 288 | +"gradio_themes_cache":OptionInfo(True,"Cache gradio themes locally").info("disable to update the selected Gradio theme"), |
| 289 | +"show_progress_in_title":OptionInfo(True,"Show generation progress in window title."), |
| 290 | +"send_seed":OptionInfo(True,"Send seed when sending prompt or image to other interface"), |
| 291 | +"send_size":OptionInfo(True,"Send size when sending prompt or image to another interface"), |
285 | 292 | })) |
286 | 293 |
|
287 | 294 |
|
|