"lora_show_all":shared.OptionInfo(False,"Always show all networks on the Lora page").info("otherwise, those detected as for incompatible version of Stable Diffusion will be hidden"),
"lora_hide_unknown_for_versions":shared.OptionInfo([],"Hide networks of unknown versions for model versions",gr.CheckboxGroup,{"choices":["SD1","SD2","SDXL"]}),
"lora_in_memory_limit":shared.OptionInfo(0,"Number of Lora networks to keep cached in memory",gr.Number,{"precision":0}),
"lora_not_found_warning_console":shared.OptionInfo(False,"Lora not found warning in console"),
"lora_not_found_gradio_warning":shared.OptionInfo(False,"Lora not found warning popup in webui"),
set_fields=request.model_dump(exclude_unset=True)ifhasattr(request,"request")elserequest.dict(exclude_unset=True)# pydantic v1/v2 have differenrt names for this
options_templates.update(options_section(('saving-paths',"Paths for saving","saving"),{
"outdir_samples":OptionInfo("","Output directory for images; if empty, defaults to three directories below",component_args=hide_dirs),
"outdir_txt2img_samples":OptionInfo("outputs/txt2img-images",'Output directory for txt2img images',component_args=hide_dirs),
"outdir_img2img_samples":OptionInfo("outputs/img2img-images",'Output directory for img2img images',component_args=hide_dirs),
"outdir_extras_samples":OptionInfo("outputs/extras-images",'Output directory for images from extras tab',component_args=hide_dirs),
"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_grids":OptionInfo("","Output directory for grids; if empty, defaults to two directories below",component_args=hide_dirs),
"outdir_txt2img_grids":OptionInfo("outputs/txt2img-grids",'Output directory for txt2img grids',component_args=hide_dirs),
"outdir_img2img_grids":OptionInfo("outputs/img2img-grids",'Output directory for img2img grids',component_args=hide_dirs),
"outdir_save":OptionInfo("log/images","Directory for saving images using the Save button",component_args=hide_dirs),
"outdir_init_images":OptionInfo("outputs/init-images","Directory for saving init images when using img2img",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),
}))
options_templates.update(options_section(('saving-to-dirs',"Saving to a directory","saving"),{
(hr_sampler_container,lambdad:gr.update(visible=True)ifd.get("Hires sampler","Use same sampler")!="Use same sampler"ord.get("Hires checkpoint","Use same checkpoint")!="Use same checkpoint"elsegr.update()),
PasteField(hr_sampler_container,lambdad:gr.update(visible=True)ifd.get("Hires sampler","Use same sampler")!="Use same sampler"ord.get("Hires checkpoint","Use same checkpoint")!="Use same checkpoint"elsegr.update()),