How to Install Automatic 1111 Stable Diffusion Web UI on MacOS M1/M2

  Рет қаралды 15,448

Prompting Pixels

Prompting Pixels

Күн бұрын

Here are the steps to get Automatic 1111's Stable Diffusion Web UI up and running on MacOS - tested on 14.0 (Sonoma).
You'll need to do the following:
1. Install Homebrew
2. Install the Necessary packages
3. Clone the webui repo
4. Start it up (perhaps with the --no-half parameter)
References
- GitHub Repo: github.com/AUTOMATIC1111/stab...
- Automatic 1111's instructions: github.com/AUTOMATIC1111/stab...
- Homebrew: brew.sh/
- Stable Diffusion 1.5 Checkpoint (for the model): huggingface.co/runwayml/stabl...
Time Stamps
Intro: 0:00
Homebrew: 0:30
Installing Homebrew Packages: 1:30
Clone Git Repo: 2:10
Adding Checkpoint File: 2:50
Starting the WebUI: 4:00
Error Handling (Upcast cross attention layer to float32) :5:10 (Don't use --no-half flag. Was a bug when making this video. --no-half uses 32-bit float values which are inefficient).
First Image Generation: 6:50
Updating Stable Diffusion: 7:35
Important links:
- 👾 Discord: / discord
- 🌐 Website: promptingpixels.com/
- 🛠️ GitHub: github.com/content-and-code

Пікірлер: 87
@ellegolding7938
@ellegolding7938 5 ай бұрын
After watching about 5 videos before yours, I wish I'd seen yours first. The easiest one and straight to the point. Very helpful. Thank you.
@PromptingPixels
@PromptingPixels 5 ай бұрын
Happy to hear the video was helpful. If you have any questions - feel free to drop in!
@drocologue
@drocologue Ай бұрын
when you use on mac is it too slow?
@ellegolding7938
@ellegolding7938 Ай бұрын
@@drocologue I don't know the benchmark for the speed or have a PC to compare it with so I can't really tell if it's too slow. It works fine for me and getting the job done :)
@mutantfaith508
@mutantfaith508 7 ай бұрын
the only instructions that worked for me
@PromptingPixels
@PromptingPixels 7 ай бұрын
Awesome!
@conhuir
@conhuir 8 ай бұрын
Thanks dude, very helpful!
@PromptingPixels
@PromptingPixels 7 ай бұрын
Awesome! Happy to hear!
@tomanforever
@tomanforever 17 сағат бұрын
straight to the point ! many thanks.
@WinstonHoang-ly7nb
@WinstonHoang-ly7nb 3 ай бұрын
i did it after watch your video. Thanks so much. !
@bahare7023
@bahare7023 4 ай бұрын
You're the best!!!!! I've been checking this video a lot. The others are all trush. You should put this video with different languages for the world!
@PromptingPixels
@PromptingPixels 4 ай бұрын
I think other creators have some merits to their videos- happy to hear you enjoyed the video.
@essaMOVIE
@essaMOVIE Ай бұрын
thank you so much! Finally!
@yusuf-js2nh
@yusuf-js2nh 7 ай бұрын
Thank you very much, it worked.
@PromptingPixels
@PromptingPixels 7 ай бұрын
Happy to hear you got Auto1111 up and running.
@franciscososa9436
@franciscososa9436 Ай бұрын
Thank you so much!!!
@wzx1229
@wzx1229 3 ай бұрын
Tons of thanks to you, Shawn! Your channel is a golden mine. I have always wanted to try stable diffusion. But due to the need for a command line, I have been hesitant to try it, because I'm not familiar with terminal. Until I saw your video, I finally decided to give a shot. I followed your video step by step, and Succeeded! Gosh, I'm extra excited, even though it took me two days to get it done! I finally got to use Stable Diffusion on my mac mini m1. It's all because of you! Thank you! I also have a question. when i booted sd webui, I got a warning"You are running torch 2.1.0.The program is tested to work with torch 2.1.2.To reinstall the desired version, run with commandline flag --reinstall-torch.Beware that this will cause a lot of large files to be downloaded, as well as there are reports of issues with training tab on the latest version." Does it mean i should update to torch 2.1.2 by entering "./webui.sh --reinstall-torch" in terminal?
@PromptingPixels
@PromptingPixels 3 ай бұрын
Hey - thank you for the kind words. So happy to hear you got things up and running! Yeah you could run with that command line flag to update torch (just do this once and thats it) - otherwise, if everything is running okay you could just ignore :-)
@wzx1229
@wzx1229 3 ай бұрын
@@PromptingPixels Thx for your reply! 😁
@RJMCTV
@RJMCTV 8 ай бұрын
Another question. To install additional models. Can I add them to the models folder whilst the Terminal and/or browser UI is still running, or should I quit out of it, add the models to the folder and then restart
@PromptingPixels
@PromptingPixels 8 ай бұрын
You should be able to add new models to stable-diffusion-webui/models/Stable-diffusion and click the refresh (🔄) icon next to dropdown at the top of the screen and it will load up the models you added. No need to quit and restart WebUI.
@mac_chappy
@mac_chappy 2 ай бұрын
I keep getting stuck at the 4:17 mark. When I type in the command to get it running I keep getting the message. "stable-diffusion-webui: No such file or directory". I don't understand why it keeps saying that when I know I have the folder.
@damlaerbahan
@damlaerbahan 6 ай бұрын
thank you
@PromptingPixels
@PromptingPixels 5 ай бұрын
Anytime!
@pandawithasthma
@pandawithasthma 6 ай бұрын
So im trying to generate an image but i get the following error: TypeError: Cannot convert a MPS Tensor to float dtype64 as the MPS framework doesn’t support float64. Please use float 32 instead. How do i fix this? Thanks alot
@PromptingPixels
@PromptingPixels 6 ай бұрын
Hey - unsure the exact solution is here. However, I would recommend giving this thread a read on the webui repo as it appears related to the problem you are encountering: github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12907 Hope this helps.
@zac_vaughn
@zac_vaughn 6 ай бұрын
so does this work with the 2.1 ckpt file?
@PromptingPixels
@PromptingPixels 5 ай бұрын
Yeah, just make sure that you set the image dimensions accordingly (768x768) otherwise will look like a jumbled mess. Talk about it here in this post: promptingpixels.com/difference-between-stable-diffusion-models/ Or in this video: kzfaq.info/get/bejne/eJh7mpmCstfKqp8.html With 2.x models, you have to also add in a .yaml config file (github.com/Stability-AI/stablediffusion/blob/main/configs/stable-diffusion/v2-inference-v.yaml)
@bwear42
@bwear42 5 ай бұрын
Hey There @PromptingPixels, Been following along, but hit a snag at the Starting the WebUI (4:15). I've made an ai-art folder in the same spot (Macintosh HD >User>brodywear>ai-art>stable-diffusion-webui>models>Stable-diffusion , done all the same steps up until now. When I copy paste 'cd stable-diffusion-webui' I get 'cd: no such file or directory: stable-diffusion-webui' Not sure what I need to do. Any assitance is appreciated.
@PromptingPixels
@PromptingPixels 5 ай бұрын
Hi @bwear42! Sounds like you need to navigate to the correct directory - in your instance that would be the following: /Users/brodywear/ai-art/stable-diffusion-webui So there are two ways of doing that. You can open up Terminal and just paste this command: cd /Users/brodywear/ai-art/stable-diffusion-webui OR you can open terminal (which defaults to your home directory - /Users/brodywear) and then type cd ai-art press enter - then type cd stable-diffusion-webui press enter again. To note the models/Stable-diffusion directory is where you store your models/checkpoints/safetensors files for image generation - you don't start up Automatic1111 from that directory. I'd recommend hopping into the discord (link in description) if you need additional help.
@RJMCTV
@RJMCTV 8 ай бұрын
Great. i got up and running on my M2 following this. Thanks. Just a couple of things for me. At 8:04 you say 'go ahead an quit it'. But not clear what command you use to quit it? and also the error you had on launch, I didn't get. Not sure why.
@PromptingPixels
@PromptingPixels 8 ай бұрын
Ah thanks for asking that - Control + C on mac will interrupt the command in terminal. As far as the error, i am not exactly why that was a problem (and still remains a problem) on my machine. It appears that the --no-half option has to do with the 16 bit floats (not a computer science engineer). Here are the official docs about the flags if you want to learn more: github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings
@tingliasmr
@tingliasmr 2 ай бұрын
I couldn't get past installing Homebrew as the Terminal wouldn't recognise my password although I restarted my mac straight after and quelle surprise it was fine. :/
@nilskrause7391
@nilskrause7391 3 ай бұрын
Hi, thanks for the great tutorial. When I try to start the .webui.sh I get the following error message: ERROR: Could not find a version that satisfies the requirement torch==2.1.0 (from versions: none) ERROR: No matching distribution found for torch==2.1.0 Do you have any idea what I can do? Thanks a lot!
@PromptingPixels
@PromptingPixels 3 ай бұрын
Looks like a problem with torch. Make sure you have python 3.10 on your machine. You can check this with the following command: python --version Its best to use a virtual environment to manage this such as venv or conda.
@user-nc4zb9bj9m
@user-nc4zb9bj9m 6 ай бұрын
HI! I can't figure out how to me to paste copied code from Homebrew(( help me please how to do this? I uploaded webSSH but I don't know which window to paste this saved code(
@PromptingPixels
@PromptingPixels 5 ай бұрын
Sorry for the late response! Would want to paste the homebrew code into terminal. I demo this in the video response: kzfaq.info/get/bejne/ortdpa-Xspu6kpc.htmlfeature=shared&t=448
@katerinabogoslovskaya1574
@katerinabogoslovskaya1574 4 ай бұрын
It worked! please tell me, long generation on macbook air m1 is normal or is it better to use collab?
@PromptingPixels
@PromptingPixels 4 ай бұрын
Happy to hear - yeah, the Mac isn't too quick when working with Stable Diffusion. Google isn't too supportive of diffusion models on Colab, you are likely better off using either a dedicated stable diffusion cloud provider, GPU rental, stable horde, or remotely borrowing a GPU (talk about some alternatives here: kzfaq.info/get/bejne/rMtnmZdmy9XWYZc.html)
@user-kh4do7el2g
@user-kh4do7el2g 5 ай бұрын
I don't understand the file to put in the models folder.....From where does it come????
@PromptingPixels
@PromptingPixels 5 ай бұрын
Hey, full response here: kzfaq.info/get/bejne/ortdpa-Xspu6kpc.htmlfeature=shared&t=163 Models (.ckpt or .safetensor files) should be in the stable-diffusion-webui/models/Stable-diffusion folder.
@arzhavskiy
@arzhavskiy 5 ай бұрын
Hi, man! Thanks for the video. Can you make a guide with Fooocus installation for Mac?
@arzhavskiy
@arzhavskiy 5 ай бұрын
I have installed everything with the guide. But my images generates extremely slow. Air M2, 8gb, Sonoma. 41.31s/it - is the result
@PromptingPixels
@PromptingPixels 5 ай бұрын
No problem! Likely shooting to have something in the next week or two. Full response here: kzfaq.info/get/bejne/ortdpa-Xspu6kpc.htmlfeature=shared&t=304
@PromptingPixels
@PromptingPixels 5 ай бұрын
I assume you are using a Stable Diffusion 1.x model? RAM will be the limitation here, also are you running hires fix? Feel free to jump into the Discord as it might be quicker/easier to diagnose (link in description).
@RobertWildling
@RobertWildling 7 ай бұрын
Thank you! But what does "--no-half" mean? What does it do?
@PromptingPixels
@PromptingPixels 7 ай бұрын
This was a great question!!! Did some reading about float values this weekend. --no-half basically enforces WebUI to use 32-bit float values - which is extremely inefficient. Instead, 16-bit float values should be used when possible. It will make things slightly quicker and less stress on the computer. --no-half was used in this video because there appears to be a bug due to macOS Sonoma. You can now run WebUI without setting --no-half. Additionally, I did a video response here that may be more helpful than the comment above: kzfaq.info/get/bejne/p8BxoJeHvdDeYo0.htmlsi=hci0tHGiuk2jXZ0n&t=25
@RobertWildling
@RobertWildling 7 ай бұрын
@@PromptingPixels Wow! Thank you very much for your extensive answer! Much appreciated!
@satoranchx6384
@satoranchx6384 6 ай бұрын
I updated go MacOS Sonoma and now it won’t run. Are there any solutions?
@PromptingPixels
@PromptingPixels 6 ай бұрын
So i explained something similar to this in a recent Q&A (linked here:kzfaq.info/get/bejne/p8BxoJeHvdDeYo0.html). It appears that early versions of Sonoma were causing issues requiring --half flag to be set upon boot to use 32 bit float values. This is not ideal as it will use more memory. You may need to do this when starting up WebUI. Here is the Github issue on the auto1111 repository for further reading: github.com/AUTOMATIC1111/stable-diffusion-webui/issues/11120 As a reference, when testing this on 14.1.2 I am able to run WebUI without issue. Let me know how it works out.
@yeahbaby8715
@yeahbaby8715 6 ай бұрын
I followed step by step for my Mac mini 16g and had the same error as yours, I was able to generate one simple image but it hasn't been working since, I tried to fill in the --no-half but I does nothing.. how did you close and reopen the program?
@eldionevruzi
@eldionevruzi 5 ай бұрын
Same here
@PromptingPixels
@PromptingPixels 5 ай бұрын
Errors are super hard to diagnose from a KZfaq comment. However, there may be a few things worth doing: 1. webui team released an update a month ago that may have fixed (or broken) things. Be sure to run git pull within terminal from the stable-diffusion-webui directory to make sure the app is up to date. 2. The --no-half flag tells webui to use float32 instead of float16. This fixed the bug in my original video. However, performance wise, you want to try avoid using the --no-half flag as it takes longer to generate images. 3. This bug with controlnet may be related to your issue (github.com/AUTOMATIC1111/stable-diffusion-webui/issues/13159). Try disabling controlnet or other extensions and see if it fixes the issue. 4. Consider joining the Discord (link in description) and we can chat further. Lastly, full video outlining the response above is here: kzfaq.info/get/bejne/ortdpa-Xspu6kpc.htmlfeature=shared&t=608
@PromptingPixels
@PromptingPixels 5 ай бұрын
Hey Eldionevruzi - check out the parent comment i just made. Might solve the issue with webui.
@abobsing
@abobsing 5 ай бұрын
someone to help please TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.
@PromptingPixels
@PromptingPixels 5 ай бұрын
Looks like the same problem for some on the Auto1111 webui repo. Here's a link where someone were able to get it to launch: github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12907#issuecomment-1707499651 Basically boot with the --disable-model-loading-ram-optimization flag. So like this: ./webui.sh --disable-model-loading-ram-optimization Let us know if this works so others in the comment experiencing the same issue can follow this on their Mac.
@pericocornejo2221
@pericocornejo2221 5 ай бұрын
hey dude.new subscriber here. I´m on the second step right now, but when I paste it on my terminal, it says "command not found". I followed every step perfectly. I dont understand. Please help me
@PromptingPixels
@PromptingPixels 5 ай бұрын
Hey there! Thanks for subbing 😁 Just to clarify - this is the brew install cmake protobuf rust python@3.10 git wget correct? If so this means that homebrew wasn't installed. Be sure to head to brew.sh and click on the copy icon and paste that into a terminal window and follow the instructions. Let me know if that works.
@1edber
@1edber 7 ай бұрын
any luck installing Stable Video Diffusion locally on an apple silicon based Mac? thanks! :D
@PromptingPixels
@PromptingPixels 7 ай бұрын
Getting there! Still getting everything covered on static images. Full response to your question is in this video: kzfaq.info/get/bejne/p8BxoJeHvdDeYo0.htmlsi=vffId-g6mJRNtx3n&t=338
@1edber
@1edber 7 ай бұрын
Awesome, thanks! Looking forward to that video when it comes. I subscribed for it! :D@@PromptingPixels
@BIGGEST99
@BIGGEST99 7 ай бұрын
When i close the terminal and try to open again, it wont open, nothing happen, can you please help me
@PromptingPixels
@PromptingPixels 7 ай бұрын
Hey - its a bit hard to follow your question, but shot a quick video that might help you out: kzfaq.info/get/bejne/od97l7mDyNGadIk.html
@Ryan-be2nv
@Ryan-be2nv 2 ай бұрын
Can we still use checkpoints from civitai?
@PromptingPixels
@PromptingPixels 2 ай бұрын
Yeah - won’t be a problem at all. On Mac, best to use those based on stable diffusion 1.5.
@drocologue
@drocologue Ай бұрын
can i have the specs of the computer you use for this
@etiennedorsay2308
@etiennedorsay2308 2 ай бұрын
"command not found : brew" how come ?
@PromptingPixels
@PromptingPixels 2 ай бұрын
Typically that'll happen if homebrew wasn't installed. Give that a try again and it should do the trick
@MichaelDoyle000
@MichaelDoyle000 4 ай бұрын
On launch, unfortunately, I got this comment: TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'. Everything stopped. Any ideas?
@PromptingPixels
@PromptingPixels 4 ай бұрын
Based on this StackOverflow thread (stackoverflow.com/questions/76712720/typeerror-unsupported-operand-types-for-type-and-nonetype) must be related to python version. Are you running at least python 3.10 on your machine? Put this into terminal to find out: python --version If Automatic1111 is running in a virtual env, then you'll need to make sure that you have that activated.
@RSV9
@RSV9 4 ай бұрын
Which works faster on Apple silicon, A1111 or ComfyUI ?
@PromptingPixels
@PromptingPixels 4 ай бұрын
Comfyui and webui-forge (effectively a fork of a1111) will be more performant
@RSV9
@RSV9 4 ай бұрын
@@PromptingPixels I didn't know that there was already a version of Forge for Apple silicon. So far I've only seen Forge for PC.
@PromptingPixels
@PromptingPixels 4 ай бұрын
​@@RSV9 Not officially supported per se - but was able to just git clone the repo and run webui.sh and was able to generate an image with no issue.
@PromptingPixels
@PromptingPixels 4 ай бұрын
@@RSV9As another note, I think the instructions are nearly identical as what I went over in the video - just change the url to this one when running git clone: github.com/lllyasviel/stable-diffusion-webui-forge.git
@RSV9
@RSV9 4 ай бұрын
@@PromptingPixels Thank you very much, I'll try it
@user-kh4do7el2g
@user-kh4do7el2g 5 ай бұрын
I don't know how to put the password for home-brew installation
@PromptingPixels
@PromptingPixels 5 ай бұрын
To run a sudo command, it will be your system password (same one you use to log onto your computer).
@ramidababo7068
@ramidababo7068 7 ай бұрын
where do u get the password from
@PromptingPixels
@PromptingPixels 7 ай бұрын
This should be your system password. Video response here: kzfaq.info/get/bejne/p8BxoJeHvdDeYo0.htmlsi=4BJSEKGU5DF4j6ZT&t=386
@quynam9
@quynam9 4 ай бұрын
at 0:44 how to know password ,please
@PromptingPixels
@PromptingPixels 4 ай бұрын
System password you use to logon (if not that - then admin password of computer)
@quynam9
@quynam9 3 ай бұрын
thanks so much @@PromptingPixels
@Ravisidharthan
@Ravisidharthan 5 ай бұрын
How fast the generation is 16 gigs m2 pro mini?
@PromptingPixels
@PromptingPixels 5 ай бұрын
According to this spreadsheet (docs.getgrist.com/3mjouqRSdkBY/sdperformance) of user reported stable diffusion benchmarks - probably somewhere around 1it/s for a 512x512 photo - this is just my best guess.
Moving Prompt Elements in Automatic 1111 Stable Diffusion WebUI
2:09
Installing Stable Diffusion Web UI on Apple Silicon M2 - A1111
2:53
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 190 МЛН
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 25 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 29 МЛН
Install ComfyUI on Mac OS (M1, M2 or M3)
9:49
AIAnimation
Рет қаралды 44 М.
Use Your Self-Hosted LLM Anywhere with Ollama Web UI
10:03
Decoder
Рет қаралды 63 М.
How to Install Stable Diffusion on M1 Macs
7:19
Laura Carnevali
Рет қаралды 78 М.
cute mini iphone
0:34
승비니 Seungbini
Рет қаралды 6 МЛН