parser.add_argument("--listen",type=str,default="127.0.0.1",metavar="IP",nargs="?",const="0.0.0.0,::",help="Specify the IP address to listen on (default: 127.0.0.1). You can give a list of ip addresses by separating them with a comma like: 127.2.2.2,127.3.3.3 If --listen is provided without an argument, it defaults to 0.0.0.0,:: (listens on all ipv4 and ipv6)")
parser.add_argument("--tls-keyfile",type=str,help="Path to TLS (SSL) key file. Enables TLS, makes app accessible at https://... requires --tls-certfile to function")
parser.add_argument("--tls-certfile",type=str,help="Path to TLS (SSL) certificate file. Enables TLS, makes app accessible at https://... requires --tls-keyfile to function")
parser.add_argument("--enable-cors-header",type=str,default=None,metavar="ORIGIN",nargs="?",const="*",help="Enable CORS (Cross-Origin Resource Sharing) with optional origin or allow all with default '*'.")
parser.add_argument("--base-directory",type=str,default=None,help="Set the ComfyUI base directory for models, custom_nodes, input, output, temp, and user directories.")
parser.add_argument("--extra-model-paths-config",type=str,default=None,metavar="PATH",nargs='+',action='append',help="Load one or more extra_model_paths.yaml files.")
parser.add_argument("--output-directory",type=str,default=None,help="Set the ComfyUI output directory. Overrides --base-directory.")
parser.add_argument("--temp-directory",type=str,default=None,help="Set the ComfyUI temp directory (default is in the ComfyUI directory). Overrides --base-directory.")
parser.add_argument("--input-directory",type=str,default=None,help="Set the ComfyUI input directory. Overrides --base-directory.")
parser.add_argument("--oneapi-device-selector",type=str,default=None,metavar="SELECTOR_STRING",help="Sets the oneAPI device(s) this instance will use.")
parser.add_argument("--disable-ipex-optimize",action="store_true",help="Disables ipex.optimize default when loading models with Intel's Extension for Pytorch.")
attn_group.add_argument("--use-split-cross-attention",action="store_true",help="Use the split cross attention optimization. Ignored when xformers is used.")
attn_group.add_argument("--use-quad-cross-attention",action="store_true",help="Use the sub-quadratic cross attention optimization . Ignored when xformers is used.")
upcast.add_argument("--force-upcast-attention",action="store_true",help="Force enable attention upcasting, please report if it fixes black images.")
upcast.add_argument("--dont-upcast-attention",action="store_true",help="Disable all upcasting of attention. Should be unnecessary except for debugging.")
vram_group.add_argument("--highvram",action="store_true",help="By default models will be unloaded to CPU memory after being used. This option keeps them in GPU memory.")
vram_group.add_argument("--normalvram",action="store_true",help="Used to force normal vram use if lowvram gets automatically enabled.")
vram_group.add_argument("--lowvram",action="store_true",help="Split the unet in parts to use less vram.")
parser.add_argument("--reserve-vram",type=float,default=None,help="Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reserved depending on your OS.")
parser.add_argument("--default-hashing-function",type=str,choices=['md5','sha1','sha256','sha512'],default='sha256',help="Allows you to choose the hash function to use for duplicate filename / contents comparison. Default is sha256.")
parser.add_argument("--disable-smart-memory",action="store_true",help="Force ComfyUI to agressively offload to regular ram instead of keeping models in vram when it can.")
parser.add_argument("--deterministic",action="store_true",help="Make pytorch use slower deterministic algorithms when it can. Note that this might not make images deterministic in all cases.")
parser.add_argument("--fast",metavar="number",type=int,const=99,default=0,nargs="?",help="Enable some untested and potentially quality deteriorating optimizations. You can pass a number from 0 to 10 for a bigger speed vs quality tradeoff. Using --fast with no number means maximum speed. 2 or larger enables fp16 accumulation, 5 or larger enables fp8 matrix multiplication.")
parser.add_argument("--windows-standalone-build",action="store_true",help="Windows standalone build: Enable convenient things that most people using the standalone windows build will probably enjoy (like auto opening the page on startup).")
parser.add_argument("--verbose",default='INFO',const='DEBUG',nargs="?",choices=['DEBUG','INFO','WARNING','ERROR','CRITICAL'],help='Set the logging level')
parser.add_argument("--user-directory",type=is_valid_directory,default=None,help="Set the ComfyUI user directory with an absolute path. Overrides --base-directory.")