How to install A1111 on MacOS (step by step guide) #2
Replies: 6 comments 26 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.
-
March 17th 2024 version
UPDATE:
IMPORTANT NOTE - since the macOS 14.4 update, in combination with PyTorch 2.2.0 and newer, breaks some samplers like Euler A, DPM++ 2S A and some others, PyTorch 2.1.2 should be used.
If you want to install a1111 or fix your current a1111 install as fast as possible, just use my a1111-setup script that will do everything for you.
Simply run
bash 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.I have also added a few command line parameters:
Of course, you can still use this step-by-step guide if you want full control.
Step by step guide
This guide uses the best command line settings I could find after a lot of experimenting. It also solves all the errors I experienced with A1111. It is based on the original post from this thread. I am just posting everything together for easier access to proper and updated information.
It was tested and has been working without a problem on those Mac models:
DO NOT try to install the AMD version on iMacs with Radeon since Mac uses Metal even for Radeon Cards
New install:
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 python@3.10 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
Optional step - place Stable Diffusion models/checkpoints you want to use into
stable-diffusion-webui/models/Stable-diffusion
. If you skip this step, the default model will be downloaded.Optional step - A1111 v1.8.0 introduced some breaking changes, which might affect clean installations of A1111. If you just installed A1111 and plan to use Controlnet, please do those additional steps:
venv/bin/pip install protobuf==3.20.3
venv/bin/pip install insightface==0.7.3
Existing install:
Go to the stable-diffusion-webui folder using
cd stable-diffusion-webui
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 PyTorch 2.1.2
In the same file, 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
Since some models might give you this error
TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
run this command to fix that error in advance
Run
./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.
Args for Macs implemented by the A1111 team:
My recommendation for most Macs:
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