AMD ROCm in linux with Automatic1111 running stable diffusion!  Simple guide to getting started!

AMD ROCm in linux with Automatic1111 running stable diffusion! Simple guide to getting started!

FE-Engineer

8 месяцев назад

17,345 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@andrewdeane4943
@andrewdeane4943 - 20.01.2024 18:22

Is there an easy way to set up a launch shortcut for opening after its installed?

Ответить
@ivangonzales5667
@ivangonzales5667 - 20.01.2024 00:55

Genius! It worked very well for me, I was about to throw in the towel because it wouldn't start, I had to fill out a line of code so that Torch wouldn't run a cuda test or something like that, but after that everything was ok, I already have it installed and I'm excited about it to start trying it, thanks for the excellent tutorial, simple and very detailed

Ответить
@tisen1241
@tisen1241 - 19.01.2024 20:32

I get pretty severe artifacting using rx 6750xt, is that normal? they don't always happen, but when they do, they won't go away until i restart ubuntu

Ответить
@SinKiske-ms3gy
@SinKiske-ms3gy - 12.01.2024 08:40

Can you make a tutorial installing comfyui? I tried installing it by splicing instructions from this tutorial with stuff online but I haven't had much luck

Ответить
@Tondar_plus14
@Tondar_plus14 - 05.01.2024 10:03

erorr= Torch is not able to use GPU
GPU:RX580 8 g
CPU: i3 9100f
ram:16

Ответить
@mcknotz
@mcknotz - 05.01.2024 03:36

Thank you for this tutorial, i have been trying to get this to work for over a month. your tutorial was great.

Ответить
@sadmonstaa
@sadmonstaa - 04.01.2024 22:22

Thanks a bunch, your guide is the only one that worked out in the end!

Ubuntu 22.04.3 LTS - Kernel 6.2.0-39-generic
GPU - RX 6950XT

Just a heads up, had an issue when installing package requirements for A1111, it was incredibly slow.
Solved it by updating setuptools & wheel in pip and then using "--use-pip517" parameter in the "pip3 install -r requirements.txt" line so it looked like this:

"pip3 install -v -r --use-pip517 requirements.txt" (added "-v" which is for verbose, which I used to debug the issue initially)

Ответить
@Thedeepseanomad
@Thedeepseanomad - 04.01.2024 20:25

After typing in the command pip3 Install - r requirements.txt, My system seems to stall on collecting basicsr.

Preparing metadata (setup.py) ... - /

Any ideas?

Ответить
@D2theY
@D2theY - 02.01.2024 23:53

Thanks for the tutorial,
I'm on Ubuntu 22.04 and have a 6700XT and its worked fine for a week and then this morning it started giving me a "RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check" I've uninstalled and re-installed torch and looked online and a lot of the forums are old and are from when AMD GPUs weren't supported. When I run rocminfo it says that there is no GPU detected now. Did some library change that caused everything to break?

Ответить
@AlexeyMenOfSteal
@AlexeyMenOfSteal - 02.01.2024 06:29

great stuff

Ответить
@SpottedHares
@SpottedHares - 31.12.2023 23:37

While nice it just seems like a lot of extra work for no benefit. Regardless of what install or just how many time I redo the process Stable diffusion just will just not run any faster then on windows with out optimization.

Ответить
@MatiasQuijadaVenegas
@MatiasQuijadaVenegas - 30.12.2023 06:00

Everything went fine, I could use for 5 mins SD but after installing a few extensions and pressing "reload ui" everytime I try to run the launch script I get this error: ImportError: libpng16-7379b3c3.so.16.40.0: cannot open shared object file: No such file or directory, im lost x_x

Ответить
@whoopeerobottech638
@whoopeerobottech638 - 28.12.2023 18:09

hi there, thanks for your efforts in this video.
after installation, showing error in " couldnt find cuda in video card"
can we install ROCm version 6 for this installation? v6 is ok?

Ответить
@igorkim3558
@igorkim3558 - 28.12.2023 01:32

