Winston Ma
1 min readNov 24, 2023

--

Hi Dan,

Based on your desciption I guess you have a dedicated AMD Graphic Card. Then I guess this tutorial would not help. This tutorial is for the AMD APU (CPU+GPU, which you can find in Laptop and NUCs).

I also faced the same OOM problem in the past. And this is the checklist and hope it help you:

1. Please check the COMMANDLINE_ARGS of stable diffusion, and in the past I use '--precision full --no-half' but after upgrading the kernel and AMD driver update I no longer need these two flags and get no error. So try to remove this two flags if you have. If you got NaN error then try to update graphic driver and kernel.

2. Update your graphic card driver. You can first install latest AMD Graphic Card Driver. As of today the latest one is 5.7.2.

This is the command to update the driver:

wget https://repo.radeon.com/amdgpu-install/5.7.2/ubuntu/jammy/amdgpu-install_5.7.50702-1_all.deb

sudo dpkg -i amdgpu-install_5.7.50702-1_all.deb

rm amdgpu-install_5.7.50702-1_all.deb

amdgpu-uninstall

amdgpu-install -y --usecase=rocm

3. Update kernel. I use Zabbly kernel

https://ubuntuhandbook.org/index.php/2023/11/linux-kernel-6-6-ubuntu-2204-2004/

Hope this helps.

I will update this article accordingly.

--

--

Responses (1)