· 3 min read
Note about using Stable Diffusion with NovelAI model on Mac
I saw a blog about using NovelAI model to generate waifu image so I would like to give it a shot ^-^ This is about setting up the application on Mac. So if you are using Windows or Linux, there are tons of tutorial out there.
Disclaimer
I have nothing to do with the leaked NovelAI model. I saw the news that a dude setup their password as password for their model so it got leaked. In addition, this happened in 2022, about 3 years from now. So I am just doing experiment with the leaked model on my machine and I didn’t have any profit from such incident.
Disclaimer 2
While checking some Chinese post, they mentioned they have some difficulty setting up Stable Diffusion due the unstable connection with Github. I am currently locate in Japan so I don’t have such problem. Therefore, my note is only usable for people out side of China. If you are in China, you will need some sort of proxy to speed it up.
Let’s Go
I was using this link as my reference. I am going to simplify it a bit :)
Steps
Download Models
Download NovelAI model if you still can find it from the internet in 2025
If you can’t find such model, you can still go to huggingface to download the model. Either 768-v-ema.ckpt or 768-v-ema.safetensors is OK, just one is safer than the other. Keep the model somewhere and we will use them later.
Install homebrew
Install homebrew if you don’t have it on your Mac by simply copy-pasting the following to your terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install python
Install python3.10 as stable diffusion is compatible with 3.10 but not above.
brew install cmake protobuf rust [email protected] git wgetInstall Stable Diffusion
Pull Stable Diffusion repo from Github. Then get into the repository folder
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
open .Now the folder will open from Finder. Paste the models you download previously to this folder.
Then back to your terminal. Execute the following command to create the virtual environment
./webui.sh:warning: However, if you are in the same situation as me, which already have Python3.12 installed local, you can’t execution the ./webui.sh command.
You will receive exception like the following
################################################################
Launching launch.py...
################################################################
=============================================================================================
INCOMPATIBLE PYTHON VERSION
This program is tested with 3.10.6 Python, but you have 3.12.1.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.
You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/In this case, you need to
- Delete the venv folder inside
stable-diffusion-webuifolder. This folder will exist if you run./webui.sh. If you didn’t see this folder, skip this step. - In terminal, while location is in
stable-diffusion-webui, execute commandpython3.10 -m venv venv. This will create an virtual environment with python3.10 for stable-diffusion. - Now, your environment should be clean. You should be able to run
./webui.shwithout any problem.
Once you are done, you will see the following in your terminal
Calculating sha256 for /Users/jianhengzhang/Documents/GitHub/stable-diffusion-webui/models/Stable-diffusion/768-v-ema.ckpt: Running on local URL: http://127.0.0.1:7860Now you can go to http://127.0.0.1:7860 to check out the UI and start using stable diffusion.