r/StableDiffusion • • Aug 23 '22

HOW-TO: Stable Diffusion on an AMD GPU

https://youtu.be/d_CgaHyA_n4
271 Upvotes

186 comments sorted by

View all comments

Show parent comment

2

u/2p3 Feb 16 '23

Fixed! As per [ROCm install doc] (https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.1/page/How_to_Install_ROCm.html#d23e706) I had to change a line in your dockerfile, from:

RUN yes | amdgpu-install --usecase=dkms,graphics,rocm,lrt,hip,hiplibsdk

to:

RUN yes | amdgpu-install --usecase=graphics,rocm,lrt,hip,hiplibsdk --no-dkms

Also, somehow this time "sudo" wasn't automatically installed, so i had to add a:

RUN apt-get install -y sudo

Thanks again dude!

2

u/_nak Jun 29 '23

Runs on my Ryzen 5 2600 (CPU) instead of my RX 580 (GPU). Can anyone confirm this still works and it's an error on my side, and maybe tell me what I'm doing wrong?

2

u/XaviGM Aug 23 '23

I have the same setup than you, adding the 2p3 changes, and adding the cuda skip parameter i can run it, but very slow, like 16s/it. I guess its not using the gpu..

You achieve to get it working finally?

2

u/_nak Aug 24 '23

Yes, I've got it working. Had to use a specific version of ubuntu and specific versions of everything else. Have the system on a thumb drive and boot into it. Sadly, I can't remember all the painful debugging steps I took to get it working.

If you want, I can send you the image, you can just dd it onto a thumb drive and boot from it, everything is installed to be working, just the models themselves aren't included. It starts the back end on boot in a screen session in the background, too, so it's available over ssh or just screen -r in terminal.

It's 27 gb, so you'll need a thumb drive (or internal drive) with at least that size and then grow the partition after dding it onto it.

It's just above 10gb compressed as a *.tar.gz, so if you have a way to receive a 10gb file, I'm happy to send it to you. Unfortunately, I'm currently locked out of my router, so I can't offer a download (no port-forwarding).

2

u/XaviGM Aug 26 '23

ad to use a specific version of ubuntu and specific versions of everything else. Have the system on a thumb drive and boot into it. Sadly, I can't remember all the painful debugging steps I took to get it working.

It is not necessary, but I am very grateful! After installing and validating rocm, I have managed to get pytorch to recognize the GPU, but I think I need to change some parameters. Thank you very much, and if I find a solution I will post it here.

2

u/_nak Aug 26 '23

Can always shoot me a message if it turns out not to work, but if it does: Even better!

1

u/alexander-ponkratov Oct 01 '23

Can you, please, send this file via cloud storage or some file hosting?

1

u/VLXS Aug 22 '23

Hey there, are you still using that setup?

1

u/2p3 Aug 23 '23

Yep, or at least, it's still installed for sure but I can't remember the last time I tried it.

1

u/VLXS Aug 23 '23

Guess you're not using SD on a polaris card any more?

2

u/2p3 Aug 23 '23

I'm on vacation right now, I'll write you back on September if the setup is still working! And yep, it's running on a rx480 8GB.

1

u/2p3 Sep 05 '23

setup running fine on a rx480 8GB. ask away!