Earlier quoted context omitted.
The answer depends VERY MUCH on RAM. My M1 with 8GB takes 70-90 minutes per image. My M1 Pro with 16GB takes 3 minutes per image.
Hopefully the library is intentionally going very slowly trying to fit in RAM and that's not just your 8GB machine totally falling over.
Run Stable Diffusion on Your M1 Mac’s GPU
371–380 of 415 posts
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#372Is there anyway to keep up with this stuff / beginners guide? I really want to play around with it but it's kinda confusing to me. I don't have an M1 Mac, I have an Intel one with an AMD GPU, not sure if i can run it? don't mind if it's a bit slow, or what is the best way of running it in the cloud? Anything that can product high res for free?
Have you managed to set it up? I might have the same computer as you.
Looks like it's going to be a lot of fun though.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#373Earlier quoted context omitted.
JS isn't perfect, but it's so much easier to deal with than Python in these regards.
I've had the exact same issues with the JS ecosystem (ran into a problem where npm wouldn't work but yarn did, still haven't figured out why). Both are easy and reliable with a few months of experience. Both are terrible if you rarely ever use them.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#374Re: Run Stable Diffusion on Your M1 Mac’s GPU
#375Without k-diffusion support, I don't think this replicates Stable Diffusion experience: https://github.com/crowsonkb/k-diffusion Yes, running on M1/M2 (MPS device) was possible with modifications. img2img and inpainting also works. However you'll run into problems when you want k-diffusion sampling or textual inversion support.
stable-diffusion supports k-diffusion just fine on M1. You just have to detach a tensor in to_d() to stop the values exploding to infinity. https://twitter.com/Birchlabs/status/1563622002581184517?s=2...
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#376Re: Run Stable Diffusion on Your M1 Mac’s GPU
#377Earlier quoted context omitted.
Brilliant, thank you! I just got OP's setup working, but this seems much more user-friendly. Giving it a try now... 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 inst…
I had to manually install pytorch for the preload_models.py step to work, because ReduceOp wasn't found. Why even use anaconda if all the dependencies aren't included? Every time I touch an ML project, there's always a python dependency issue. How can people use a tool that's impossible to provide a consistent environment for?
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#378Earlier quoted context omitted.
> Python is pretty much innocent here. Could not possibly disagree more. https://xkcd.com/1987/ The problem with dependencies is that for very bad reasons people don’t ship them. Someone needs to package SD with a full copy of the Python runtime and every dependency. This should be the default method of distribution. #ShipYourDamnDependencies
Just don't mess up your system. The tutorial linked works perfectly fine in a clean python environment. That XKCD is more about messing up your system by not knowing what you're doing but randomly following shitty tutorials which suggest stuff that collide with each other... Python's only fault in this is that it's a simple language and thus attracts people who aren't software engineers (students and math majors) and…
You know what’s radically simpler? Shipping your damn dependencies so all any user needs to do is double-click the launcher and it will always work no matter what weird and bad things your user as done. The fact that “keep your system clean” is a thing anyone thinks about ever is a catastrophic failure.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#379Earlier quoted context omitted.
To run stable diffusion at home you have to download the model file, which took the equivalent of tens of thousands of hours spread across cloud provided GPUs. If the model file just vanished from everyone's hard drive one day, and cloud providers installed heuristics to detect and ban image dataset training, retraining the model file would actually take decades for any consumer, even an enthusiast with a dozen power…
You forget how much mark-up cloud providers charge. I trained StyleGAN 2 from scratch using 8x 3090s at home and it took 3 months. It's fine. 240TB is small fish, my homelab is a petabyte and I consider it small.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#380Magnusviri[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…
Brilliant, thank you! I just got OP's setup working, but this seems much more user-friendly. Giving it a try now... 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 inst…
The command that finally worked for me:
python3 -m venv venv
. venv/bin/activate
CFLAGS="-I /opt/homebrew/opt/openssl@1.1/include" LDFLAGS="-L /opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/Cellar/openssl@1.1/1.1.1q/lib -lssl -lcrypto" PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip install -r requirements.txt