Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.91 KB

File metadata and controls

30 lines (24 loc) · 1.91 KB

Based on https://www.youtube.com/watch?v=NKR_1TUO6go and https://github.com/nktice/AMD-AI/blob/main/ROCm6.0.md

  • Ubuntu 22.04, Linux kernel 6.5, 2024-04-25, GPD Win max 2 6800U 16GB (8GB to iGPU set in BIOS)
  • Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
  • A1111 Version: v1.9.3 commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0
  1. Update: sudo apt update && sudo apt install git python3-pip python3-venv python3-dev libstdc++-12-dev
  2. Create folder: mdkir AI && cd AI
  3. Download AMD drivers: wget https://repo.radeon.com/amdgpu-install/6.0/ubuntu/jammy/amdgpu-install_6.0.60000-1_all.deb && sudo dpkg -i amdgpu-install_6.0.60000-1_all.deb
  4. Install ROCm and drivers: sudo amdgpu-install --usecase=graphics,rocm
  5. Add user to groups: sudo adduser `whoami` video && sudo adduser `whoami` render
  6. Probably better to reboot here: sudo reboot
  7. (optional) Install monitoring tools: sudo apt install radeontop
  8. Get A1111: git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git && cd stable-diffusion-webui
  9. Enter into environment: python3 -m venv venv && source venv/bin/activate. You should see something like: (venv) yourLogin@yourHost:~/stable-diffusion-webui$
  10. Install python packages: pip3 install -r requirements.txt && pip3 uninstall torch torchvision && pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.0 - that will install requirements, delete CUDA related packages and install ROCm 6 (I'm pretty sure should be proper way to do it)
  11. Exit: deactivate
  12. Create script to run, eg name it run.sh:
    #!/bin/sh
    
    source venv/bin/activate
    
    HSA_OVERRIDE_GFX_VERSION=10.3.0 python launch.py --listen --enable-insecure-extension-access --opt-sdp-attention --theme dark
    
    deactivate
    And make it executable: chmod +x run.sh
  13. Run it: ./run.sh - first start could take longer