為什麼選擇 ComfyUI?

ComfyUI 是目前最強大的節點式 AI 繪圖介面,相比 Stable Diffusion WebUI(Automatic1111)有幾個優勢:


前置準備

硬體需求

軟體準備

  1. Python 3.10-3.12
  2. Git
  3. CUDA Toolkit(NVIDIA 顯卡)
python --version    # 3.10 以上
git --version       # 2.30 以上
nvidia-smi          # 確認 CUDA 版本

安裝步驟

1. 下載 ComfyUI

cd ~
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

2. 建立虛擬環境

python -m venv venv
source venv/bin/activate  # Linux/Mac

3. 安裝依賴套件

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt

4. 下載模型

ComfyUI/models/
├── checkpoints/      # SD 模型 (.safetensors)
├── unet/             # UNet 模型 (GGUF)
├── clip/             # CLIP 文字編碼器
└── vae/              # VAE 解碼器

Qwen Image Edit GGUF 模型:

5. 啟動 ComfyUI

python main.py                    # 基本啟動
python main.py --lowvram          # 低顯卡模式
python main.py --port 8188        # 指定 port

開啟瀏覽器進入 http://127.0.0.1:8188


安裝 ComfyUI-Manager(必裝)

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
cd ComfyUI-Manager
pip install -r requirements.txt

重啟後右下角會出現 Manager 按鈕。


第一張圖

測試 Prompt(中文)

吉卜力工作室風格,宮崎駿水彩畫風,柔和的陽光,翠綠的草地,天空飄著朵朵白雲

測試參數


常見問題

Q: CUDA out of memory?
→ 改用 python main.py --lowvram

Q: 中文 prompt 無法正確解讀?
→ 確認使用 Qwen Image Edit 模型,CLIP type 設為 qwen_image

Q: 如何匯出工作流?
→ 右上角 Save 按鈕 → 儲存為 JSON