Does running it locally give you anything over using the web version?
You can hack on it, modify it, integrate it with other code, etc!
Run Stable Diffusion on Your M1 Mac’s GPU
71–80 of 415 posts
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#72Re: Run Stable Diffusion on Your M1 Mac’s GPU
#73Has anybody had success getting newer AMD cards working? ROCm support seems spotty at best, I have a 5700xt and I haven't had much luck getting it working.
I'm running Ubuntu 22.04 LTS as the host OS, didn't have to touch anything beyond the basic Docker install. Next step is build a new Dockerfile that adds in the Stable Diffusion WebUI.[1]
[0] https://github.com/AshleyYakeley/stable-diffusion-rocm [1] https://github.com/hlky/stable-diffusion-webui
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#74How large an image will this handle (versus how much RAM you have)? It seems the GPU memory requirements beyond 512x512 are obscene.
Me now: "a red juicy apple floating in outer space, like a planet" --H 768 --W 768
Uses about 27GB. 1.81s/it.
Can't do 1024x1024 yet because of some hardcoded Metal issue (https://github.com/pytorch/pytorch/issues/84039.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#75Earlier quoted context omitted.
What kind of speed does this run at? Eg. How long to make a 512x512 image at standard settings?
I haven't installed from this link specifically, but I used one of the branches on which this is based a few days ago, so the results should be similar. On a first-gen M1 Mac mini with 8GB RAM, it takes 70-90 minutes for each image. Still feels like magic, but old-school magic.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#76Magnusviri[0], the original author of the SD M1 repo credited in this article, has merged his fork into the Lstein Stable Diffusion fork. You can now run the Lstein fork[1] with M1 as of a few hours ago. This adds a ton of functionality - GUI, Upscaling & Facial improvements, weighted subprompts etc. This has been a big undertaking over the last few days, and I highly recommend checking it out. See the mac m1 readme…
EDIT: Got it working, with a couple of pre-requisite steps:
0. `rm` the existing `stable-diffusion` repo (assuming you followed OP's original setup)
1. Install `conda`, if you don't already have it:
brew install --cask miniconda
2. Install the other build requirements referenced in OP's setup: brew install Cmake protobuf rust
3. Follow the main installation instructions here: https://github.com/lstein/stable-diffusion/blob/main/README-...Then you should be good to go!
EDIT 2: After playing around with this repo, I've found:
- It offers better UX for interacting with Stable Diffusion, and seems to be a promising project.
- Running txt2img.py from lstein's repo seems to run about 30% faster than OP's. Not sure if that's a coincidence, or if they've included extra optimisations.
- I couldn't get the web UI to work. It kept throwing the "leaked semaphor objects" error someone else reported (even when rendering at 64x64).
- Sometimes it rendered images just as a black canvas, other times it worked. This is apparently a known issue and a fix is being tested.
I've reached the limits of my knowledge on this, but will following closely as new PRs are merged in over the coming days. Exciting!
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#77For those as keen as I am to try this out, I ran these steps, only to run into an error during the pip install phase: > ERROR: Failed building wheel for onnx I was able to resolve it by doing this: > brew install protobuf Then I ran pip install again, and it worked!
What kind of speed does this run at? Eg. How long to make a 512x512 image at standard settings?
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#78Thanks for this - it's rare to see a setup guide that actually works on each step! I did need to run the troubleshooting step too, could probably just move that up as a required step in the guide.
Any Python packaging experts know what's going on? all macOS 12, arm64, Python 3.10. Can't think it wouldn't resolve the wheel.
But yes, good idea to move up. I'll stick it next to the `pip install`.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#79Earlier quoted context omitted.
I got stuck on this roadblock, couldn’t get CUDA to work on my Mac, was very confusing
Didn’t apple stop supporting Nvidia cards like 5 years ago? How could it be confusing that Cuda wouldn’t run?