Live data from Hacker News

Run Stable Diffusion on Your M1 Mac’s GPU

replicate.com

31–40 of 415 posts

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

#32

Has anybody had success getting newer AMD cards working? ROCm support seems spotty at best, I have a 5700xt and I haven't had much luck getting it working.

I've tried using this set of steps [1], but have so far not had luck, mostly because the ROCm driver setup is throwing me for a loop. Tried it with an RX 6700 XT and first was going to test on Ubuntu 22.04 but realized ROCm doesn't support that OS yet, so tried again on 20.04 and ended up breaking my GPU driver!

[1] https://gist.github.com/geerlingguy/ff3c3cbcf4416be2c0c1e0f8...

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

#34

Earlier quoted context omitted.

School us! What’s the latest in robotics that is going to knock our socks off?

They've got death robots that can fly now. Why is nobody impressed by the future?

I believe those are human controlled, no? Robotics gets really interesting when the robots can start driving and building the roads as well.

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

#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

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

#36
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

That means the NSFW filter kicked in IIRC from reading the code.

Change your prompt, or remove the filter from the code.

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

#37
post #28
post #16

Earlier quoted context omitted.

Broadly speaking, it looks like they are. The implementation of Stable Diffusion doesn't appear to be using all of those features correctly (i.e. device selection fails if you don't have CUDA enabled even though MPS ( https://pytorch.org/docs/stable/notes/mps.html ) is supported by PyTorch. Similar goes for quirks of Tensorflow that weren't taken advantage of. That's largely the work that is on-going in the OSX and M…

I got stuck on this roadblock, couldn’t get CUDA to work on my Mac, was very confusing

Didn’t apple stop supporting Nvidia cards like 5 years ago? How could it be confusing that Cuda wouldn’t run?

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

#38
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

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.

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

#39
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

When the model detects NSFW content it replaces the output with the frame of Rick Astley.

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

#40
post #28
post #16

Earlier quoted context omitted.

Broadly speaking, it looks like they are. The implementation of Stable Diffusion doesn't appear to be using all of those features correctly (i.e. device selection fails if you don't have CUDA enabled even though MPS ( https://pytorch.org/docs/stable/notes/mps.html ) is supported by PyTorch. Similar goes for quirks of Tensorflow that weren't taken advantage of. That's largely the work that is on-going in the OSX and M…

I got stuck on this roadblock, couldn’t get CUDA to work on my Mac, was very confusing

That's because CUDA is only for Nvidia GPUs and Apple doesn't support Nvidia GPUs, it has its own now.
Post reply on HN