very helpful, thanks!
i had error "memory access fault by gpu node-1", then removed and added rights for render and video, installed rocm5.6 again and it went away. Idk what was that
i'm total noob with this, but i assume first time i installed pytorch rocm in virtual and second time i installed it directly and it made it work?

Ответить
@mchawleyii
@mchawleyii - 23.12.2023 04:21

Everything seems to have installed properly, but when I try to run I get an error 'Torch is not able to use GPU; add --skip-torch-cuda-test'. I haven't seen this as a common issue with this guide so I assume I must have missed something. Doesn't torch for ROCm not use CUDA? First tweaked GFX version and HIP devices, then I reinstalled torch for ROCm just in case. I'm running a 6750xt. I used the argument to skip the cuda test, but while this lets it run, it is unable to find a HIP GPU regardless of the settings, and stable diffusion just runs on my CPU. Any suggestions?

Ответить
@SinKiske-ms3gy
@SinKiske-ms3gy - 22.12.2023 04:10

This worked for me with a 7800xt. However, I had to use ROCm 6 since I'm on ubuntu 22.04

Ответить
@cocomonkilla
@cocomonkilla - 21.12.2023 09:00

You sir are an absolute legend. I tried doing this months ago myself and got stuck in a weird place where the driver would only work if I was root and that broke absolutely everything. Sadly resigned to use Windows at 3 it/s. After seeing this video I formatted my Ubuntu drive and started fresh and holy crap it all worked perfectly the first time. Never seen that happen before on a Linux ANYTHING. 17-18 it/s now, this thing flies!!! Thank you so much!

Ответить
@user-mq8km2bg8z
@user-mq8km2bg8z - 20.12.2023 20:24

This is fantastic, followed instructions and soooo much better than optimising models in windows! One issue I'm having is sometimes after about an hour the whole system grinds to a halt, feels like when you have too many apps open in windows, need to power off and reboot to solve, sometimes hangs when changing models too. New to Linux but is there a way to help manage this?
Specs:
13100f
Rx6800
16gb ddr4 3600
256gb nvme (239 free)
Thanks!

Ответить
@agansa9693
@agansa9693 - 20.12.2023 05:06

THANK YOU it finally works! depth map creation is now so much smoother

Ответить
@ilirademi2507
@ilirademi2507 - 19.12.2023 23:40

Thanks for the video!!! With my 7800 XT i was able to get 12 it/s on th ONNX/Olive version. But with the ubuntu version i am getting only 2 it/s. do you have any idea why that could be?

Ответить
@youp415
@youp415 - 19.12.2023 08:12

how to get a shortcut of the launch? Everytime I need to open terminal inside my folder and type the command bash. Any ways of having a shortcut?

Ответить
@justpie179
@justpie179 - 19.12.2023 03:22

THANK YOU MAN
I was trying to get this done for this entire week and I stumbled upon your video, i'm really grateful you made this video

Ответить
@Fastcash_
@Fastcash_ - 10.12.2023 22:40

Thanks for the guide! I followed a part of your config and managed to run Stable Diffusion with a 6700XT on Manjaro Linux. My tests gave me roughly 4 it/s which is 3-4 times faster than DirectML on Windows 10.

Ответить
@ponyplower5963
@ponyplower5963 - 07.12.2023 15:01

Awesome video once again! Got tired of things not working with olive optimizations and decided to go this route. Thanks for making it easy!

Ответить
@phantoslayer9332
@phantoslayer9332 - 04.12.2023 08:34

I have a 7800 xt and no matter what I do, it won’t work

Ответить
@StrengthCoachFelix
@StrengthCoachFelix - 02.12.2023 04:01

man I wish I had found this video first. This was so much easier and better than using webml!

Ответить
@AILAB-SH
@AILAB-SH - 30.11.2023 22:10

I tried to run it on my AMD MI25 and MI60 and received: "Torch is not able to use GPU;"

Ответить
@NoahG34ming
@NoahG34ming - 26.11.2023 15:51

Very well explained!
I use a RX 7900 XT and can generate simple images fast now, but as soon as I try to upscale an 512x768 image by 2, I get the error:

