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.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 75

  • @dmoneyballa
    @dmoneyballa  8 หลายเดือนก่อน +7

    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.

    • @TeddyNR
      @TeddyNR 8 หลายเดือนก่อน

      hello, are you under ubuntu 22.04 or > ?

    • @amarsalim3718
      @amarsalim3718 5 หลายเดือนก่อน

      Work for windows or not?

  • @BrockSuire75
    @BrockSuire75 11 หลายเดือนก่อน +18

    I work for AMD. Love your video on ROCm!

    • @dmoneyballa
      @dmoneyballa  11 หลายเดือนก่อน +1

      Awesome! Thank you!

    • @MaxUgly
      @MaxUgly 5 หลายเดือนก่อน +3

      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.

    • @mindfortress105
      @mindfortress105 3 หลายเดือนก่อน

      give me native support like nvidia! I just bought a new RX 6700XT and already regret it

  • @adrianbaranowicz507
    @adrianbaranowicz507 9 หลายเดือนก่อน +4

    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.

  • @sajson_
    @sajson_ 10 หลายเดือนก่อน +6

    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!

  • @plg402
    @plg402 8 หลายเดือนก่อน

    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.

  • @the-real-shoguna
    @the-real-shoguna ปีที่แล้ว +3

    My savior! I've trying to get it running for hours. The HSA_OVERRIDE was what I was missing. Big thanks

  • @johannmuller5498
    @johannmuller5498 ปีที่แล้ว +5

    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.

    • @dmoneyballa
      @dmoneyballa  ปีที่แล้ว +1

      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.

    • @ChAzR89
      @ChAzR89 ปีที่แล้ว +2

      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

  • @ChAzR89
    @ChAzR89 ปีที่แล้ว +2

    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

  • @cheg7752
    @cheg7752 2 หลายเดือนก่อน

    Is there not an equivalent for arch? I can't seem to get amdgpu-install.

  • @NamespaceInvader
    @NamespaceInvader ปีที่แล้ว +1

    thanks, this helped me a lot.

  • @muzamilsarfraz5515
    @muzamilsarfraz5515 7 หลายเดือนก่อน

    can u recommend getting RX6800 and 6800xt over 3070 or 3080 for machine learning?

  • @BrockSuire75
    @BrockSuire75 11 หลายเดือนก่อน +5

    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!
    😘

    • @dmoneyballa
      @dmoneyballa  11 หลายเดือนก่อน +1

      good to hear. the 7900xtxs look really high end

  • @L1ght10
    @L1ght10 11 หลายเดือนก่อน

    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.

    • @dmoneyballa
      @dmoneyballa  11 หลายเดือนก่อน +1

      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.

  • @IV-K
    @IV-K ปีที่แล้ว +3

    hope you can cover for the training loras in amd as well. thanks

    • @dmoneyballa
      @dmoneyballa  ปีที่แล้ว +1

      I can look into that. I've never done that but can research it

    • @jasonwang1772
      @jasonwang1772 ปีที่แล้ว

      ​@@dmoneyballa How fast is amd 6700xt running LoRA Stable diffusion on linux ROCm driver vs win11 radeon driver

    • @enduringwave87
      @enduringwave87 11 หลายเดือนก่อน

      LORA in slang Urdu means D^^K and with S in the end it means 2 or more D&&KS

  • @jakeblargh
    @jakeblargh 9 หลายเดือนก่อน +2

    I heard ROCM is now on Windows. Does this mean we can run Automatic1111 at full speed now on Windows?

    • @dmoneyballa
      @dmoneyballa  9 หลายเดือนก่อน

      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.

    • @jakeblargh
      @jakeblargh 9 หลายเดือนก่อน

      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

  • @cristhianmartin7663
    @cristhianmartin7663 ปีที่แล้ว +1

    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. 😅

    • @bingchilling177
      @bingchilling177 ปีที่แล้ว +2

      Amd has announced that ROCm is coming to windows, so just wait to see how it performs and then make the decision.

    • @dmoneyballa
      @dmoneyballa  ปีที่แล้ว +2

      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.

    • @enduringwave87
      @enduringwave87 11 หลายเดือนก่อน

      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

  • @pixelpirate6
    @pixelpirate6 11 หลายเดือนก่อน

    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)

    • @dmoneyballa
      @dmoneyballa  11 หลายเดือนก่อน

      I don't think that's enough stuff to work on. that just says it's running into an error.

    • @pixelpirate6
      @pixelpirate6 11 หลายเดือนก่อน

      @@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

  • @gohan2091
    @gohan2091 ปีที่แล้ว +1

    Any idea when AMD cards will run in A1111/vlads in Windows?

    • @gateopssss
      @gateopssss ปีที่แล้ว +1

      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.

    • @dmoneyballa
      @dmoneyballa  ปีที่แล้ว +1

      I got a video of this working, I'll post it later today.

    • @dmoneyballa
      @dmoneyballa  ปีที่แล้ว +1

      here's the link to the video of it working in windows: th-cam.com/video/7mwuUfebhWc/w-d-xo.html

  • @JuanSanchez-rb4qu
    @JuanSanchez-rb4qu 10 หลายเดือนก่อน +1

    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.

    • @leucome
      @leucome 10 หลายเดือนก่อน +1

      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.

  • @Niack_silver
    @Niack_silver 10 หลายเดือนก่อน

    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...

    • @dmoneyballa
      @dmoneyballa  10 หลายเดือนก่อน

      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?

    • @Niack_silver
      @Niack_silver 10 หลายเดือนก่อน

      @@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

    • @dmoneyballa
      @dmoneyballa  10 หลายเดือนก่อน

      what's the error when it tries the cuda test?

  • @user-pk9tv7kd4k
    @user-pk9tv7kd4k 11 หลายเดือนก่อน

    ROCm has come to windows yet, are there any videos or blogs which introduce the method to using that?

    • @dmoneyballa
      @dmoneyballa  11 หลายเดือนก่อน +1

      I think it just barely did. I'm planning on making a video on that soon

    • @user-pk9tv7kd4k
      @user-pk9tv7kd4k 11 หลายเดือนก่อน

      thanks, waitting for that !@@dmoneyballa

    • @thanhtrungnguyen1488
      @thanhtrungnguyen1488 10 หลายเดือนก่อน

      Can u have video Rocm on window? Hjx, i can't use on linux.

  • @pixelpirate6
    @pixelpirate6 ปีที่แล้ว +1

    What linux distro did you use for this?

  • @HanafiYusufSamAfghani
    @HanafiYusufSamAfghani 5 หลายเดือนก่อน +1

    the sound is bit too low bro, good video

  • @DeepfriedBeans4492
    @DeepfriedBeans4492 7 หลายเดือนก่อน

    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.

    • @dmoneyballa
      @dmoneyballa  7 หลายเดือนก่อน

      rocm allows pytorch to use the cuda api to use your amd gpu so that means it's working

  • @sniperkaran1101
    @sniperkaran1101 11 หลายเดือนก่อน

    Is there any hope to get this running on windows?

    • @immanuelkant7552
      @immanuelkant7552 8 หลายเดือนก่อน

      Not currently as it's only supported up to RX 6800, maybe in the future

  • @nodewizard
    @nodewizard 11 หลายเดือนก่อน +1

    ROCm has come to Windows, can you test Stable Diffusion on Windows please

    • @sacredhero2158
      @sacredhero2158 9 หลายเดือนก่อน

      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.

  • @ddingus
    @ddingus 3 หลายเดือนก่อน

    Hey does this work on Windows?

    • @dmoneyballa
      @dmoneyballa  2 หลายเดือนก่อน

      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.

  • @fingerprint8479
    @fingerprint8479 11 หลายเดือนก่อน

    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

  • @dunderbutt2510
    @dunderbutt2510 4 หลายเดือนก่อน

    Has anyone tried this with the new ROCM 6.02 release?

  • @icantthinkofagoodname8002
    @icantthinkofagoodname8002 6 หลายเดือนก่อน +1

    Heya, can I contact you in any way? Like, telegram, discord, anything? I cannot for the life of me figure this out lol

    • @dmoneyballa
      @dmoneyballa  6 หลายเดือนก่อน +1

      What part are you having trouble with?

    • @icantthinkofagoodname8002
      @icantthinkofagoodname8002 6 หลายเดือนก่อน

      @@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 ^^

  • @point0419
    @point0419 ปีที่แล้ว

    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 ). :(

    • @point0419
      @point0419 ปีที่แล้ว +1

      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.

    • @mingming_kr
      @mingming_kr ปีที่แล้ว

      @@point0419 Then 6700xt can run pytorch, tensorflow using Rocm with out errors?

    • @point0419
      @point0419 ปีที่แล้ว

      @@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.

    • @mingming_kr
      @mingming_kr ปีที่แล้ว

      @@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?