Live data from Hacker News

Run Stable Diffusion on Your M1 Mac’s GPU

replicate.com

321–330 of 415 posts

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

#321
post #293

Earlier quoted context omitted.

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.

I think it is fair, actually. This is not unique to hours-old python projects, it's a common theme among almost all python tools I've used. I have a suspicion that that something written in Julia, Go, Rust, or possibly even C wouldn't have nearly this many issues. I'm not talking about debugging the actual functionality of the software, but rather the environment and tooling surrounding the language and software buil…

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 system this works with pretty much every reasonable Python project.

On M1 Macs the situation isn't great at the moment, though.

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

#322
post #35

Are we being pranked? I just followed the steps but the image output from my prompt is just a single frame of Rick Astley... EDIT: It was a false-positive (honest!) on the NSFW filter. To disable it, edit txt2img.py around line 325. Comment this line out: x_checked_image, has_nsfw_concept = check_safety(x_samples_ddim) And replace it with: x_checked_image = x_samples_ddim

Unrelated to stable diffusion, but I was showing DALL-E to my sister last night and a prompt with > Huge rubber tree set off the TOS violation filter.

AI alignment concerns are definitely overblown...

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

#326
post #74
post #13

How large an image will this handle (versus how much RAM you have)? It seems the GPU memory requirements beyond 512x512 are obscene.

Me at the end of last year: "Should I really go for the full 64GB on this M1 Pro? What could I possibly use this for? mmbml mumble... something about unified GPU... something Deep Learning, one day..." Me now: "a red juicy apple floating in outer space, like a planet" --H 768 --W 768 Uses about 27GB. 1.81s/it. Can't do 1024x1024 yet because of some hardcoded Metal issue ( https://github.com/pytorch/pytorch/issues/840…

I was so geniunely happy with my 16GB iMac M1 until stable-diffusion released.

I was amazed at how fast and powerful it was. I thought this meant I could stop buying top-of-the-line Macs every 4 years and start buying bottom-of-the-line Macs every 5 years. And that would have been 100% true... if it weren't for stable-diffusion.

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

#327

Earlier quoted context omitted.

If you open up the script txt2img and img2img scripts, there is a content filter. If your prompt generated anything that gets detected as "inappropriate" the image is replaced with Rick Astley. Removing the censor should be pretty straightforward, just comment out those lines.

It bothers me that this isn't just configurable. Why would they not want to expose this as a feature?

[deleted]

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

#328

Earlier quoted context omitted.

I hope this kickstarts some kind of M1 migration. There are so many ML projects I'd like to try, but they all depend on CUDA.

I'd rather see something more platform agnostic. I'm sad OpenCL isn't a bigger success.

OpenCL still works amazingly well on all platforms (e.g. two commercial programs of mine), it's just that everyone keeps saying it's dead and refusing to use it :(

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

#329
post #321

Earlier quoted context omitted.

I think it is fair, actually. This is not unique to hours-old python projects, it's a common theme among almost all python tools I've used. I have a suspicion that that something written in Julia, Go, Rust, or possibly even C wouldn't have nearly this many issues. I'm not talking about debugging the actual functionality of the software, but rather the environment and tooling surrounding the language and software buil…

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…

As if compiling any given C program wasn't also a crap shoot.

People also tend to forget that these ML packages are ridiculously complicated, and have a lot of dependencies not just on other libraries but on particularities of your system.

That, and ML researchers can't also be expected to be good at everything. They are busy doing ML research and waiting to be given a recipe to follow.

Meanwhile I can put together a Python package in my sleep that works perfectly on pretty much any system, but I don't know a damn thing about Autotools and would probably make a total mess if I tried use it. Or CMake. Or whatever Java uses.

This "look Python bad!!" stuff has some merit (if only historical), but it mostly amounts to FUD and does a big disservice to the people who have worked hard over the past few years to get everything fixed up.

Plus at least one of the issues I see here is because people disregarded the instructions and used Python 3.9 even though it says to use 3.10 because the code assumes it's running under 3.10.

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

#330
post #321

Earlier quoted context omitted.

I think it is fair, actually. This is not unique to hours-old python projects, it's a common theme among almost all python tools I've used. I have a suspicion that that something written in Julia, Go, Rust, or possibly even C wouldn't have nearly this many issues. I'm not talking about debugging the actual functionality of the software, but rather the environment and tooling surrounding the language and software buil…

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.
Post reply on HN