OutOfMemoryError: HIP out of memory. Tried to allocate 18.00 GiB. GPU 0 has a total capacty of 19.98 GiB of which 16.94 GiB is free. Of the allocated memory 2.54 GiB is allocated by PyTorch, and 18.00 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_HIP_ALLOC_CONF

Do you know a solution?
As mentioned in the description, I tried setting the threshold in the script to 0.9, without luck though

Ответить
@couroseco9251
@couroseco9251 - 26.11.2023 02:27

How to check my rocm version?
I try type rocminfo but don't show the rocm version. What is the problem?

Ответить
@shakewait7612
@shakewait7612 - 24.11.2023 03:39

Great video. Great content! Keep it up! I'm delighted I found your channel.

Exactly what I needed - I'm exceeding 18it/s vs 1.7s/it* with CUDA on my 7900XTX. Please keep making top content!

* - not a typo, similar speed to using ONNX/Olive method - but this way has all the bells and whistles

Ответить
@HeinleinShinobu
@HeinleinShinobu - 23.11.2023 13:14

are the steps still the same if i use docker?

Ответить
@onigirimen
@onigirimen - 23.11.2023 05:10

you just browse at ROCm5.7 page, and then install ROCm5.6. seriously? LoL. If there's 5.7 page, the Pytorch 5.7 is also there, unless you're want to install 5.6 due to instability system with 5.7.

Ответить
@gustavoalmeida1579
@gustavoalmeida1579 - 21.11.2023 16:02

Big thanks for the video, I've got it to work on my 7900XTX, unfortunatelly the performance was very slow in comparison with on Windows using miniconda, like taking over a second per iteration on 768x512 images, is this expected or there's a way (outside lora) to speed things up on Linux?

Ответить
@fernandoguerrero2895
@fernandoguerrero2895 - 21.11.2023 01:50

Which amd GPU are you using?

Ответить
@xmvziron
@xmvziron - 19.11.2023 20:54

I am not involved with AI at all myself, but I'm pretty sure `sudo mkdir sd` should be simply `mkdir sd`. Then you don't have to change ownership of that directory to your user.

Ответить
@johiny
@johiny - 19.11.2023 04:52

great video man thx for all the info it worked after a little headaches but now is working!

Ответить
@ColbstaD
@ColbstaD - 16.11.2023 02:46

Can confirm, Ubuntu 22.04.3 with the steps in this video is working great with my 7900 XT and --opt-sdp-attention --no-half-vae arguments. 16-17it/sec with SD 1.5 at 512x512, 2.5-3it/sec at 1024x1024 in SDXL.

Ответить
@How_Fortunate
@How_Fortunate - 15.11.2023 00:09

I appreciate the guide but I think I am going to give up on using Linux for stable diffusion with my card. No matter what I do, stable diffusion with my card always fails. I am just so fed up with it at this point. I followed your guide and failed. I tried a fresh install of ubuntu and failed. I tried installing a different driver version and failed. I installed a different ROCm version and failed. I installed a different torch, torchvision and torchaudio version and then I failed again. I tried a different version of ubuntu and still failed. I tried combinations of any of these and still failed and now I just don't know what to do to get it to work, but to be honest, I am starting to believe it is literally just impossible. Maybe you will have an idea of why this isn't working.

My card is the 6700xt which is pretty much the reason why everything fails I have found out. When ever I follow your guide and do 'bash launch.sh' it will always give me an error of 'Stable diffusion model failed to load." and then sits there indefinitely until I close the terminal. If I run with torch, torchvision, and torchaudio rocm5.4.2 (or close to that number) versions that error won't pop up anymore but instead any image I try to create will just be black and nothing else from nan errors. I have no idea what to do.

I hope you have an idea because I most certainly don't.

Ответить
@duladrop4252
@duladrop4252 - 14.11.2023 01:29

Yey go ROCm and no CUDA.

Ответить
@Sandeepan
@Sandeepan - 14.11.2023 00:01

I've been trying to do this on Arch without any success 😓

Ответить
@rawrawra5389
@rawrawra5389 - 13.11.2023 19:08

dude, you are awesome. keep going

Ответить