ComfyUI
Start downloading this model (2.1GB) before going further.
To explore image generation, we will be using ComfyUI.
- Commercial services like ChatGPT or Midjourney are the easiest way to generate dramatic images
- The value of these images tends to be low because they are trivial to create
- We're going to use the ComfyUI graphical programming tool
- Think of ComfyUI as Max for AI Image Gen
ComfyUI has advantages and disadvantages:
- Pro: ComfyUI does a good job of exposing model internals and building understanding
- Pro: ComfyUI gives A LOT more control over the generation process
- Con: ComfyUI can be hard to install
- Con: ComfyUI is designed to run on a computer with a large GPU
Our goal is to build understanding, not dramatic images, so these tradeoffs are acceptable.
ComfyUI Installation
There are a lot of different ways to install ComfyUI. We will use the "manual" install method, because I have found it to work best on Mac as of Fall 2025.
1. Create the conda environment
First, install Miniconda if needed
- Type
which condain the terminal. - If the output is empty or you see
conda not found, you need to install Miniconda. Follow the install instructions.
Once you have Miniconda installed:
# Create a conda python environment
conda create -n comfyenv
conda activate comfyenv
conda install pytorch-nightly::pytorch torchvision torchaudio -c pytorch-nightly
2. Install ComfyUI
# Clone from git
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
pip install -r requirements.txt
A lot of ComfyUI tutorials you may find on the web use "custom nodes" and "custom models." Installing the ComfyUI manager can make installing addons easier. It is not necessary for class.
# Optional: Install the manager
git clone https://github.com/ltdrdata/ComfyUI-Manager custom_nodes/comfyui-manager
3. Download this Stable Diffusion model
Next, download the Comfy-Org/stable-diffusion-v1-5-archive model. Find the "download" button and put the resulting .safetensors file in the ComfyUI models/checkpoints/ directory.
4. Run ComfyUI
# If necessary, re-activate the conda env we created in step 1.
conda activate comfyenv
# Run
python main.py --force-fp32 --fp32-vae
Now you can go to http://127.0.0.1:8188 in your browser.
Resources
- But how do AI images and videos actually work? (YouTube)
- ComfyUI: Advanced Understanding (YouTube)
- The Oatmeal: A cartoonist's review of AI art
Two other ways to do image generation on a Mac
- DrawThings: A simple MacOS app for on-device generation
- ComfyUI Cloud: Use a powerful cloud computer running ComfyUI ($20/month)