Installing Stable Diffusion

TLDR

Use this repo and tutorial if you are running on a Mac and it might just work without too much faff (assuming you have the right tools already installed like homebrew, Xcode command line tools, python, rust, etc.).

Download Tools

I'm following this tutorial, but it's Windows based.

Run in Terminal

I ran the first of these commands:

conda env create -f environment.yaml
conda activate ldm
mkdir models\ldm\stable-diffusion-v1

But got an error:

(base) [/Users/coreylatislaw/Documents/Code/Creative Coding/stable-diffusion] conda env create -f environment.yaml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound:
  - cudatoolkit=11.3

So I looked it up on Google, and this page suggests updating the .yaml file, which worked. I moved cudatoolkit to the pip section and then it started downloading and extracting packages. Hope I don't end up in some sys admin hell with python!

Downloaded and installed several of the packages and tools, but ran into this error

['/opt/miniconda3/envs/ldm/bin/python', '-m', 'pip', 'install', '-U', '-r', '/Users/coreylatislaw/Documents/Code/Creative Coding/stable-diffusion/condaenv.3kx8ylsq.requirements.txt']

Pip subprocess output:

Pip subprocess error:

ERROR: Invalid requirement: 'cudatoolkit=11.3' (from line 3 of /Users/coreylatislaw/Documents/Code/Creative Coding/stable-diffusion/condaenv.3kx8ylsq.requirements.txt)

Hint: = is not a valid operator. Did you mean == ?

failed

CondaEnvException: Pip failed

Ah, that's my bad, I moved the line without matching the others (I needed to switch the = for == when I moved it into the pip section.) The tutorial says that you need to delete the ldm folder if you interrupt the process and I got this error when I reran the command conda env create -f environment.yaml:

CondaValueError: prefix already exists: /opt/miniconda3/envs/ldm

So I'll delete the folder ldm and start again ... I get the same error wether or not I delete that repo. Hmmm ... Should I install the tool myself?

I noticed that conda updated my .zshrc: