parser.add_argument("--disable-opt-split-attention",action='store_true',help="prefer no cross-attention layer optimization for automatic choice of optimization")
parser.add_argument("--disable-nan-check",action='store_true',help="do not check if produced images/latent spaces have nans; useful for running without a checkpoint in CI")
parser.add_argument("--use-cpu",nargs='+',help="use CPU as torch device for specified modules",default=[],type=str.lower)
parser.add_argument("--use-ipex",action="store_true",help="use Intel XPU as torch device")
parser.add_argument("--disable-model-loading-ram-optimization",action='store_true',help="disable an optimization that reduces RAM use when loading a model")
parser.add_argument("--listen",action='store_true',help="launch gradio with 0.0.0.0 as server name, allowing to respond to network requests")
parser.add_argument("--port",type=int,help="launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available",default=None)
# The "Nuullll/intel-extension-for-pytorch" wheels were built from IPEX source for Intel Arc GPU: https://github.com/intel/intel-extension-for-pytorch/tree/xpu-main
# This is NOT an Intel official release so please use it at your own risk!!
# See https://github.com/Nuullll/intel-extension-for-pytorch/releases/tag/v2.0.110%2Bxpu-master%2Bdll-bundle for details.
#
# Strengths (over official IPEX 2.0.110 windows release):
'postprocessing_enable_in_main_ui':OptionInfo([],"Enable postprocessing operations in txt2img and img2img tabs",ui_components.DropdownMulti,lambda:{"choices":[x.nameforxinshared_items.postprocessing_scripts()]}),
'upscaling_max_images_in_cache':OptionInfo(5,"Maximum number of images in upscaling cache",gr.Slider,{"minimum":0,"maximum":10,"step":1}),
'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"),
process_focal_crop_face_weight=gr.Slider(label='Focal point face weight',value=0.9,minimum=0.0,maximum=1.0,step=0.05,elem_id="train_process_focal_crop_face_weight")
process_focal_crop_entropy_weight=gr.Slider(label='Focal point entropy weight',value=0.15,minimum=0.0,maximum=1.0,step=0.05,elem_id="train_process_focal_crop_entropy_weight")
process_focal_crop_edges_weight=gr.Slider(label='Focal point edges weight',value=0.5,minimum=0.0,maximum=1.0,step=0.05,elem_id="train_process_focal_crop_edges_weight")
extras_batch_output_dir=gr.Textbox(label="Output directory",**shared.hide_dirs,placeholder="Leave blank to save images to the default path.",elem_id="extras_batch_output_dir")
show_extras_results=gr.Checkbox(label='Show result images',value=True,elem_id="extras_show_extras_results")
withui_components.InputAccordion(False,label="Auto focal point crop")asenable:
face_weight=gr.Slider(label='Focal point face weight',value=0.9,minimum=0.0,maximum=1.0,step=0.05,elem_id="postprocess_focal_crop_face_weight")
entropy_weight=gr.Slider(label='Focal point entropy weight',value=0.15,minimum=0.0,maximum=1.0,step=0.05,elem_id="postprocess_focal_crop_entropy_weight")
edges_weight=gr.Slider(label='Focal point edges weight',value=0.5,minimum=0.0,maximum=1.0,step=0.05,elem_id="postprocess_focal_crop_edges_weight")