stable-diffusion-webui
stable-diffusion-webui copied to clipboard
M1 installation failure
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.
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
@zendelian Try downloading the latest version of Anaconda for macOS. I hope this fixes your issue.
I was running into this.
Three issues I ran into that may help for anyone reading this later:
- 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 🙂 - 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.
Closing as stale.