Skip to main content
ComfyUI accepts command-line arguments when started with python main.py. This page documents every flag defined in comfy/cli_args.py.
Windows Portable users can add flags to the .bat launch files (for example, run_nvidia_gpu.bat). See the Windows Portable guide for details.
Run python main.py --help in your ComfyUI directory for the built-in help text. Combine multiple flags as needed:

Network & Server

Directories

Launch & Browser

--windows-standalone-build sets auto_launch to true. --disable-auto-launch overrides it. To run as a server without opening a browser, use --disable-auto-launch.

Devices & CUDA

Precision & Inference

Flags in the Global, UNET, VAE, and Text Encoder groups below are mutually exclusive within each group. Only one flag per group can be used at a time.

Global floating point

UNET precision

VAE precision

Text encoder precision

Other inference options

Preview

Cache

Cache mode flags are mutually exclusive. Only one of --cache-ram, --cache-classic, --cache-lru, or --cache-none should be used.

Attention

Cross-attention method flags are mutually exclusive. Split and quad attention are ignored when xformers is used.

VRAM & Memory

VRAM mode flags (--gpu-only, --highvram, --lowvram, --novram, --cpu) are mutually exclusive.

Performance & Debugging

ComfyUI Manager

See ComfyUI-Manager Installation for setup instructions.

Custom Nodes & API Nodes

Frontend & API

Logging & Misc


This reference is based on ComfyUI comfy/cli_args.py. When upgrading ComfyUI, run python main.py --help or compare your local cli_args.py against this page to check for new or changed flags.