1. 打开Terminal

  2. 安装Xcode

    xcode-select --install
    
    xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates
    出现这行,说明已经安装完成了
    
  3. 对版本

    python3 --version
    Python 3.11.5
    
    pip3 --version
    pip 23.2.1 from /opt/homebrew/lib/python3.11/site-packages/pip (python 3.11)
    
    git --version
    git version 2.39.2 (Apple Git-143)
    
    brew install python3
    brew install git
    
  4. 克隆Repo

    <https://github.com/comfyanonymous/ComfyUI>
    
  5. 安装虚拟环境

    cd ComfyUI
    python3 -m venv venv
    然后激活
    source venv/bin/activate
    
  6. 安装Pytorch Nightly Build

    # 注意,一定要安装nightly build,不能安装官网上的版本。
    pip3 install --pre torch torchvision torchaudio --extra-index-url <https://download.pytorch.org/whl/nightly/cpu>
    pip install git+https://github.com/pytorch/pytorch@refs/pull/114183/head git+https://github.com/pytorch/vision git+https://github.com/pytorch/audio
    
  7. 下载模型

    # SDXL Turbo
    <https://huggingface.co/stabilityai/sdxl-turbo/tree/main>
    
    # Stable Video Diffusion
    14 framerate
    <https://huggingface.co/stabilityai/stable-video-diffusion-img2vid/tree/main>
    25 framerate
    <https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt/tree/main>
    
    下载完成后把模型复制到这个目录里
    cd models/checkpoints
    
  8. 安装comfiyui manager

    cd custom_nodes
    git clone <https://github.com/ltdrdata/ComfyUI-Manager>
    
  9. 安装Python 依赖包

    cd ..
    pip install -r requirements.txt
    
  10. 加载模型

    cd models/checkpoints
    
  11. 启动ComfyUI

    python main.py --force-fp16
    
  12. 加载 Work Flow

  13. 点击Manager,然后安装custom nodes

  14. 加载模型,就可以使用了