How to install A1111 on MacOS (step by step guide) #2
Replies: 9 comments 60 replies
-
I downloaded the 0.0.2 a1111-setup script today and tried to run it, but it was unsuccessful:
So i tried following the "existing install" instructions above instead. @viking1304 - I wonder if it would be a good idea for a1111-setup.sh to include those commands if an existing install was detected? After doing these, the Web UI loaded up successfully :)
|
Beta Was this translation helpful? Give feedback.
-
This is the exact reason why I do not change command line args by default anymore. Git reset hard should restore the original file from A1111, where params are not set at all, and then it will change the command line only if you use the Since I have a feeling that your installation is still a bit messy, please do this:
|
Beta Was this translation helpful? Give feedback.
-
Hi @viking1304, First off, thanks for your step-by-step guide on getting A1111 up and running on my MACOS. I've found it really useful, but I'm getting an error with Steps 5 and 6 of the common steps. I've followed all the Steps before that for the new install. For Step 5, I'm encountering this error: And for Step 6, I'm running into this issue: I must admit, I've never really used the terminal – probably like five times in my entire life. So, any guidance on what I might be doing wrong would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for the helpful script. How do I proceed with an update?
Do I run the script again? Will the directories with the stable diffusion models and the generated images retained? |
Beta Was this translation helpful? Give feedback.
-
awesome script, thanks for making it! installing Forge with it significantly reduced time for image generation. but only for SD 1.5 models, SDXL models loading time is approx minute, moving takes around same time and 512x512px 20 steps image generation takes around 40 min. is there anything possible to get SDXL model working faster or just stick to SD 1.5? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the script, installation went without issues using the 0.1.0 script from 3 weeks ago. I have used A1111 some on PC, and decided it was time to try on MacOS. Running on Sonoma 14.4.1 on M3 Max w/36GB RAM, I've found that several of the sampling methods produce only static. To test, I'm just using the base 1.5 pruned. These samplers produce just static: I've tried a few variations of the command line args based on the mention of noise results, but those apparently were just for gpus on intel. Any suggestions on how to proceed? Should I try a different version of PyTorch? Also, does xformers work on arm macs? I'm getting conflicting information as I thought xformers was nvidia only, but some places mention it running on arm too. EDIT: OK, I'm not sure what fixed it, but I thought maybe it would be best to use the recommended Python version, so I backed down from 3.12 to 3.10.9. Maybe it was coincidence, but launching webui.sh, it downloaded a new torch nightly version, and the broken samplers are working. I assume once 2.4 is stable, we can switch from nightly to stable? |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you for uploading this tool and instruction. After a fresh install using your tool, I am still getting this error: AttributeError: 'NoneType' object has no attribute 'lowvram' (AUTOMATIC1111/stable-diffusion-webui#15793) What troubleshooting steps do you suggest? |
Beta Was this translation helpful? Give feedback.
-
I'm having an issue where I launch with There's definitely a 'venv' in the directory: ~/stable-diffusion-webui_dev/stable-diffusion-webui/venv But the installation just wanted to use my Homebrew's installation of Python and my system's PyTorch (2.1.2). I'm using pyenv to manage Python for my system (macOS Sonoma 14.4.1, M3 Max)—could that be causing the problem? Any help would be much appreciated. |
Beta Was this translation helpful? Give feedback.
-
First off thank you for the great script I really wished I had found it 2 weeks ago when I first started trying to get SD working on my mac!! I have hit a problem with your script when running against an existing install, it goes through all the stages and gets to the point of deletng venv and then resinstalling all the packages and then bombs out with 'No module named 'packaging'' as below.
I have tried completley deleting the previous install and the doing a fresh but it fails at the same point above. Do you have any thoughts why this is happening? |
Beta Was this translation helpful? Give feedback.
-
September 14th 2024 version
If you want to install Stable Diffusion webUI on your Mac or fix your current Stable Diffusion installation as fast as possible, use my a1111-setup script that will do everything for you.
Run
sh a1111-setup.sh
orchmod 755 a1111-setup.sh && ./a1111-setup.sh
. Wait a few minutes (depending on your computer and internet speed) until you see WebUI opened in your default browser.Of course, you can still use this step-by-step guide if you want full control.
Important note
Stable Diffusion webUI and Forge will automatically install the best version of PyTorch for you. Currently, it is 2.3.1 for ARM and 2.1.2 for Intel Macs. *as soon as I find some time to properly test Torch 2.4.1 I will create a new pull request
PyTorch dropped support for Intel Macs. The last version of PyTorch that properly works on Intel Macs with MacOS 14.4+ is 2.1.2
Development versions of PyTorch can still be used on ARM Macs, but I do not recommend that.
DO NOT try to install Stable Diffusion versions optimized for AMD cards (DirectML, Zluda...) on iMacs with Radeon, since Mac uses Metal even for Radeon Cards
Step by step guide
The original version of this guide was tested and has been working without a problem on those Mac models:
The latest version was tested on:
New install:
(if you are installing Stable Diffusion for the first time)
If Homebrew is not installed, follow the instructions at https://brew.sh to install it. Keep the terminal window open and follow the instructions under "Next steps" to add Homebrew to your PATH
Open a new terminal window and run
brew install cmake protobuf rust [email protected] git wget
Type
cd
to be sure that you are in your home folderClone the web UI repository by running
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
stable-diffusion-webui/models/Stable-diffusion
. If you skip this step, the default model will be downloaded.Temporary problem with the download of the default model (September 2024)
The default model, which was automatically downloaded by the webui, has been deleted from huggingface. You can download it from here or you can download any SD1.5 or SDXL model you like from https://civitai.com/
Put the model you downloaded into
stable-diffusion-webui/models/Stable-diffusion
.Existing install:
(if you have already installed Stable Diffusion)
Go to the stable-diffusion-webui folder using
cd stable-diffusion-webui
(if your installation is in another folder go to that folder instead)
Use
git reset --hard origin/master
to remove local changes of AUTOMATIC1111 filesUse
git pull
to update to the latest version of AUTOMATIC1111Run
venv/bin/pip cache purge
to clean pip’s wheel cacheRemove venv folder with
rm -rf venv
or using Finder.Common steps:
Please check if you still have
venv
folder inside your stable diffusion folder. If you have it, please go back to the Existing install part and do everything from that part fistOpen webui-user.sh, find this line
and add the line below to use the recommended command line parameters for Mac
Your webui-user.sh should look like this:
Note: Do not edit
webui.sh
orwebui-macos-env.sh
Optional step: Since some models might give you this error
run this command to fix that error in advance
More information here
./webui.sh
. A new Python virtual environment will be created and activated using venv and all missing dependencies will be automatically downloaded and installed. Web UI will be launched automatically at the endAdditional notes:
To relaunch the web UI process later, run
./webui.sh
again. To update, rungit pull
before running./webui.sh
In some cases, default command line parameters provided by the A1111 team are not the best choice, and in some rare cases, they do not work.
You can try and see which of the command line parameters below works the best for you.
Command line args for Macs implemented by the A1111 team:
My recommendation for Macs with 16 GB or more of RAM:
For Macs with less then 16 GB of RAM:
For special cases when
--no-half-vae
produce only noise:Those combinations also worked without error on my Macs:
Beta Was this translation helpful? Give feedback.
All reactions