AMD ROCm in linux with Automatic1111 running stable diffusion! Simple guide to getting started!
Published on:
Views: 0
Likes: 0
Tags:
This is the one. The simplest way to get ROCm running Automatic1111 Stable diffusion with all features on AMD gpu's! Inside terminal: sudo apt update sudo apt install git python3-pip python3-venv python3-dev libstdc++-12-dev sudo apt update wget https://repo.radeon.com/amdgpu-install/5.7.1/ubuntu/jammy/amdgpu-install_5.7.50701-1_all.deb sudo apt install ./amdgpu-install_5.7.50701-1_all.deb sudo amdgpu-install --usecase=graphics,rocm sudo usermod -aG video $USER sudo usermod -aG render $USER sudo reboot After you have rebooted, inside terminal again make a directory for stable diffusion mkdir sd If you get a permission denied then use sudo mkdir sd Skip this step if you did not have to use sudo change owner to be yourself sudo chown -R $USER:$USER sd/ change into new directory cd sd clone automatic1111 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui cd stable-diffusion-webui setup python venv python3 -m venv venv source venv/bin/activate install packages pip3 install -r requirements.txt uninstall cuda torch pip3 uninstall torch torchvision install torch ROCm pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6 create launch script: sudo nano launch.sh inside the launch file paste the contents of this url: https://github.com/jhodak/linux-configuration-files/blob/main/SD/launch-sh to launch SD bash launch.sh optional parameters for your launch script: --no-half --precision full --upcast-sampling --no-half-vae --medvram If you don't need these extra parameters I would recommend not to turn them on. You may only need one or two of these parameters. If you do not have an 11.0.0 graphics card, you may need to try: HSA_OVERRIDE_GFX_VERSION=10.3.0 If you have an AMD integrated GPU, and you are having troubles, you may need to change: HIP_VISIBLE_DEVICES=1 If you are having some memory troubles try changing garbage collection threshold in launch script to 0.9