The difference between an M2 air (8gb/512gb) versus an M1 pro (16gb/1tb) is much more than I expected. * M1 pro (16gb/1tb) can run the model in around 3 minutes. * M2 air (8gb/512gb) takes ~60 minutes for the same model. I knew there would be some throttling due to the m2 air's fanless model, but I had no idea it would be a 20x difference (albeit, the m1 pro does have double the RAM. I don't have any other macbooks t…
I suspect that the M2 air is thrashing the disk pretty aggressively. Diffusion models rerun the same model once per step, so for a generation with 50 steps, you copy the entire model in and out of memory 50 times. That's going to kill performance.
Run Stable Diffusion on Your M1 Mac’s GPU
131–140 of 415 posts
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#132This should be put into a docket image to avoid various potential conflicts with locally installed libraries. Anyone do this for the M1?
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#133Anyone know the largest possible image size > 512x512? I'm getting the following error when trying 1024x1024 with 64 GB RAM on M1 MAX: /opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appea…
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#134Anyone know the largest possible image size > 512x512? I'm getting the following error when trying 1024x1024 with 64 GB RAM on M1 MAX: /opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appea…
This means anything larger than 512x512 tends to confuse it. For example 1024x1024 will have 4 non-overlapping windows and many overlapping windows.
So if your prompt is "a cat wearing sunglasses", you may get 4 separate cats as the 512x512 windows have no knowledge of each other, and each window is trying to fulfill the goal. Even more likely you'll get some sort of eldrtich horror 16-legged cat being as the windows shuffle around.
Sometimes it just works perfectly somehow, but 90% of the time the non native resolution really screws it up. I'd suggest generating 512x512 images and using a different AI to upscale them in most cases.
However it does lead to some amazing fantasy landscape art as you get weird terrains and mountains shoved up against eachother in fantastic/magical ways.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#135Earlier quoted context omitted.
What kind of speed does this run at? Eg. How long to make a 512x512 image at standard settings?
For 512x512 on M1 MAX (32 core) with 64 GB RAM I'm getting 1.67it/s so 30.59s with the default ddim_steps=50.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#136Does running it locally give you anything over using the web version?
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#137Re: Run Stable Diffusion on Your M1 Mac’s GPU
#138Magnusviri[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…
Nice. We'll get this guide updated for this fork. Everything's moving so fast it's hard to keep track! We struggled to get Conda working reliably for people, which it looks like lstein's fork recommends. I'll see if we can get it working with plain pip.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#139How large an image will this handle (versus how much RAM you have)? It seems the GPU memory requirements beyond 512x512 are obscene.
Use external upscalers like RealESRGAN, SwinIR or BSRGAN or GFPGAN (faces).
Alternatively use hacks like txt2imghd to get it to natively create 1 MP images.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#140Has 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 have it working on an RX 6800, used the scripts from this repo[0] to build a docker image that has ROCm drivers and PyTorch installed. 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-d…
How long does it take to do 50 iterations on a 512x512?