Live data from Hacker News

Run Stable Diffusion on Your M1 Mac’s GPU

replicate.com

351–360 of 415 posts

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

#351

Is 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.

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

#352

Earlier quoted context omitted.

A twist on the above comment: I _already own_ an M2 Mac, but I'm never gonna buy a high-end GPU to play around with this sort of tech. If the things people (who aren't gamers, crypto miners, or ML researchers) already own can be useful for some hobby-level work in the space, we'll see a lot more work and experimentation in the space. Its super exciting stuff.

To be fair now many people have gaming PC. Perhaps more than who have their own M1 Pro/Max.

It’s different kinds of people. I know more people with an apple mx computer than with a gaming computer (people have a console to game or nothing at all).

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

#353
post #45
post #22

Earlier quoted context omitted.

1.3 sec/iter on my M1 Mac, so ~39 seconds.

That was fast. I'm only getting 5.26s/iter on an M1 Pro MBP with 16GB RAM. EDIT: Speed increased to 2.3s/iter after a reboot

the thing eats 15GB memory on my M1 Pro with 32GB RAM... you're probably slowed down by swapping if you only have 16GB RAM...

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

#354

Earlier quoted context omitted.

A twist on the above comment: I _already own_ an M2 Mac, but I'm never gonna buy a high-end GPU to play around with this sort of tech. If the things people (who aren't gamers, crypto miners, or ML researchers) already own can be useful for some hobby-level work in the space, we'll see a lot more work and experimentation in the space. Its super exciting stuff.

To be fair now many people have gaming PC. Perhaps more than who have their own M1 Pro/Max.

Perhaps, you think? ^^

The gaming PC market is huge. Have a look at https://www.businesswire.com/news/home/20210329005150/en/Glo... to get some numbers. There is a list of shipments in a year. Apple sells a lot of units, but not nearly enough to match the accumulated household supplies of gaming PCs - in how much, 2 years, while gaming PCs and laptops are still being sold?

Don't take that comment personally please, but this "perhaps" is a perfect example of being in a complete Apple bubble. It's so far from reality it is frankly unfathomable.

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

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

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

Js libs don't need to care for things like system packages and drivers as much as Python ML does.

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

#356
The various articles/tutorials seem a bit confusing: even though they say "M1", they also worked fine for me on an Intel Mac (and does end up using GPU).

Does anyone know how to think about the --W --H and --f flags to create larger images? I have 64GB memory, but I get errors from PyTorch saying things like "Invalid buffer size: 7.54 GB" when I try to increase W and H, and I haven't managed to make the Python process use more than about 15GB by playing around so far.

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

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

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

CommonJS vs ES6 module loading is already a nightmare.

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

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

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

#359

Earlier quoted context omitted.

I disagree, dependencies are sort of a universal problem. Ever had to set LD_LIBRARY_PATH? Python is pretty much innocent here.

> 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

There are working CUDA Docker images that work both on Windows and Linux for stable diffusion so the package including dependencies already exists. It's just they the standard packaging method doesn't work well on Apple hardware.

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

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

Noted! I'll try this out next time I have to use a python project and see how it goes.

Notably, it works perfectly on the linked repo for this story (unlike the conda version which is the first comment and is a complete mess).
Post reply on HN