Linux command
comfyui 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start ComfyUI server
python [main.py]
Start on specific port
python [main.py] --port [8188]
Start with CPU only
python [main.py] --cpu
Start without auto-opening browser
python [main.py] --disable-auto-launch
Use specific GPU
python [main.py] --cuda-device [0]
Run with low VRAM mode
python [main.py] --lowvram
Execute a workflow via API
curl -X POST http://localhost:8188/prompt -H "Content-Type: application/json" -d @[workflow.json]
说明
ComfyUI is a node-based workflow system for Stable Diffusion and Flux image generation. It provides both a visual graph editor (web UI) and a REST API for programmatic use. Workflows are built by connecting nodes: model loaders, samplers, VAE decoders, prompt encoders, and more. Complex pipelines (img2img, inpainting, ControlNet, LoRA stacking) are constructed visually without code. The API accepts workflow JSON, enabling headless batch generation and integration with scripts. Workflows created in the web UI can be exported and run via the API. An extensive ecosystem of custom nodes adds capabilities: video generation, face restoration, upscaling, IP-Adapter, and more. Custom nodes are installed into the `custom_nodes/` directory. Install via comfy-cli (`pip install comfy-cli && comfy install`) or clone the repository and install requirements. Models are placed in the `models/` directory tree.
参数
- --port _PORT_
- Server port (default: 8188).
- --listen _ADDR_
- Listen address (default: 127.0.0.1, use 0.0.0.0 for network).
- --cpu
- Run on CPU only.
- --cuda-device _ID_
- CUDA GPU device index.
- --lowvram
- Low VRAM mode for GPUs with limited memory.
- --dont-print-server
- Suppress server output.
- --output-directory _DIR_
- Custom output directory.
- --temp-directory _DIR_
- Custom temp directory.
- --auto-launch
- Auto-open browser on start.
- --disable-auto-launch
- Prevent auto-opening browser.
FAQ
What is the comfyui command used for?
ComfyUI is a node-based workflow system for Stable Diffusion and Flux image generation. It provides both a visual graph editor (web UI) and a REST API for programmatic use. Workflows are built by connecting nodes: model loaders, samplers, VAE decoders, prompt encoders, and more. Complex pipelines (img2img, inpainting, ControlNet, LoRA stacking) are constructed visually without code. The API accepts workflow JSON, enabling headless batch generation and integration with scripts. Workflows created in the web UI can be exported and run via the API. An extensive ecosystem of custom nodes adds capabilities: video generation, face restoration, upscaling, IP-Adapter, and more. Custom nodes are installed into the `custom_nodes/` directory. Install via comfy-cli (`pip install comfy-cli && comfy install`) or clone the repository and install requirements. Models are placed in the `models/` directory tree.
How do I run a basic comfyui example?
Run `python [main.py]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --port _PORT_ do in comfyui?
Server port (default: 8188).