"save_images_replace_action":OptionInfo("Replace","Saving the image to an existing file",gr.Radio,{"choices":["Replace","Add number suffix"],**hide_dirs}),
"export_for_4chan":OptionInfo(True,"Save copy of large images as JPG").info("if the file size is above the limit, or either width or height are above the limit"),
"save_incomplete_images":OptionInfo(False,"Save incomplete images").info("save images that has been interrupted in mid-generation; even if not saved, they will still show up in webui output."),
"notification_audio":OptionInfo(True,"Play notification sound after image generation").info("notification.mp3 should be present in the root directory").needs_reload_ui(),
"outdir_txt2img_samples":OptionInfo(util.truncate_path(os.path.join(default_output_dir,'txt2img-images')),'Output directory for txt2img images',component_args=hide_dirs),
"outdir_img2img_samples":OptionInfo(util.truncate_path(os.path.join(default_output_dir,'img2img-images')),'Output directory for img2img images',component_args=hide_dirs),
"outdir_extras_samples":OptionInfo(util.truncate_path(os.path.join(default_output_dir,'extras-images')),'Output directory for images from extras tab',component_args=hide_dirs),
"outdir_txt2img_grids":OptionInfo(util.truncate_path(os.path.join(default_output_dir,'txt2img-grids')),'Output directory for txt2img grids',component_args=hide_dirs),
"outdir_img2img_grids":OptionInfo(util.truncate_path(os.path.join(default_output_dir,'img2img-grids')),'Output directory for img2img grids',component_args=hide_dirs),
"outdir_save":OptionInfo(util.truncate_path(os.path.join(data_path,'log','images')),"Directory for saving images using the Save button",component_args=hide_dirs),
"outdir_init_images":OptionInfo(util.truncate_path(os.path.join(default_output_dir,'init-images')),"Directory for saving init images when using img2img",component_args=hide_dirs),
"directories_filename_pattern":OptionInfo("[date]","Directory name pattern",component_args=hide_dirs).link("wiki","https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Images-Filename-Name-and-Subdirectory"),
"ESRGAN_tile":OptionInfo(192,"Tile size for ESRGAN upscalers.",gr.Slider,{"minimum":0,"maximum":512,"step":16}).info("0 = no tiling"),
"ESRGAN_tile_overlap":OptionInfo(8,"Tile overlap for ESRGAN upscalers.",gr.Slider,{"minimum":0,"maximum":48,"step":1}).info("Low values = visible seam"),
"realesrgan_enabled_models":OptionInfo(["R-ESRGAN 4x+","R-ESRGAN 4x+ Anime6B"],"Select which Real-ESRGAN models to show in the web UI.",gr.CheckboxGroup,lambda:{"choices":shared_items.realesrgan_models_names()}),
"dat_enabled_models":OptionInfo(["DAT x2","DAT x3","DAT x4"],"Select which DAT models to show in the web UI.",gr.CheckboxGroup,lambda:{"choices":shared_items.dat_models_names()}),
"face_restoration":OptionInfo(False,"Restore faces",infotext='Face restoration').info("will use a third-party model on generation result to reconstruct faces"),
"disable_mmap_load_safetensors":OptionInfo(False,"Disable memmapping for loading .safetensors files.").info("fixes very slow loading speed in some cases"),
"save_optimizer_state":OptionInfo(False,"Saves Optimizer state as separate *.optim file. Training of embedding or HN can be resumed with the matching optim file."),
"training_image_repeats_per_epoch":OptionInfo(1,"Number of repeats for a single input image per epoch; used only for displaying epoch number",gr.Number,{"precision":0}),
"training_write_csv_every":OptionInfo(500,"Save an csv containing the loss to log directory every N steps, 0 to disable"),
"sd_checkpoints_limit":OptionInfo(1,"Maximum number of checkpoints loaded at the same time",gr.Slider,{"minimum":1,"maximum":10,"step":1}),
"sd_checkpoints_keep_in_cpu":OptionInfo(True,"Only keep one model on device").info("will keep models other than the currently used one in RAM rather than VRAM"),
"sd_checkpoint_cache":OptionInfo(0,"Checkpoints to cache in RAM",gr.Slider,{"minimum":0,"maximum":10,"step":1}).info("obsolete; set to 0 and use the two settings above instead"),
"sd_unet":OptionInfo("Automatic","SD Unet",gr.Dropdown,lambda:{"choices":shared_items.sd_unet_items()},refresh=shared_items.refresh_unet_list).info("choose Unet model: Automatic = use one with same filename as checkpoint; None = use Unet from checkpoint"),
"enable_quantization":OptionInfo(False,"Enable quantization in K samplers for sharper and cleaner results. This may change existing seeds").needs_reload_ui(),
"emphasis":OptionInfo("Original","Emphasis mode",gr.Radio,lambda:{"choices":[x.nameforxinsd_emphasis.options]},infotext="Emphasis").info("makes it possible to make model to pay (more:1.1) or (less:0.9) attention to text when you use the syntax in prompt; "+sd_emphasis.get_options_descriptions()),
"comma_padding_backtrack":OptionInfo(20,"Prompt word wrap length limit",gr.Slider,{"minimum":0,"maximum":74,"step":1}).info("in tokens - for texts shorter than specified, if they don't fit into 75 token limit, move them to the next 75 token chunk"),
"CLIP_stop_at_last_layers":OptionInfo(1,"Clip skip",gr.Slider,{"minimum":1,"maximum":12,"step":1},infotext="Clip skip").link("wiki","https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#clip-skip").info("ignore last layers of CLIP network; 1 ignores none, 2 ignores one layer"),
"randn_source":OptionInfo("GPU","Random number generator source.",gr.Radio,{"choices":["GPU","CPU","NV"]},infotext="RNG").info("changes seeds drastically; use CPU to produce the same picture across different videocard vendors; use NV to produce same picture as on NVidia videocards"),
"sd_vae":OptionInfo("Automatic","SD VAE",gr.Dropdown,lambda:{"choices":shared_items.sd_vae_items()},refresh=shared_items.refresh_vae_list,infotext='VAE').info("choose VAE model: Automatic = use one with same filename as checkpoint; None = use VAE from checkpoint"),
"sd_vae_overrides_per_model_preferences":OptionInfo(True,"Selected VAE overrides per-model preferences").info("you can set per-model VAE either by editing user metadata for checkpoints, or by making the VAE have same name as checkpoint"),
"auto_vae_precision_bfloat16":OptionInfo(False,"Automatically convert VAE to bfloat16").info("triggers when a tensor with NaNs is produced in VAE; disabling the option in this case will result in a black square image; if enabled, overrides the option below"),
"auto_vae_precision":OptionInfo(True,"Automatically revert VAE to 32-bit floats").info("triggers when a tensor with NaNs is produced in VAE; disabling the option in this case will result in a black square image"),
"sd_vae_encode_method":OptionInfo("Full","VAE type for encode",gr.Radio,{"choices":["Full","TAESD"]},infotext='VAE Encoder').info("method to encode image to latent (use in img2img, hires-fix or inpaint mask)"),
"sd_vae_decode_method":OptionInfo("Full","VAE type for decode",gr.Radio,{"choices":["Full","TAESD"]},infotext='VAE Decoder').info("method to decode latent to image"),
"initial_noise_multiplier":OptionInfo(1.0,"Noise multiplier for img2img",gr.Slider,{"minimum":0.0,"maximum":1.5,"step":0.001},infotext='Noise multiplier'),
"img2img_extra_noise":OptionInfo(0.0,"Extra noise multiplier for img2img and hires fix",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01},infotext='Extra noise').info("0 = disabled (default); should be lower than denoising strength"),
"img2img_color_correction":OptionInfo(False,"Apply color correction to img2img results to match original colors."),
"img2img_fix_steps":OptionInfo(False,"With img2img, do exactly the amount of steps the slider specifies.").info("normally you'd do less with less denoising"),
"img2img_background_color":OptionInfo("#ffffff","With img2img, fill transparent parts of the input image with this color.",ui_components.FormColorPicker,{}),
"img2img_editor_height":OptionInfo(720,"Height of the image editor",gr.Slider,{"minimum":80,"maximum":1600,"step":1}).info("in pixels").needs_reload_ui(),
"img2img_sketch_default_brush_color":OptionInfo("#ffffff","Sketch initial brush color",ui_components.FormColorPicker,{}).info("default brush color of img2img sketch").needs_reload_ui(),
"img2img_inpaint_mask_brush_color":OptionInfo("#ffffff","Inpaint mask brush color",ui_components.FormColorPicker,{}).info("brush color of inpaint mask").needs_reload_ui(),
"img2img_inpaint_sketch_default_brush_color":OptionInfo("#ffffff","Inpaint sketch initial brush color",ui_components.FormColorPicker,{}).info("default brush color of img2img inpaint sketch").needs_reload_ui(),
"img2img_batch_show_results_limit":OptionInfo(32,"Show the first N batch img2img results in UI",gr.Slider,{"minimum":-1,"maximum":1000,"step":1}).info('0: disable, -1: show all images. Too many images can cause lag'),
"overlay_inpaint":OptionInfo(True,"Overlay original for inpaint").info("when inpainting, overlay the original image over the areas that weren't inpainted."),
"s_min_uncond":OptionInfo(0.0,"Negative Guidance minimum sigma",gr.Slider,{"minimum":0.0,"maximum":15.0,"step":0.01}).link("PR","https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/9177").info("skip negative prompt for some steps when the image is almost ready; 0=disable, higher=faster"),
"token_merging_ratio_img2img":OptionInfo(0.0,"Token merging ratio for img2img",gr.Slider,{"minimum":0.0,"maximum":0.9,"step":0.1}).info("only applies if non-zero and overrides above"),
"token_merging_ratio_hr":OptionInfo(0.0,"Token merging ratio for high-res pass",gr.Slider,{"minimum":0.0,"maximum":0.9,"step":0.1},infotext='Token merging ratio hr').info("only applies if non-zero and overrides above"),
"pad_cond_uncond":OptionInfo(False,"Pad prompt/negative prompt",infotext='Pad conds').info("improves performance when prompt and negative prompt have different lengths; changes seeds"),
"pad_cond_uncond_v0":OptionInfo(False,"Pad prompt/negative prompt (v0)",infotext='Pad conds v0').info("alternative implementation for the above; used prior to 1.6.0 for DDIM sampler; overrides the above if set; WARNING: truncates negative prompt if it's too long; changes seeds"),
"persistent_cond_cache":OptionInfo(True,"Persistent cond cache").info("do not recalculate conds from prompts if prompts have not changed since previous calculation"),
"batch_cond_uncond":OptionInfo(True,"Batch cond/uncond").info("do both conditional and unconditional denoising in one batch; uses a bit more VRAM during sampling, but improves speed; previously this was controlled by --always-batch-cond-uncond commandline argument"),
"fp8_storage":OptionInfo("Disable","FP8 weight",gr.Radio,{"choices":["Disable","Enable for SDXL","Enable"]}).info("Use FP8 to store Linear/Conv layers' weight. Require pytorch>=2.1.0."),
"cache_fp16_weight":OptionInfo(False,"Cache FP16 weight for LoRA").info("Cache fp16 weight when enabling FP8, will increase the quality of LoRA. Use more system ram."),
"auto_backcompat":OptionInfo(True,"Automatic backward compatibility").info("automatically enable options for backwards compatibility when importing generation parameters from infotext that has program version."),
"use_old_hires_fix_width_height":OptionInfo(False,"For hires fix, use width/height sliders to set final resolution rather than first pass (disables Upscale by, Resize width/height to)."),
"use_old_scheduling":OptionInfo(False,"Use old prompt editing timelines.",infotext="Old prompt editing timelines").info("For [red:green:N]; old: If N < 1, it's a fraction of steps (and hires fix uses range from 0 to 1), if N >= 1, it's an absolute number of steps; new: If N has a decimal point in it, it's a fraction of steps (and hires fix uses range from 1 to 2), othewrwise it's an absolute number of steps"),
"use_downcasted_alpha_bar":OptionInfo(False,"Downcast model alphas_cumprod to fp16 before sampling. For reproducing old seeds.",infotext="Downcast alphas_cumprod"),
"refiner_switch_by_sample_steps":OptionInfo(False,"Switch to refiner by sampling steps instead of model timesteps. Old behavior for refiner.",infotext="Refiner switch by sampling steps")
"extra_networks_dir_button_function":OptionInfo(False,"Add a '/' to the beginning of directory buttons").info("Buttons will display the contents of the selected directory without acting as a search filter."),
"extra_networks_hidden_models":OptionInfo("When searched","Show cards for models in hidden directories",gr.Radio,{"choices":["Always","When searched","Never"]}).info('"When searched" option will only show the item when the search string has 4 characters or more'),
"extra_networks_card_order_field":OptionInfo("Path","Default order field for Extra Networks cards",gr.Dropdown,{"choices":['Path','Name','Date Created','Date Modified']}).needs_reload_ui(),
"extra_networks_card_order":OptionInfo("Ascending","Default order for Extra Networks cards",gr.Dropdown,{"choices":['Ascending','Descending']}).needs_reload_ui(),
"extra_networks_add_text_separator":OptionInfo("","Extra networks separator").info("extra text to add before <...> when adding extra network to prompt"),
"sd_hypernetwork":OptionInfo("None","Add hypernetwork to prompt",gr.Dropdown,lambda:{"choices":["None",*shared.hypernetworks]},refresh=shared_items.reload_hypernetworks),
"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"),
"include_styles_into_token_counters":OptionInfo(True,"Count tokens of enabled styles").info("When calculating how many tokens the prompt has, also consider tokens added by enabled styles."),
"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(),
"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"),
"interrupt_after_current":OptionInfo(True,"Don't Interrupt in the middle").info("when using Interrupt button, if generating more than one image, stop after the generation of an image has finished, instead of immediately"),
"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"),
"enable_reloading_ui_scripts":OptionInfo(False,"Reload UI scripts when using Reload UI option").info("useful for developing: if you make changes to UI scripts code, it is applied when the UI is reloded."),
"disable_weights_auto_swap":OptionInfo(True,"Disregard checkpoint information from pasted infotext").info("when reading generation parameters from text into UI"),
"infotext_skip_pasting":OptionInfo([],"Disregard fields from pasted infotext",ui_components.DropdownMulti,lambda:{"choices":shared_items.get_infotext_names()}),
"infotext_styles":OptionInfo("Apply if any","Infer styles from prompts of pasted infotext",gr.Radio,{"choices":["Ignore","Apply","Discard","Apply if any"]}).info("when reading generation parameters from text into UI)").html("""<ul style='margin-left: 1.5em'>
"show_progress_every_n_steps":OptionInfo(10,"Live preview display period",gr.Slider,{"minimum":-1,"maximum":32,"step":1}).info("in sampling steps - show new live preview image every N sampling steps; -1 = only show after completion of batch"),
"show_progress_type":OptionInfo("Approx NN","Live preview method",gr.Radio,{"choices":["Full","Approx NN","Approx cheap","TAESD"]}).info("Full = slow but pretty; Approx NN and TAESD = fast but low quality; Approx cheap = super fast but terrible otherwise"),
"live_preview_allow_lowvram_full":OptionInfo(False,"Allow Full live preview method with lowvram/medvram").info("If not, Approx NN will be used instead; Full live preview method is very detrimental to speed if lowvram/medvram optimizations are enabled"),
"hide_samplers":OptionInfo([],"Hide samplers in user interface",gr.CheckboxGroup,lambda:{"choices":[x.nameforxinshared_items.list_samplers()]}).needs_reload_ui(),
"eta_ddim":OptionInfo(0.0,"Eta for DDIM",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01},infotext='Eta DDIM').info("noise multiplier; higher = more unpredictable results"),
"eta_ancestral":OptionInfo(1.0,"Eta for k-diffusion samplers",gr.Slider,{"minimum":0.0,"maximum":1.0,"step":0.01},infotext='Eta').info("noise multiplier; currently only applies to ancestral samplers (i.e. Euler a) and SDE samplers"),
's_churn':OptionInfo(0.0,"sigma churn",gr.Slider,{"minimum":0.0,"maximum":100.0,"step":0.01},infotext='Sigma churn').info('amount of stochasticity; only applies to Euler, Heun, and DPM2'),
's_tmin':OptionInfo(0.0,"sigma tmin",gr.Slider,{"minimum":0.0,"maximum":10.0,"step":0.01},infotext='Sigma tmin').info('enable stochasticity; start value of the sigma range; only applies to Euler, Heun, and DPM2'),
's_tmax':OptionInfo(0.0,"sigma tmax",gr.Slider,{"minimum":0.0,"maximum":999.0,"step":0.01},infotext='Sigma tmax').info("0 = inf; end value of the sigma range; only applies to Euler, Heun, and DPM2"),
's_noise':OptionInfo(1.0,"sigma noise",gr.Slider,{"minimum":0.0,"maximum":1.1,"step":0.001},infotext='Sigma noise').info('amount of additional noise to counteract loss of detail during sampling'),
'sigma_min':OptionInfo(0.0,"sigma min",gr.Number,infotext='Schedule min sigma').info("0 = default (~0.03); minimum noise strength for k-diffusion noise scheduler"),
'sigma_max':OptionInfo(0.0,"sigma max",gr.Number,infotext='Schedule max sigma').info("0 = default (~14.6); maximum noise strength for k-diffusion noise scheduler"),
'rho':OptionInfo(0.0,"rho",gr.Number,infotext='Schedule rho').info("0 = default (7 for karras, 1 for polyexponential); higher values result in a steeper noise schedule (decreases faster)"),
'eta_noise_seed_delta':OptionInfo(0,"Eta noise seed delta",gr.Number,{"precision":0},infotext='ENSD').info("ENSD; does not improve anything, just produces different results for ancestral samplers - only useful for reproducing images"),
'sgm_noise_multiplier':OptionInfo(False,"SGM noise multiplier",infotext='SGM noise multiplier').link("PR","https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12818").info("Match initial noise to official SDXL implementation - only useful for reproducing images"),
'sd_noise_schedule':OptionInfo("Default","Noise schedule for sampling",gr.Radio,{"choices":["Default","Zero Terminal SNR"]},infotext="Noise Schedule").info("for use with zero terminal SNR trained models")
'postprocessing_enable_in_main_ui':OptionInfo([],"Enable postprocessing operations in txt2img and img2img tabs",ui_components.DropdownMulti,lambda:{"choices":[x.nameforxinshared_items.postprocessing_scripts()]}),
'postprocessing_existing_caption_action':OptionInfo("Ignore","Action for existing captions",gr.Radio,{"choices":["Ignore","Keep","Prepend","Append"]}).info("when generating captions using postprocessing; Ignore = use generated; Keep = use original; Prepend/Append = combine both"),
"disable_all_extensions":OptionInfo("none","Disable all extensions (preserves the list of disabled extensions)",gr.Radio,{"choices":["none","extra","all"]}),