stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

M1 installation failure

Open zendelian opened this issue 2 years ago • 3 comments

Describe the bug Attempting to install on M1 Mac but encountered the following error messages:

All files are in place. Continuing installation. ./setup_mac.sh: line 97: pip: command not found ./setup_mac.sh: line 99: pip: command not found ./setup_mac.sh: line 101: pip: command not found ./setup_mac.sh: line 106: pip: command not found ./setup_mac.sh: line 109: pip: command not found ./setup_mac.sh: line 115: pip: command not found ./setup_mac.sh: line 118: pip: command not found ./setup_mac.sh: line 121: conda: command not found ./setup_mac.sh: line 124: conda: command not found ./setup_mac.sh: line 125: conda: command not found

====================ERROR====================

The PYTORCH_ENABLE_MPS_FALLBACK variable is not set. This means that the script will either fall back to CPU or fail. To fix this, please run the following command: conda env config vars set PYTORCH_ENABLE_MPS_FALLBACK=1 Or, try running the script again.

====================ERROR====================

Desktop (please complete the following information):

  • OS: Macbook Pro M1
  • Installation based on M1 instructions from Oct 10

Additional context Installed using the commands in the instructions. Not overly familiar with using Terminal.

zendelian avatar Oct 11 '22 20:10 zendelian

conda create --name web-ui
conda activate web-ui
conda env config vars set PYTORCH_ENABLE_MPS_FALLBACK=1
conda deactivate

then reexecute setup_mac.sh

zicjin avatar Oct 13 '22 01:10 zicjin

@zendelian Try downloading the latest version of Anaconda for macOS. I hope this fixes your issue.

PixelatedJack avatar Oct 18 '22 00:10 PixelatedJack

I was running into this.

Three issues I ran into that may help for anyone reading this later:

  1. When you brew install conda, it is not automatically added to your PATH. If you are not familiar with the PATH variable, see here. Not having conda in the path means that the error you are shown cannot be resolved because the command (I think silently iirc?) fails. You can check whether in path by running conda and seeing if the command is recognized. Apologies if this is too detailed for any readers, but I know many less technical folks are interested in this project 🙂
  2. The error recommends setting the PYTORCH_ENABLE_MPS_FALLBACK var, which will silently fail (or work with no effect maybe? I am not super familiar with conda). To deal with this, run conda init or follow @zicjin's recommendation above.

dgolant avatar Nov 07 '22 19:11 dgolant

Closing as stale.

catboxanon avatar Aug 03 '23 17:08 catboxanon