[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Fooocus and AUTOMATIC1111 on AMD GPUs



Hey folks,

Back in December, I provided some instructions for setting up ComfyUI. As Bart pointed out, the PyTorch packages distributed through pip actually come bundled with prebuilt ROCm binaries and the apt-provided packages that I'd listed were entirely superfluous [1]. Despite that, it's at least a handy thing to know about.

I figured I'd provide similar installation instructions for Fooocus and AUTOMATIC1111 on Debian Trixie, as I found them to be useful applications. The ComfyUI workflow was a bit too complicated for me, but I found Fooocus and AUTOMATIC1111 to be useful. As a total beginner, I particularly appreciated how easy Fooocus was to get started with.

To run Fooocus:

apt install git python3-full
git clone https://github.com/lllyasviel/Fooocus.git
cd Fooocus
git checkout 59f183ab9b8e4a4bbf0fb8bc43886e19e8dfdfae
python3 -m venv venv3
. venv3/bin/activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2
pip install -r requirements_versions.txt
python3 entry_with_update.py
# or:
# python3 entry_with_update.py --preset anime
# python3 entry_with_update.py --preset realistic

To run AUTOMATIC1111:

# use spack to install a compatible version of python
sudo apt install bzip2 ca-certificates g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd build-essential cmake
git clone -c feature.manyFiles=true https://github.com/spack/spack.git
cd spack
git checkout v0.23.1
. share/spack/setup-env.sh
spack spec zlib
spack external find
spack spec python@3.11
spack install python@3.11
spack load python@3.11
cd ..
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
git checkout v1.10.1
python -m venv venv3
. venv3/bin/activate
python -m pip install --upgrade pip wheel
TORCH_COMMAND='pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2' python launch.py

This is probably quite boring stuff for most of you, but the AUTOMATIC1111 incompatibility with Python 3.12 was a pain. Their install guide recommends using conda, but as someone unfamiliar with that ecosystem, I found the setup to be complex. I'm a big fan of the Spack package manager, so my instructions use that tool instead [2].

I haven't mastered the art of configuring container port permissions, so I didn't test these instructions in an isolated environment. If you have any troubles, please let me know.

Sincerely,
Cory Bloor

[1]: https://lists.debian.org/debian-ai/2024/12/msg00046.html
[2]: https://spack.io/


Reply to: