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

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 99

  • @ellegolding7938
    @ellegolding7938 9 місяців тому +7

    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  9 місяців тому +1

      Happy to hear the video was helpful. If you have any questions - feel free to drop in!

    • @drocologue
      @drocologue 5 місяців тому

      when you use on mac is it too slow?

    • @ellegolding7938
      @ellegolding7938 5 місяців тому

      @@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 :)

  • @harmalalkaloid
    @harmalalkaloid 11 місяців тому +5

    the only instructions that worked for me

  • @wzx1229
    @wzx1229 6 місяців тому +1

    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  6 місяців тому +1

      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 6 місяців тому

      @@PromptingPixels Thx for your reply! 😁

  • @Joejitsu-101
    @Joejitsu-101 Місяць тому

    absolute genius. I'm a computer idiot and I still got it working. Thanks.

  • @conhuir
    @conhuir Рік тому +4

    Thanks dude, very helpful!

  • @bahare7023
    @bahare7023 8 місяців тому +1

    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  8 місяців тому

      I think other creators have some merits to their videos- happy to hear you enjoyed the video.

  • @WinstonHoang-ly7nb
    @WinstonHoang-ly7nb 7 місяців тому

    i did it after watch your video. Thanks so much. !

  • @Renee.Dominique1
    @Renee.Dominique1 День тому

    HuggingFace recommends using attention slicing on Apple Silicon (M1, M2). Is this supported in AUTOMATIC1111? Can it be added?

  • @tomanforever
    @tomanforever 3 місяці тому

    straight to the point ! many thanks.

  • @yusuf-js2nh
    @yusuf-js2nh 11 місяців тому +2

    Thank you very much, it worked.

    • @PromptingPixels
      @PromptingPixels  11 місяців тому +1

      Happy to hear you got Auto1111 up and running.

  • @willv88
    @willv88 12 днів тому

    Excellent tutorial! Do you know the best way to uninstall it if we need to free up space?

  • @essaMOVIE
    @essaMOVIE 5 місяців тому

    thank you so much! Finally!

  • @franciscososa9436
    @franciscososa9436 5 місяців тому +1

    Thank you so much!!!

  • @DonClassifieds
    @DonClassifieds Місяць тому

    how do you install install torch==2.3.1 torchvision==0.18.1?

  • @pandawithasthma
    @pandawithasthma 10 місяців тому +1

    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  10 місяців тому

      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.

  • @sambenito
    @sambenito 3 місяці тому

    How much space does the entire installation take up?

  • @wkitchen1945
    @wkitchen1945 3 місяці тому

    Thanks for the guide! I have a small issue: when I type the prompt 'cd stable-diffusion-webui' it replies 'cd: no such file or directory: stable-diffusion-webui'. I can't seem to open the folder with terminal, and am stuck at this point in the installation. I put the stable-diffusion-webui in a folder on my desktop. I'm not sure if that is that is causing the issue. I'm new to Mac, so I'm not sure how to fix this. Many thanks for any advice!

  • @marskog
    @marskog 3 місяці тому

    02:48 i cant get that folder thing going. it only says : cd: string not in pwd: stabel

  • @pericocornejo2221
    @pericocornejo2221 9 місяців тому +1

    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  9 місяців тому

      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.

  • @RSV9
    @RSV9 8 місяців тому +1

    Which works faster on Apple silicon, A1111 or ComfyUI ?

    • @PromptingPixels
      @PromptingPixels  8 місяців тому +1

      Comfyui and webui-forge (effectively a fork of a1111) will be more performant

    • @RSV9
      @RSV9 8 місяців тому

      @@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  8 місяців тому

      ​@@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  8 місяців тому +1

      @@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 8 місяців тому

      @@PromptingPixels Thank you very much, I'll try it

  • @Maximiliano-g1r
    @Maximiliano-g1r 9 місяців тому

    I don't understand the file to put in the models folder.....From where does it come????

    • @PromptingPixels
      @PromptingPixels  9 місяців тому

      Hey, full response here: ua-cam.com/video/lU-rLfM5Vbc/v-deo.htmlfeature=shared&t=163
      Models (.ckpt or .safetensor files) should be in the stable-diffusion-webui/models/Stable-diffusion folder.

  • @satoranchx6384
    @satoranchx6384 10 місяців тому +1

    I updated go MacOS Sonoma and now it won’t run. Are there any solutions?

    • @PromptingPixels
      @PromptingPixels  10 місяців тому

      So i explained something similar to this in a recent Q&A (linked here:ua-cam.com/video/qZAm4VXjz2Y/v-deo.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.

  • @katerinabogoslovskaya1574
    @katerinabogoslovskaya1574 8 місяців тому

    It worked! please tell me, long generation on macbook air m1 is normal or is it better to use collab?

    • @PromptingPixels
      @PromptingPixels  8 місяців тому

      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: ua-cam.com/video/ve7f45for1c/v-deo.html)

  • @bwear42
    @bwear42 9 місяців тому

    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  9 місяців тому +1

      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.

  • @Ryan-be2nv
    @Ryan-be2nv 6 місяців тому

    Can we still use checkpoints from civitai?

    • @PromptingPixels
      @PromptingPixels  6 місяців тому

      Yeah - won’t be a problem at all. On Mac, best to use those based on stable diffusion 1.5.

  • @mac_chappy
    @mac_chappy 6 місяців тому

    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.

    • @aligirl4204
      @aligirl4204 2 місяці тому +1

      Same issue. After I tried a couple of times it gives "permission denied"... This video has 8 minutes and I ma here for two days now trying to install this crap. I wish they could talk about the issues that may arise , not only showing how easy it is to install a program. It's not easy at all

    • @mac_chappy
      @mac_chappy 2 місяці тому

      @@aligirl4204 You found any other videos that would help? I'm really trying to get this on my computer.

  • @MichaelDoyle000
    @MichaelDoyle000 7 місяців тому

    On launch, unfortunately, I got this comment: TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'. Everything stopped. Any ideas?

    • @PromptingPixels
      @PromptingPixels  7 місяців тому

      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.

  • @drocologue
    @drocologue 5 місяців тому

    can i have the specs of the computer you use for this

  • @tingliasmr
    @tingliasmr 6 місяців тому

    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. :/

  • @etiennedorsay2308
    @etiennedorsay2308 6 місяців тому

    "command not found : brew" how come ?

    • @PromptingPixels
      @PromptingPixels  6 місяців тому +1

      Typically that'll happen if homebrew wasn't installed. Give that a try again and it should do the trick

  • @RJMCTV
    @RJMCTV 11 місяців тому +1

    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  11 місяців тому

      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

  • @nilskrause7391
    @nilskrause7391 7 місяців тому

    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  7 місяців тому

      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.

  • @ExplorewithZac
    @ExplorewithZac 10 місяців тому

    so does this work with the 2.1 ckpt file?

    • @PromptingPixels
      @PromptingPixels  9 місяців тому

      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: ua-cam.com/video/B2Kg6QMqfzk/v-deo.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)

  • @RobertWildling
    @RobertWildling 11 місяців тому +1

    Thank you! But what does "--no-half" mean? What does it do?

    • @PromptingPixels
      @PromptingPixels  10 місяців тому +1

      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:
      ua-cam.com/video/qZAm4VXjz2Y/v-deo.htmlsi=hci0tHGiuk2jXZ0n&t=25

    • @RobertWildling
      @RobertWildling 10 місяців тому

      @@PromptingPixels Wow! Thank you very much for your extensive answer! Much appreciated!

  • @arzhavskiy
    @arzhavskiy 9 місяців тому

    Hi, man! Thanks for the video. Can you make a guide with Fooocus installation for Mac?

    • @arzhavskiy
      @arzhavskiy 9 місяців тому

      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  9 місяців тому

      No problem! Likely shooting to have something in the next week or two. Full response here: ua-cam.com/video/lU-rLfM5Vbc/v-deo.htmlfeature=shared&t=304

    • @PromptingPixels
      @PromptingPixels  9 місяців тому

      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).

  • @1edber
    @1edber 11 місяців тому +1

    any luck installing Stable Video Diffusion locally on an apple silicon based Mac? thanks! :D

    • @PromptingPixels
      @PromptingPixels  10 місяців тому +1

      Getting there! Still getting everything covered on static images. Full response to your question is in this video:
      ua-cam.com/video/qZAm4VXjz2Y/v-deo.htmlsi=vffId-g6mJRNtx3n&t=338

    • @1edber
      @1edber 10 місяців тому

      Awesome, thanks! Looking forward to that video when it comes. I subscribed for it! :D@@PromptingPixels

  • @UkrainianCrimeanTatarsistersin
    @UkrainianCrimeanTatarsistersin 10 місяців тому

    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  9 місяців тому

      Sorry for the late response! Would want to paste the homebrew code into terminal. I demo this in the video response: ua-cam.com/video/lU-rLfM5Vbc/v-deo.htmlfeature=shared&t=448

  • @abobsing
    @abobsing 8 місяців тому

    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  8 місяців тому

      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.

  • @RJMCTV
    @RJMCTV 11 місяців тому

    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  11 місяців тому

      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.

  • @damlaerbahan
    @damlaerbahan 10 місяців тому

    thank you

  • @Maximiliano-g1r
    @Maximiliano-g1r 9 місяців тому

    I don't know how to put the password for home-brew installation

    • @PromptingPixels
      @PromptingPixels  9 місяців тому

      To run a sudo command, it will be your system password (same one you use to log onto your computer).

  • @yeahbaby8715
    @yeahbaby8715 10 місяців тому

    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 9 місяців тому

      Same here

    • @PromptingPixels
      @PromptingPixels  9 місяців тому

      Errors are super hard to diagnose from a UA-cam 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: ua-cam.com/video/lU-rLfM5Vbc/v-deo.htmlfeature=shared&t=608

    • @PromptingPixels
      @PromptingPixels  9 місяців тому

      Hey Eldionevruzi - check out the parent comment i just made. Might solve the issue with webui.

  • @BIGGEST99
    @BIGGEST99 11 місяців тому

    When i close the terminal and try to open again, it wont open, nothing happen, can you please help me

    • @PromptingPixels
      @PromptingPixels  11 місяців тому

      Hey - its a bit hard to follow your question, but shot a quick video that might help you out:
      ua-cam.com/video/kyKdVRck6DU/v-deo.html

  • @Rachelcenter1
    @Rachelcenter1 3 місяці тому

    4:13 terminal is telling me: "INCOMPATIBLE PYTHON VERSION This program is tested with 3.10.6 Python, but you have 3.12.4. If you encounter an error with "RuntimeError: Couldn't install torch." message, or any other error regarding unsuccessful package (library) installation, please downgrade (or upgrade) to the latest version of 3.10 Python and delete current Python and "venv" folder in WebUI's directory." :(
    in the learn python reddit, they're saying I can use something call Venv in a virtual environment to choose which version of python to use. Sigh, more to learn. this will take a few hours to master.

  • @ramidababo7068
    @ramidababo7068 10 місяців тому +1

    where do u get the password from

    • @PromptingPixels
      @PromptingPixels  10 місяців тому

      This should be your system password. Video response here:
      ua-cam.com/video/qZAm4VXjz2Y/v-deo.htmlsi=4BJSEKGU5DF4j6ZT&t=386

  • @quynam9
    @quynam9 7 місяців тому

    at 0:44 how to know password ,please

    • @PromptingPixels
      @PromptingPixels  7 місяців тому +1

      System password you use to logon (if not that - then admin password of computer)

    • @quynam9
      @quynam9 7 місяців тому +1

      thanks so much
      @@PromptingPixels

  • @Ravisidharthan
    @Ravisidharthan 8 місяців тому

    How fast the generation is 16 gigs m2 pro mini?

    • @PromptingPixels
      @PromptingPixels  8 місяців тому

      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.

  • @Rachelcenter1
    @Rachelcenter1 3 місяці тому

    i finally figured out how to get multiple python versions installed at once (ua-cam.com/video/31WU0Dhw4sk/v-deo.html) so then I went back to your tutorial to do that command at 4:13 into your video. and i saw terminal saying "Install script for stable-diffusion + Web UI", but then once it got done doing its thing it said:
    error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib -- -C 'link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/tokenizers.cpython-312-darwin.so'` failed with code 101
    [end of output]
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for tokenizers
    ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (Pillow, tokenizers)
    So I guess its not installed? Not sure where to go from here or how to troubleshoot that.