What Is ComfyUI?
ComfyUI is a node-based interface for Stable Diffusion image generation. Unlike AUTOMATIC1111 WebUI, it allows you to visually design each processing step on a graph. Although this approach may seem complex at first, it allows you to create much more flexible and powerful workflows in the long run.
ComfyUI advantages: - **Visual workflow design:** You control each step visually - **Low memory usage:** You can perform the same operations with less VRAM than A1111 - **Reusable workflows:** You can save and share them as JSON - **Modular structure:** You can add and remove nodes as desired - **Speed:** Repetitive operations are very fast thanks to the caching system
Installation
The easiest way to install ComfyUI:
**For Windows:** 1. Download the ComfyUI portable version from GitHub (7z archive) 2. Extract the archive 3. Run "run_nvidia_gpu.bat" 4. Open http://127.0.0.1:8188 in your browser
**For Mac and Linux:** 1. Python 3.10+ and Git must be installed 2. Clone the repo: git clone https://github.com/comfyanonymous/ComfyUI 3. Create a virtual environment and install dependencies 4. Start with "python main.py"
Place model files in the "models/checkpoints" folder. Copy .safetensors files downloaded from Civitai or Hugging Face to this folder.
Basic Workflow Structure
Every ComfyUI workflow consists of these basic nodes:
1. **Load Checkpoint:** Selects the model to use (SD 1.5, SDXL, FLUX, etc.) 2. **CLIP Text Encode (Prompt):** Where you enter your positive prompt 3. **CLIP Text Encode (Negative):** Where you enter your negative prompt 4. **Empty Latent Image:** Sets the size of the image to be generated 5. **KSampler:** Performs the sampling operation (sampler, steps, CFG) 6. **VAE Decode:** Converts the latent image to pixel image 7. **Save Image:** Saves the result
You create a basic text-to-image workflow by connecting these nodes in sequence. Connections between nodes are shown with colored cables; the same color represents the same data type.
Adding and Connecting Nodes
Right-click on empty space to open the node menu. Under "Add Node," you can find all available nodes by category. Drag from a node's output point and drop it on another node's input point; the connection is created automatically.
Common additional nodes: - **LoRA Loader:** Loads LoRA models and adjusts weight - **ControlNet Apply:** Adds ControlNet control - **Image Scale:** Resizes the image - **Upscale Latent:** Upscales in latent space - **Image Composite:** Combines multiple images
LoRA Usage
LoRA (Low-Rank Adaptation) models add extra styles or concepts to the base model. To use LoRA in ComfyUI:
1. Place the LoRA file (.safetensors) in the "models/loras" folder 2. Add a "Load LoRA" node to your workflow 3. Connect this node between the Checkpoint Loader and KSampler 4. Select the LoRA model file 5. Adjust "strength_model" and "strength_clip" values (0.5-1.0 is good for starters)
To use multiple LoRAs, connect Load LoRA nodes in series. Keeping each LoRA's weight low (0.4-0.7) reduces conflicts.
Saving and Sharing Workflows
ComfyUI workflows are saved in JSON format. Every image you generate includes workflow information as metadata; you can load the same workflow by dragging the image into ComfyUI.
Workflow sharing platforms: - **OpenArt.ai:** Hosts thousands of ready-made ComfyUI workflows - **ComfyWorkflows.com:** Workflows shared by the community - **CivitAI:** Example workflows on model pages
Custom Nodes
ComfyUI's power comes from custom nodes developed by the community. You can access thousands of custom nodes by installing the ComfyUI Manager extension:
- **WAS Node Suite:** Advanced image processing nodes - **ComfyUI Impact Pack:** Detail enhancement and face fixing - **Efficiency Nodes:** Batch processing and optimization - **AnimateDiff:** Video generation workflows
To install Manager, clone the repo into ComfyUI's custom_nodes folder and restart.
Common Mistakes and Solutions
The most frequently encountered issue in ComfyUI is incorrect node connections. When you try to connect different data types, you will get a red error message. As a solution, pay attention to cable colors: outputs and inputs of the same color are compatible. Purple represents LATENT, orange represents MODEL, and green represents CLIP data types.
VRAM insufficiency is also a common error. You may get errors when running large models (like SDXL) on cards with low VRAM. Starting ComfyUI with "--lowvram" or "--novram" parameters largely solves this issue, though at the cost of longer processing times.
Corrupted workflow files can also cause problems. Workflows downloaded from the internet may sometimes require missing custom nodes. If ComfyUI Manager is installed, it automatically detects missing nodes and offers installation suggestions.
Practical Tips
- Avoid complex workflows in the early days; thoroughly learn the basic text-to-image workflow, then gradually add complexity - Regularly save your workflows as JSON and organize them in a folder - Definitely install ComfyUI Manager; it automatically loads missing nodes and makes update tracking easier - Group frequently used node groups with "Group"; this makes navigation easier in large workflows
FAQ (Frequently Asked Questions)
**Is ComfyUI or AUTOMATIC1111 better?** Both have advantages. AUTOMATIC1111 is easier for beginners, has an intuitive interface, and a broad extension ecosystem. ComfyUI is more flexible, offers more efficient memory usage, and is much more powerful for creating complex workflows. We recommend ComfyUI for advanced users.
**What are the minimum hardware requirements for ComfyUI?** 4GB VRAM may be sufficient for SD 1.5 models, but we recommend 8GB. For SDXL models, a minimum of 8GB and ideally 12GB VRAM is needed. 16GB RAM is sufficient, and an SSD disk is recommended.
ComfyUI Workflow Fundamentals
ComfyUI's strongest feature is its node-based workflow system. Each node performs a specific operation: model loading, prompt processing, sampling, decoding, and saving. Connect these nodes to create complex workflows.
A basic workflow contains: Load Checkpoint → CLIP Text Encode (prompt) → KSampler → VAE Decode → Save Image. Once you understand this flow, you can add advanced features like ControlNet, LoRA, and IP-Adapter.
Common Mistakes
- Downloading wrong model format: ComfyUI prefers safetensor format - Making incorrect node connections: Output and input types must be compatible - Using too many steps: 20-30 steps is sufficient for most models - Loading models exceeding VRAM: Use optimized models for 8GB GPUs
FAQ
**Should I use ComfyUI or Automatic1111?** ComfyUI offers more control and flexibility but has a steeper learning curve. If you're just starting, Automatic1111 provides an easier entry point. ComfyUI is recommended for advanced users and those wanting workflow automation.
**What's the minimum hardware for ComfyUI?** Minimum 6GB VRAM NVIDIA GPU required. 8GB+ VRAM recommended. AMD GPU support is limited. 16GB RAM and SSD disk improve performance.