Live data from Hacker News

Run Stable Diffusion on Your M1 Mac’s GPU

replicate.com

301–310 of 415 posts

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

#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 is an inevitable byproduct of creativity and innovation, and any ecosystem where these are heavily frowned on deters the type of people who actually drive the cutting edge forward?

Just putting it out there as food for thought. It does translate back to quite often, that it acutally does make a lot of sense to do your prototyping and experimenting in one ecosystem but then leave that behind to deploy your production workloads where possible.

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

#303
post #293

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 don't think this is particularly fair. This is literally hours old, and people installing now are really debugging rather than installing a "finished" build. The forks are weird mashups of bits of repos, and running on a M1 GPU is something that barely works itself. Give it maybe 3 months and it will be much smoother.

My anecdotal experience is that it briefly gets better, then much worse. Build scripts downloading tarballs from dead URLs and dependencies on unspecified versions of libraries that have since had breaking API changes are frequent issues.

…it’s still awesome that people put in the effort to do these things at all, but the tools often have a tendency to make me feel like an archaeologist trying to piece what ancient artifacts are missing and how they were supposed to all fit together.

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

#304

I just got rick-rolled by the model. Using the prompt: "1990s textbook background mephis style"[sic] (yup I meant memphis)[0], I got back this: [1]. Rerunning the same prompt, I got: [2]. [0] https://files.littlebird.com.au/Shared-Image-2022-09-02-10-2... [1] https://files.littlebird.com.au/grid-0004-2xXAGF.png [2] https://files.littlebird.com.au/grid-0005-kcfgq7.png

The rick-roll is the NSFW filter. It's not actually that great at detecting NSFW content.

Thanks! You of course are right :)

    txt2img.py line 324 update to
    x_checked_image = x_samples_ddim #, has_nsfw_concept = check_safety(x_samples_ddim)
... disables the NSFW so you don’t get the rickroll images. It seems to be over enthusiastic in terms of its NSFW detection

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

#306

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 disagree, dependencies are sort of a universal problem. Ever had to set LD_LIBRARY_PATH?

Python is pretty much innocent here.

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

#307
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…

You can have an ecosystem that's chaotic (and vibrant) without its core pillars being chaotic (and shaky)

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

#308
post #21

For 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?

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

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

#309
post #288
post #47

Earlier quoted context omitted.

To be fair, the reason the filter is there is that if you ask for a picture of a woman, stable diffusion is pretty likely to generate a naked one! If you tweak the prompt to explicitly mention clothing, you should be OK though.

Wow, is that true? I’ve never heard a more textbook ethical problem with a model.

It's an ethical problem with our society, not the model.

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

#310
post #90

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…

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.

I couldn't get the setup process working until I switched the python distro to 3.10, as the scripts were relying on typings features that were added in 3.10 even though the yml file specified 3.9. Was strange.
Post reply on HN