Fooocus - OSX

Fooocus’ objectives are two-fold, and is intended to combine the best features from Stable Diffusion and Midjourney.

  • Learned from Stable Diffusion, the software is offline, open source, and free.
  • Learned from Midjourney, the manual tweaking is not needed, and users only need to focus on the prompts and images.

Githubopen in new window

Installation on an M1/M2 Machine

Here’s step by step in terminal with comments only.

# cd into the folder where you want to install Fooocus
cd ~/sd

# Clone the repo 
git clone https://github.com/lllyasviel/Fooocus

# Change into the folder where you cloned the repo
cd Fooocus

# Make a virtualenv for SD.Next
pyenv virtualenv 3.10.9 fooocus

Install Pytorch Nightly for Apple Silicon

Official Apple Docs: Accelerated PyTorch Training on Macopen in new window

# Switch to the new virtualenv
pyenv shell fooocus

# Install Pytorch Nightly for Apple Silicon
# https://developer.apple.com/metal/pytorch/
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu

Verify that Pytorch Nightly is installed correctly

python

Enter the following into the Python shell

import torch
if torch.backends.mps.is_available():
    mps_device = torch.device("mps")
    x = torch.ones(1, device=mps_device)
    print (x)
else:
    print ("MPS device not found.")

If the Pytorch Nightly for Apple Silicon is installed correctly, it will output the following:

tensor([1.], device='mps:0')

You can now exit the Python shell by pressing Ctrl-D

Install libraries required by Foooocus

# Install Pygit
pip install pygit2==1.12.2

# Install packages required by Fooocus
cd ~/sd/Fooocus
pip install -r requirements_versions.txt

Start Fooocus

pyenv shell fooocus
cd ~/sd/Fooocus
python entry_with_update.py

The first time you run Fooocus, it will automatically download the Stable Diffusion SDXL models and will take a significant time, depending on your internet connection.

Editions

You can use additionally flags to launch specific editions of Fooocus.

Anime

python entry_with_update.py --preset anime

Realistic

python entry_with_update.py --preset realistic
Last Updated: