Earlier quoted context omitted.
> Also, interesting/curious small note: images generated with this script are "invisibly watermarked" i.e. steganographied! Why?
So that future iterations of StableDiffusion (or similar models) don't end up getting trained on their own outputs.
Run Stable Diffusion on Your M1 Mac’s GPU
311–320 of 415 posts
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#312Earlier quoted context omitted.
I ran into: ImportError: cannot import name 'TypeAlias' from 'typing' (/opt/homebrew/Caskroom/miniconda/base/envs/ldm/lib/python3.9/typing.py)
I followed the conda instruction which uses Python 3.9 and ran into the same issue. The workaround is to import TypeAlias from typing_extensions: stable-diffusion/src/k-diffusion/k_diffusion/sampling.py (before) from typing import Optional, Callable, TypeAlias (after) from typing import Optional, Callable from typing_extensions import TypeAlias This issue is tracked in https://github.com/lstein/stable-diffusion/issue…
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#313Magnusviri[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…
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#314Everyone posting their pip/build/runtime errors is everything that's wrong with tooling built on top of python and its ecosystem. It would be nice to see the ML community move on to something that's actually easily reproducible and buildable without "oh install this version of conda", "run pip install for this package", "edit this line in this python script".
I found a pretty great Docker image for the SD webui. I was forced to extreme measures since NixOS isn't super friendly with Conda (and I was particularly lazy). Worked out fine in the end, though. Highly recommended if you're on an Nvidia rig: https://github.com/AbdBarho/stable-diffusion-webui-docker
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#315Re: Run Stable Diffusion on Your M1 Mac’s GPU
#316Re: Run Stable Diffusion on Your M1 Mac’s GPU
#317Is there a good set of benchmarks available for Stable Diffusion? I was able to run a custom Stable Diffusion build on a GCE A100 instance (~$1/hour) at around 1Mpix per 10 seconds. I.e, I could create a 512x512 image in 2.5 seconds with some batching optimizations. A consumer GPU like a 3090 runs at ~1Mpix per 20 seconds. I'm wondering what the price floor of stock art will be when someone can use https://lexica.art…
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#318Are we being pranked? I just followed the steps but the image output from my prompt is just a single frame of Rick Astley... EDIT: It was a false-positive (honest!) on the NSFW filter. To disable it, edit txt2img.py around line 325. Comment this line out: x_checked_image, has_nsfw_concept = check_safety(x_samples_ddim) And replace it with: x_checked_image = x_samples_ddim
Same thing happened to me which is especially odd as I literally just pasted the example command.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#319Magnusviri[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
#320It's insane to me how fast this is moving. I jumped through a bunch of hoops 2-3 days ago to get this running on my M1 Mac's GPU and now it's way easier. I imagine we will have a nice GUI (I'm aware of the web-ui, I haven't set it up yet) packaged in an mac .app by the end of next week. Really cool stuff.
I hope this kickstarts some kind of M1 migration. There are so many ML projects I'd like to try, but they all depend on CUDA.