Stable Diffusion on AMD RX 6700XT with ROCM: Everything You Need to Know
ฝัง
- เผยแพร่เมื่อ 5 มิ.ย. 2023
- In this video I want to go over how to get stable diffusion working on an amd RX 6700xt. I used Ubuntu 22.04 and that's what I'm going to assume you'll use too if you follow this video. here's AMD's ROCm installation guide for 5.5: docs.amd.com/bundle/ROCm-Inst...
Below I'll post the commands I used in the video.
sudo apt-get update
wget repo.radeon.com/amdgpu-instal...
sudo apt-get install ./amdgpu-install_5.5.50500-1_all.deb
sudo amdgpu-install --usecase=rocm
sudo usermod -a -G video $USER
sudo usermod -a -G render $USER
reboot
pip3 install torch torchvision torchaudio --index-url download.pytorch.org/whl/rocm...
python
import torch
torch.cuda.is_available()
exit()
sudo apt install git
git clone github.com/AUTOMATIC1111/stab...
export HSA_OVERRIDE_GFX_VERSION=10.3.0
sudo apt install libstdc++-12-dev
cd stable-diffusion-webui
python3 launch.py
to watch gpu usage you can use
watch -n .1 rocm-smi
that should do it for you.
Affiliate links
-------------------------------------------------------------------
6700xt on amazon: amzn.to/3WWH33h
Each Amazon link is linked to my Amazon Associate's account and a small percentage of your purchase will support the channel at no extra cost to you. - วิทยาศาสตร์และเทคโนโลยี
I tried this on an amd rx 6600xt on rocm 5.7.1 and it works so if you were wondering about that, it does work.
hello, are you under ubuntu 22.04 or > ?
Work for windows or not?
I work for AMD. Love your video on ROCm!
Awesome! Thank you!
I am struggling so hard with ROCm. I always root for AMD, and always choose your CPU/GPU if it is a close decision. I hope ROCm hits as hard as Zen, I reeeaaallly do. I am having a horrible time getting it to work but the fact you guys made it more open source than CUDA gives me hope.
give me native support like nvidia! I just bought a new RX 6700XT and already regret it
I used your tutorial as a reference and installed all the components, but I chose the latest ones, like rocm 5.6, nightly version of pytorch for rocm 5.6, etc. I managed to achieve ~7.5-8 iterations/s in stable diffusion with Radeon 6800. It's a really great upgrade when compared to running it on Windows with like ~1.5 iterations/s. I will look forward for any way possible to speed it up even more. Thanks man.
I was so mad after my 6800XT purchase when I realized I don't have CUDA, xformers and it is slow on Windows. But I realized I have an extra drive so why not dual boot linux and try my luck with ROCM there. It is so sick how fast is it now! Thanks for the video, I need to be super sure I correctly install webui after I jumped from other video about ROCm installation. Thank you!
Bro you are the man!!! Thank you so much for the video dude, I was struggling with this shit for hours and finally I managed to use my gpu with SD. Thank you.
My savior! I've trying to get it running for hours. The HSA_OVERRIDE was what I was missing. Big thanks
Thank you for this guide. I just completed the steps to get my 6800XT running under a fresh Ubuntu. You may want to include a short section or link to getting python set up for users new to Linux. It is my first Linux for anything but a minecraft server in years. And I had to fiddle a little to get that and pip up and running nicely. The speed difference between the machineML version I played with in Windows and the rocm version can only be described by imagining the difference between Impulse drive and Warp drive in star trek. Great Scot, it runs like a demon now.
I just tried directml and it's way slower than using rocm. Sorry I wasn't explicit enough with python linux environments. I can work on this. I sometimes forget since I work in linux a lot.
how much its/s do you get with your 6800xt? Thinking about buying one since there's a pretty solid deal for it currently in my country. Had planned to buy a Nvidia card since it's way better in Stable Diffusion but for any other usage it would be stupid to not buy the rx6800xt at that price
great video. Any Ideas how much its/s you can get with a 6800xt? There was a benchmark site which I'm apparently to stupid to find again
Is there not an equivalent for arch? I can't seem to get amdgpu-install.
thanks, this helped me a lot.
Glad to hear it!
can u recommend getting RX6800 and 6800xt over 3070 or 3080 for machine learning?
I want to put out something about AMD GPU s. AMD is not leaving the high end market. As some have seen all over the internet about AMD to stop making high end GPU s. This is 1000% false. AMD has next Gen cards being validating as we speak. I have a few engineering samples I'm evaluating. Keep dreaming, never let anyone stop you!
😘
good to hear. the 7900xtxs look really high end
Hey man 👋, i am honestly not sure about RocM much but is there any way of cuda acceleration being implemented in 6700 XT according to amd its only 6800 and above.
the 6700xt isn't officially supported from what I know but this is a video of me using to accelerate a pytorch model to generate images.
hope you can cover for the training loras in amd as well. thanks
I can look into that. I've never done that but can research it
@@dmoneyballa How fast is amd 6700xt running LoRA Stable diffusion on linux ROCm driver vs win11 radeon driver
LORA in slang Urdu means D^^K and with S in the end it means 2 or more D&&KS
I heard ROCM is now on Windows. Does this mean we can run Automatic1111 at full speed now on Windows?
It doesn't look like it yet. The HIP libraries are available on Windows but I don't think the drivers and stuff are in place.
Oh you're right. Great video regardless! Very easy to follow. Would love to see you make one for Windows when they finally release the drivers and stuff. @@dmoneyballa
Hello. How did you like that card for these uses? I'm thinking of buying that 6700xt or a 3060 ti to start with but I'm afraid that it won't work very well for these uses. 😅
Amd has announced that ROCm is coming to windows, so just wait to see how it performs and then make the decision.
I think they work a lot better than I had anticipated for deep learning. the extra ram for deep learning is good. The easiest route is to get a 12GB rtx 3060, it should have great documentation for doing it and has more VRAM for running models. Less headache for getting it started.
I am currently stuck between choosing MSI RTX 3060 12GB vs XFX SPEEDSTER 6700XT - though I would prefer SAPPHIRE version as they are always awesome but too short in supply and extremely expensive.. I am not a heavy gamer but I do CSGO and from time to time I might play some of the latest AAA titles as per my likings. I know between 6700XT and RTX 3060, 6700XT standout all hands down as it outperforms in games at even 1440p. But I am also planning to do STABLE DIFFUSION on my 13th Gen build. Are those RT, TENSOR, CUDA cores on RTX 3060 going to help me in STABLE DIFFUSION ? What is the scope of AMD RADEONS in stable diffusion? Which one should I choose?@@dmoneyballa
Can you help me. Today I installed linux and i get this error when installing rocm: Errors were encountered while processing:
amdgpu-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don't think that's enough stuff to work on. that just says it's running into an error.
@@dmoneyballa Oh nvm. It did take me about 8 hours or so but I suceeded to install the rocm drivers. I just downloaded 22.10 Ubuntu and then installed drivers but --no-dkms and it works now and now i finally get really good speeds in SD compared to Windows
Any idea when AMD cards will run in A1111/vlads in Windows?
When AMD gets ROCm working for Windows, they announced they'll get it working, we just don't know when, and which gpus will be supported.
I got a video of this working, I'll post it later today.
here's the link to the video of it working in windows: th-cam.com/video/7mwuUfebhWc/w-d-xo.html
Good guide, so how it compares with an nvidia card of similar passmark score like the 3060ti? I know the 12GB is a good extra but most AI apps seem to be made for nvidia hardware.
With token merging on the 6700xt I am getting about 8 it/s on 512px image and about 6 without Token merging. The 3060 ti usually get about 9 with xformer and 7.5 without xformer. Look something happened lately the 6700xt got faster. I was getting only 3.8 to 4 it/s like in this video before. Also I dont know if Stable Diffusion got faster on Nvidia GPU too. I do not have one to do new test. If so my numbers for the 3060ti may be too low. We would need somebody to confirm. Also yes the memory does help a lot as soon as you crank up the resolution or try to use sdxl.
Hi, i followed your guide but got this error :
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
If i try to by pass it by using --skip-torch-cuda-test it work but is super slow, looks like it using the cpu instead of GPU ... don't know what to do...
ok, there are a few things that could have gone wrong so I'm going to ask a few questions to see if I can help you.
which gpu are you using?
Which os are you using?
did you set the environment variable to HSA_OVERRIDE_GFX_VERSION=10.3.0?
@@dmoneyballa i'm using the same OS and GPU as you, RX 6700 XT and Ubuntu 22.04
And yes i set the environnement variable
what's the error when it tries the cuda test?
ROCm has come to windows yet, are there any videos or blogs which introduce the method to using that?
I think it just barely did. I'm planning on making a video on that soon
thanks, waitting for that !@@dmoneyballa
Can u have video Rocm on window? Hjx, i can't use on linux.
What linux distro did you use for this?
I used Ubuntu 22.04
the sound is bit too low bro, good video
I'm confused, why does it return true for is cuda available for you? I thought you were using an amd gpu, that's the whole point of getting rocm bc you can't use cuda. I have an amd gpu and it returns false for me as I would expect.
rocm allows pytorch to use the cuda api to use your amd gpu so that means it's working
Is there any hope to get this running on windows?
Not currently as it's only supported up to RX 6800, maybe in the future
ROCm has come to Windows, can you test Stable Diffusion on Windows please
ROCm now have support for windows, but still not available for pytorch even now, so no. And it will not be for some time i guess.
Hey does this work on Windows?
you can try getting it working with zluda video by someone else: th-cam.com/video/8POW3G6itcE/w-d-xo.htmlsi=G5VZtprzUGCbxOMw
it seems faster than what I was able to do about 1 year ago using directml: th-cam.com/video/7mwuUfebhWc/w-d-xo.html
it seems like linux is the first class citizen that it works best on but if you're using windows, i think zluda would be the best way to do it. it does take a while the first time you run it but after that it should be faster.
Hi, thanks for the tutorial. I am running it in my ubuntu 22.04 machine, 24G RAM, RX590 with 8G RAM:
sudo apt-get install ./Downloads/amdgpu-install_5.5.50500-1_all.deb
... .
...
Building initial module for 6.2.0-26-generic
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/amdgpu-dkms-firmware.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-26-generic (x86_64)
Consult /var/lib/dkms/amdgpu/5.18.13-1528701.22.04/build/make.log for more information.
dpkg: error during processing package amdgpu-dkms (--configure):
o subprocesso instalado, do pacote amdgpu-dkms, o script post-installation returned status error 10
Errors encountered during processing: amdgpu-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
Help welcome. Thanks
Has anyone tried this with the new ROCM 6.02 release?
Heya, can I contact you in any way? Like, telegram, discord, anything? I cannot for the life of me figure this out lol
What part are you having trouble with?
@@dmoneyballaWell, pretty much all of it cx
Kept having one error or another preventing me from doing it but I finally got it to work thankfully ^^
I've tried these steps, everything works fine, but torch.cuda.is_available() returns False to me. Can't find a solution for it ( I have added the right user group ). :(
Fixed. That's because I have a cpu_only version previously installed. By uninstall both the pytorches and reinstall the rocm one fix the issue.
@@point0419 Then 6700xt can run pytorch, tensorflow using Rocm with out errors?
@@mingming_kr Sorry I haven't tried that. I only use the cpu version earlier. Maybe you can give me some test projects, I can run those for you.
@@point0419 Oh Thx bro. I can give you test tensorflow script. I replying include script few time but always delete my reply. I think youtube monitoring reply bot delete my reply. So how can i give you this script?