Live data from Hacker News

Run Stable Diffusion on Your M1 Mac’s GPU

replicate.com

401–410 of 415 posts

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

#401
post #368
post #78

Earlier quoted context omitted.

It isn't required for some (most?) users. Weirdly sometimes pip is picking up the wheel for `onnx`, sometimes it isn't, and we can't figure out why. Any Python packaging experts know what's going on? all macOS 12, arm64, Python 3.10. Can't think it wouldn't resolve the wheel. But yes, good idea to move up. I'll stick it next to the `pip install`.

Please consider also adding a small note to help those few that get stuck with this bug: RuntimeError: expected scalar type BFloat16 but found Float The solution is easy: append the execution command with `--precision full`

This worked for me as well, thanks!

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

#402

Earlier quoted context omitted.

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…

If your solution is “spend a lot of time learning a lot of rules and make sure you never accidentally do something you shouldn’t” then your solution is fragile and shitty. 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 t…

stable diffusion is a work of researchers, not engineers, it's not a released product, it's an attachment to a research paper... researchers shouldn't need to know anything about releasing a software product...

you see it here on hacker news, because it's open source and thus hackers can and do already play with it..

as it's an interesting piece of software, I'm pretty sure someone will eventually make an easy to use GUI app based on it that ships all dependencies, but it's not yet at that stage,

this article is literally about the first easy (for a software engineer who knows python) way to run it on M1 macs, these people literally just discovered which versions of their dependencies work and share their work to invite other people to help them build something on top of it....

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

#403
As a side bit, this model appears to have difficulty with the prompt "wolf with bling walking down a street" and often generates an image that I am fairly sure is not unique and is not representative of the idea that is trying to be communicated in that text.

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

#404
Anyone else surprised that the results just aren't very good? I followed the instructions and it works, but just seems kinda-like deep dream level results circa 2005. Lots of blurry eyes in the wrong spots, most objects seem really blurrly and cut off. Nothing like the demo examples I've seen online. Are the default options not optimal to get the best results?

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

#405
post #321

Earlier quoted context omitted.

Yes there is a fair amount of truth in that. I do think that experience helps here. I have a recipe for installing Python that works on most python projects most of the time. git clone python3 -m venv ./venv source ./venv/bin/activate pip install -r requirements.txt deactiviate # need to do this to include the correct command line tools in path (eg Jupyter) source ./venv/bin/activate Done. On a Linux or Intel Mac sys…

Also, sorry to double post, but you don't actually need to activate the venv. You can just invoke `venv/bin/pip`. That should hopefully save you a bit of time and annoyance.

That's bad advice for two reasons:

Firstly, non-experiences Python users (the kind who need recipes to follow) will also blindly follow installation instructions on websites. These all say "pip install xxx" and users will inevitably forget they need to change the path to make that work for their environment. By getting into the habit of activating the environment this problem goes away.

Secondly, you do need to activate the venv so that command line tools in ./venv/bin are used (instead of whatever is in your default path).

This includes both the correct version of python (if you set it when you setup the virtual environment) and importantly jupyter. From personal experience there's a whole set of pain when you don't realize your jupyter isn't the one inside the virtual environment and so is using other libraries.

Because many shells cache the location of executables, if you don't deactivate and reactivate your virtual environment after installing Jupyter into it then it may (in some circumstances) use a globally installed version.

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

#407

I'm ready to pay for a Windows + AMD GPU guide at this point, why is there no single blogpost on this, please help.

I was like you, but man $2,000 no thanks. This saved my budget and time https://github.com/glonlas/Stable-Diffusion-Apple-Silicon-M1...

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

#408
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.

If you consider that the training set includes all western art from the last few centuries it’s not too surprising. There’s an awful lot of nudes in that set & most of them are female.

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

#409
post #315

I just found out that Activity Monitor doesn't show GPU activity. :(

Perhaps you just missed it. It appears as a column on the CPU tab.

I guess I meant the Dock icon doesn't show GPU's, only CPU history.

But, I didn't know about the feature. I just tried it and it went to 98% while running SD.

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

#410

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…

What do I need for the in painting? is there a source for the models/ldm/inpainting_big/last.ckpt' file?

I used this: wget -O models/ldm/inpainting_big/last.ckpt https://heibox.uni-heidelberg.de/f/4d9ac7ea40c64582b7c9/?dl=... Found it here: https://huggingface.co/spaces/multimodalart/latentdiffusion/...

This worked afterwards: python scripts/inpaint.py --indir data/inpainting_examples/ --outdir outputs/inpainting_results

Post reply on HN