Unlock ComfyUI on M3 Chip MacBook Pro: A Step-by-Step Installation Guide

CN
ComfyUI.org
2025-03-14 14:02:37

m88uhwh4r2jr6uq21p123.jpg

Here is the ComfyUI installation guide tailored for M3 chip MacBook Pro, covering both manual installation and one-click client methods, optimized for domestic network environments:


01—Preparation

  • System Requirements:

    • macOS 12.3 or higher (recommended to upgrade to the latest version).

    • Stable network connection (requires global VPN or mirror sources).

    • Reserve at least 10GB of storage space for model files (recommended to use an external SSD for expansion).


02—Manual Installation Guide (For Custom Needs)

Step 1: Install Basic Dependencies

# Install Homebrew (domestic mirror acceleration)
/bin/bash -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

# Install dependency packages
brew install cmake protobuf rust git wget python@3.10

Step 2: Create a Virtual Environment and Deploy ComfyUI

# Clone the repository
git clone https://github.com/comfyanonymous/ComfyUI.git ~/ComfyUI

# Create a virtual environment
cd ~/ComfyUI && python3 -m venv venv

# Activate the environment and install dependencies
source venv/bin/activate
pip install --upgrade pip
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
pip install -r requirements.txt

Step 3: Model Configuration

  • Method 1 (Recommended Mirror Download):

    wget -P ~/ComfyUI/models/checkpoints https://hf-mirror.com/LarryAIDraw/v1-5-pruned-emaonly/resolve/main/v1-5-pruned-emaonly.ckpt
  • Method 2 (Reuse SD-WebUI Models):

    mv ~/ComfyUI/extra_model_paths.yaml.example extra_model_paths.yaml
    sed -i '' 's#path/to/stable-diffusion-webui#~/stable-diffusion-webui#g' ~/ComfyUI/extra_model_paths.yaml

Step 4: Launch and Localization

  • Launch the Service:

    cd ~/ComfyUI && source venv/bin/activate
    python main.py --auto-launch --listen --output-directory ~/Desktop
  • Localization Settings:

    cd ~/ComfyUI/custom_nodes
    git clone https://github.com/AIGODLIKE/AIGODLIKE-COMFYUI-TRANSLATION.git

    After launching, select "Simplified Chinese" in the settings interface and click the "Switch Locale" button to apply.


03—One-Click Client Installation (For Beginners)

Step 1: Download ComflowySpace (Officially Recommended)

Visit the GitHub Releases page: https://github.com/6174/comflowyspace/releases
Select the version compatible with the M3 chip (e.g., ComflowySpace_Mac_ARM.dmg).

Step 2: Installation and Configuration

  • Double-click the installer and drag it to the Applications folder.

  • During the first launch, select the ComfyUI installation directory (recommended default path).

  • Switch the language to Chinese in the software settings and install the plugin manager:

Step 3: Launch and Usage

  • Click "Terminal" in the top-right corner of the software to get the local access address (e.g., http://127.0.0.1:8188).

  • Use built-in templates directly or import custom workflows (supports dragging .json files).


04—Troubleshooting Common Issues

  1. Dependency Installation Failure:
    Switch to a pip mirror source:

    pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
  2. Launch Error "numpy Version Conflict":

    pip uninstall numpy && pip install numpy==1.26.4
  3. Frequent Client Crashes:

    • Try the manual installation method.

    • Check system permissions (Settings - Privacy & Security - Allow ComflowySpace).


05—Advanced Optimization

  1. External Hard Drive Deployment:
    For manual installations, copy the entire ComfyUI folder to an external SSD and specify the path during launch:

    cd /Volumes/SSD/ComfyUI && source venv/bin/activate && python main.py
  2. Performance Tuning:
    Edit ~/.bash_profile to add environment variables for improved inference speed:

    export PYTORCH_ENABLE_MPS_FALLBACK=1
    export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.8

With the above steps, M3 chip MacBook Pro can run ComfyUI smoothly. Beginners are recommended to use the client first, while advanced users can opt for manual installation for deeper customization.