Last night I tried to get stable diffusion running on my ARM M1 Pro Mac. It wasn’t perfectly straightforward. If you’d like to watch a short video of the process checkout my YouTube!
Trying to run an example
The latest version of the model can be found on huggingface. Like most things ML, we’ll of course need python at first. I’m a fan of using asdf for this:
From the examples section of the huggingface model card we can see the python packages that we need to install:
pip install diffusers transformers accelerate scipy safetensors
Creating a virtual environment and installing the dependencies:
So far so good; now we’ll create a main.py
file with the example code:
Unfortunately running this we will get a failure:
Next Steps
AssertionError: Torch not compiled with CUDA enabled
This error about CUDA is the root of our issues. In the next video/post we’ll figure out how to fix this!