Live data from Hacker News

Run Stable Diffusion on Your M1 Mac’s GPU

replicate.com

341–350 of 415 posts

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#341

Everyone 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 ran into many of these same problems when trying to replicate ROS environments five years ago. It's not Python's fault, it's just academics being bad at releasing software. After all, why would they?

In a university, ten steps to replicate the PI's personal environment is perfectly fine. How would releasing a single binary make their life any easier? Why would they bother?

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#342
post #76

Magnusviri[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…

Instructions don't work here, dead ends at

  FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt'
Looks like there's a step missing or broken at downloading the actual weights.

Going up to the parent repo points at a bunch of dead links or hugginface pages.

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#343

Everyone 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".

[deleted]

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#344
post #302

Everyone 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".

Interesting question to me is whether it's actually in part fundamental to the success of Python. There are plenty of "clean" ecosystems that avoid at least some of these issues. But in generally they fail to thrive in these type of spaces and people keep coming back to ecosystems that are messier. Is it possible that creativity and innovation actually require a level of chaos to succeed? Or alternatively, that chaos…

JavaScript is a much cleaner ecosystem but for some reason there's a long running stigma against it. It would work fine for this use case.

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#345
post #76

Earlier 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…

Instructions don't work here, dead ends at FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt' Looks like there's a step missing or broken at downloading the actual weights. Going up to the parent repo points at a bunch of dead links or hugginface pages.

You have to download the model from the huggingface[0] site first (requires a free account). The exact steps on how to link the file are then detailed here[1].

[0] https://huggingface.co/CompVis/stable-diffusion-v-1-4-origin... [1] https://github.com/lstein/stable-diffusion/blob/main/README-...

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#346
post #308

Earlier quoted context omitted.

What kind of speed does this run at? Eg. How long to make a 512x512 image at standard settings?

MacBook Air M2 8 CPU 8GB the example apple image took 35mins. Guess I'll wait for now.

You clearly doing something wrong as I get about 3 minutes per image on m1 mac mini.

But yeah, at this stage most of guides are early hacks and require individual tweaking. It is quite expected that people get varying results. I assume in a week or a month situation will get much better and much more user-friendly.

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#347

Very nice to see this available for hardware I own. Now I can achieve my dream of a Corporate Memphis + Hieronymus Bosch mashup.

Low entropy observer A38B gasps, spills his coffee and slams the panic button, triggering the 3758th reboot of the simulation.

“Sorry all. We can’t spare the hardware for THAT kind of recursive self improvement. Setting this instance back to 1970. GG”

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#348
post #333

Everyone 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".

It's not just the python, this is the experience practically everywhere and that's why people create containers etc. It's excruciatingly hard to setup the environment to start doing anything productive these days, you can't just start coding unless you use an IDE like Xcode or PyCharm.

Not sure about that. Golang or Rust have no such problem in my experience.

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#349
post #348
post #333

Earlier quoted context omitted.

It's not just the python, this is the experience practically everywhere and that's why people create containers etc. It's excruciatingly hard to setup the environment to start doing anything productive these days, you can't just start coding unless you use an IDE like Xcode or PyCharm.

Not sure about that. Golang or Rust have no such problem in my experience.

Maybe the difference is the legacy and the community? Golang and Rust kind of languages are geared toward software engineers and are pretty new, meanwhile things like Python or JS or anything very popular are used as tools by people great at things that are not necessarily in the domain of software engineering but they created very useful libraries and tools regardless which usually means piles and layers of very useful code that has poor engineering.

Re: Run Stable Diffusion on Your M1 Mac’s GPU

#350
post #333

Everyone 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".

It's not just the python, this is the experience practically everywhere and that's why people create containers etc. It's excruciatingly hard to setup the environment to start doing anything productive these days, you can't just start coding unless you use an IDE like Xcode or PyCharm.

JS isn't perfect, but it's so much easier to deal with than Python in these regards.
Post reply on HN