Stable Diffusion with AMDGPU & AUTOMATIC1111 on Slackware 15
these are just some notes for things i ran into. i often don't like to install things properly if they're only used by one program, and much prefer making a mess of my home directory instead.. sorry if that's annoying :)
note 0: i guess as a quick one, despite the mumbo-jumbo about installing/building ROCM in the instructions, in youtube videos, and everywhere else.. making it seem potentially complicated, slackware already has the driver, and webui.sh picks up some libraries on it's own. i believe your user might already be in the "video" group as well from the defaults.
note 1: in slackware sbin directories are not in the user path by default. this means automatic1111's webui.sh file, which just assumes "lspci" is in the path, can't find out whether you have a supported video card or not and reverts to CPU ONLY. if you're stuck with that i'm quite sad for you.
note 2: stable diffusion chews up memory and never releases it. you need google's tcmalloc to do that.. right. since it has no slackbuild (actually, it looks like it does, but it's old) i build it in my home dir:
/home/alex/src/gperftools-2.13/then i have a small script in the same directory as the webui.sh one that has the following lines:
#!/bin/bash export LD_LIBRARY_PATH=/home/alex/src/gperftools-2.13/.libs export LD_PRELOAD=/home/alex/src/gperftools-2.13/.libs/libtcmalloc.so source webui.shobviously if your version is different so should the paths be. the great wisdom of the webui.sh means you don't really know if it's working or not without watching your ram usage. switch SDXL checkpoints a few times and you'll know (never went into swap with 32gb of ram until now)
note 3: my power supply isn't up to the task! my machine just powers off suddenly when i'm rendering an image! .. yep, "transient power spikes" suck. gaming works just fine 24/7 with the gpu at 100% but not this apparently. if you don't want to buy an even more ridiculous power supply you can try something like this:
echo "200000000" > /sys/class/drm/card0/device/hwmon/hwmon4/power1_capyou'll have to change the number on the left, and potentially the card # and the hwmon #. this will make the card slower though but it's better than ruining your hardware and corrupting all your hard drives or something.
other/note 4: some Stable Diffusion interfaces like SDNext won't detect your video card, ROCm support, whatever.. i've found if you hardcode the checks, some will work just fine. for SDNext you can edit installer.py around line 700 to force torch_command to install_rocm_zluda and then around line 575, force torch_command to one of the versions listed. try the earliest versions first unless you're using Slackware current. text-generation-webui can be finagled to work too.
hopefully this was helpful, check back for updates maybe :)
(c) 2023 Alexander Grotewohl