parser.add_argument("--ui-settings-file",type=str,help="filename to use for ui settings",default=os.path.join(script_path,'config.json'))
parser.add_argument("--gradio-debug",action='store_true',help="launch gradio with --debug option")
parser.add_argument("--gradio-auth",type=str,help='set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"',default=None)
parser.add_argument("--gradio-img2img-tool",type=str,help='gradio image uploader tool: can be either editor for ctopping, or color-sketch for drawing',choices=["color-sketch","editor"],default="editor")
parser.add_argument("--gradio-inpaint-tool",type=str,choices=["sketch","color-sketch"],default="sketch",help="gradio inpainting editor: can be either sketch to only blur/noise the input, or color-sketch to paint over it")
parser.add_argument("--gradio-img2img-tool",type=str,help='does not do anything')
parser.add_argument("--gradio-inpaint-tool",type=str,help="does not do anything")
parser.add_argument("--opt-channelslast",action='store_true',help="change memory type for stable diffusion to channels last")
parser.add_argument("--styles-file",type=str,help="filename to use for styles",default=os.path.join(script_path,'styles.csv'))
parser.add_argument("--autolaunch",action='store_true',help="open the webui URL in the system's default browser upon launch",default=False)
init_img=gr.Image(label="Image for img2img",elem_id="img2img_image",show_label=False,source="upload",interactive=True,type="pil",tool="editor",image_mode="RGBA").style(height=480)
init_img=gr.Image(label="Image for img2img",elem_id="img2img_image",show_label=False,source="upload",interactive=True,type="pil",tool=cmd_opts.gradio_img2img_tool,image_mode="RGBA").style(height=480)
sketch=gr.Image(label="Image for img2img",elem_id="img2img_sketch",show_label=False,source="upload",interactive=True,type="pil",tool="color-sketch",image_mode="RGBA").style(height=480)
init_img_with_mask=gr.Image(label="Image for inpainting with mask",show_label=False,elem_id="img2maskimg",source="upload",interactive=True,type="pil",tool=cmd_opts.gradio_inpaint_tool,image_mode="RGBA").style(height=480)
init_img_with_mask=gr.Image(label="Image for inpainting with mask",show_label=False,elem_id="img2maskimg",source="upload",interactive=True,type="pil",tool="sketch",image_mode="RGBA").style(height=480)
init_img_inpaint=gr.Image(label="Image for img2img",show_label=False,source="upload",interactive=True,type="pil",visible=False,elem_id="img_inpaint_base")
hidden='<br>Disabled when launched with --hide-ui-dir-config.'ifshared.cmd_opts.hide_ui_dir_configelse''
gr.HTML(f"<p class=\"text-gray-500\">Process images in a directory on the same machine where the server is running.<br>Use an empty output directory to save pictures normally instead of writing to the output directory.{hidden}</p>")
hidden='<br>Disabled when launched with --hide-ui-dir-config.'ifshared.cmd_opts.hide_ui_dir_configelse''
gr.HTML(f"<p class=\"text-gray-500\">Process images in a directory on the same machine where the server is running.<br>Use an empty output directory to save pictures normally instead of writing to the output directory.{hidden}</p>")