DEV Community

Discussion on: Setting up Stable Diffusion for MacOS

Collapse
 
asmang profile image
Greg Asman • Edited

Thanks for the detailed instructions! Unfortunately, I'm getting stuck at environment creation where pip is failing with the message below. Any thoughts on how to get over this hurdle? Thanks again!

(Note: It appears to be an issue with onnx. I tried a pip install onnx and it went through every version unsucessfully.)

Pip subprocess error:
  Running command git fetch -q --tags
  Running command git reset --hard -q 24268930bf1dce879235a7fddd0b2355b84d7ea6
  Running command git fetch -q --tags
  Running command git reset --hard -q d50d76daa670286dd6cacf3bcd80b5e4823fc8e1
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      fatal: not a git repository (or any of the parent directories): .git
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/kk/qyr1f5dj017b338m860tt9dm0000gn/T/pip-install-5of30ges/onnx_8af078f05ebe4736b1b65355c7b7406b/setup.py", line 81, in <module>
          assert CMAKE, "Could not find cmake executable!"
      AssertionError: Could not find cmake executable!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed
Enter fullscreen mode Exit fullscreen mode
Collapse
 
careuno profile image
Carlos Merchán

im having the same issue, any clue?

Collapse
 
craigmorten profile image
Craig Morten • Edited

I’ll give my own instructions another go and see if can reproduce…

What version of python/pip are you using? IIRC you need to use python 3

Updates:

  1. If you followed the steps verbatim the conda installation step was incorrect - I have amended!
  2. Just noticed your error is regarding not having cmake, adding some env setup steps for this now! You need to install this brew install cmake
Thread Thread
 
careuno profile image
Carlos Merchán

I’ll check again installing cmake
Question: why are you using /Miniconda3-latest-MacOSX-x86_64.sh instead of /Miniconda3-latest-MacOSX-arm64.sh ?

Thread Thread
 
craigmorten profile image
Craig Morten

Miniconda3-latest-MacOSX-x86_64.sh is for "pre-M1" macs, e.g. I use a MacBook Air 2017 which uses an Intel chip.

Miniconda3-latest-MacOSX-arm64.sh is for Apple M1 😄

Thread Thread
 
careuno profile image
Carlos Merchán

I was confused because you use apple-silicon-mps-support branch and I thought you had a M1 cpu. Anyway now it's working for me, thanks