ComfyUI — Node-Based AI Image Generation
The most powerful modular AI image generation GUI with a node/graph editor. Supports Stable Diffusion, Flux, SDXL, ControlNet, and 1000+ custom nodes. 107K+ stars.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install 02888d06-d950-42f4-bc45-960c1f604ee4 --target codex先 dry-run,确认写入项后再运行此命令。
What it is
ComfyUI is a modular, node-based graphical interface for AI image generation. It supports Stable Diffusion, Flux, SDXL, ControlNet, IP-Adapter, and hundreds of other models. You build image generation pipelines by connecting nodes in a visual graph editor, giving you full control over every step from text encoding to VAE decoding.
ComfyUI is for AI artists, researchers, and developers who want precise control over their image generation pipeline without being limited by a simplified UI.
The project is actively maintained with regular releases and a growing user community. Documentation covers common use cases, and the open-source nature means you can inspect the source code, contribute fixes, and adapt the tool to your specific requirements.
How it saves time or tokens
Simplified UIs like Automatic1111 hide the generation pipeline behind tabs and dropdowns. When you need a custom workflow (multi-model blending, conditional branching, batch processing), you hit the UI's limits. ComfyUI exposes every operation as a node, so any workflow you can imagine is buildable. Saved workflows are shareable JSON files that reproduce results exactly.
How to use
- Clone ComfyUI and install Python dependencies.
- Place model checkpoints in the
models/directory. - Open the web UI and connect nodes to build your image generation pipeline.
Example
# Clone and install
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
# Download a model checkpoint
# Place .safetensors files in models/checkpoints/
# Start ComfyUI
python main.py
# Open http://127.0.0.1:8188 in your browser
// Example workflow node connection (simplified)
{
"nodes": [
{"id": 1, "type": "CheckpointLoader", "model": "sd_xl_base.safetensors"},
{"id": 2, "type": "CLIPTextEncode", "text": "a cat in a spaceship"},
{"id": 3, "type": "KSampler", "steps": 20, "cfg": 7.5},
{"id": 4, "type": "VAEDecode"},
{"id": 5, "type": "SaveImage"}
]
}
Related on TokRepo
- AI Tools for Design -- AI image generation and design tools
- AI Tools for Content -- Content creation and visual tools
Common pitfalls
- ComfyUI requires significant VRAM. SDXL models need at least 8GB VRAM. Running on low-VRAM GPUs causes out-of-memory errors during sampling.
- Custom nodes from the community can conflict with each other. Install one at a time and test after each addition.
- Workflow JSON files include model paths. Sharing workflows requires that the recipient has the same model files in the same directory structure.
Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.
常见问题
ComfyUI supports Stable Diffusion 1.5, SDXL, Flux, ControlNet, IP-Adapter, AnimateDiff, and many other models. Any model in .safetensors or .ckpt format can be loaded through the CheckpointLoader node.
Automatic1111 provides a traditional form-based UI that is easier to learn. ComfyUI uses a node graph that is more complex but far more flexible. ComfyUI is preferred for custom workflows and reproducible pipelines.
Yes, but it is extremely slow. Image generation with Stable Diffusion on CPU can take 10-30 minutes per image. A CUDA-compatible NVIDIA GPU is strongly recommended.
Custom nodes are community-built extensions that add new functionality to ComfyUI. They cover use cases like face restoration, upscaling, video generation, and specialized samplers. Install them via the ComfyUI Manager.
Yes, with the AnimateDiff and SVD custom nodes. Video generation workflows produce short animated sequences by generating frame-consistent images using temporal attention models.
引用来源 (3)
- ComfyUI GitHub— ComfyUI is a modular node-based AI image generation GUI
- ComfyUI README— Supports Stable Diffusion, SDXL, Flux, and ControlNet
- Stability AI— Stable Diffusion architecture and models
来源与感谢
Created by Comfy-Org. Licensed under GPL-3.0. Comfy-Org/ComfyUI — 107,000+ GitHub stars
讨论
相关资产
Pug — Clean Indentation-Based Template Engine for Node.js
Pug (formerly Jade) is a high-performance template engine for Node.js that uses indentation-based syntax to produce HTML, reducing boilerplate and making templates easier to read and maintain.
Omni Tools — Self-Hosted Web-Based Developer Utility Collection
A free, self-hosted collection of web-based tools for everyday developer tasks including converters, formatters, encoders, and image processors, with no ads or tracking.
Node-RED — Low-Code Flow-Based Programming for Event-Driven Applications
A browser-based visual programming tool for wiring together hardware devices, APIs, and online services using a drag-and-drop flow editor.
Socket.IO — Bidirectional Realtime Event-Based Communication
Socket.IO is a library that enables low-latency, bidirectional, event-based communication between a client and server. Built on WebSocket with fallbacks, automatic reconnection, room-based broadcast, and first-class Node.js support.