Skip to content

Instantly share code, notes, and snippets.

@B4rr3l-Rid3r
Last active November 26, 2025 00:58
Show Gist options
  • Select an option

  • Save B4rr3l-Rid3r/b03460860f2841144135c0fe8bede5be to your computer and use it in GitHub Desktop.

Select an option

Save B4rr3l-Rid3r/b03460860f2841144135c0fe8bede5be to your computer and use it in GitHub Desktop.
ROCm Fedora and OpenSUSE Installation + ComfyUi + SDNext + Automatic1111
#AMD ROCm Repositories
#ROCm7 fedora
#PRE
sudo dnf install dnf-plugin-config-manager
sudo crb enable
sudo dnf install python3-setuptools python3-wheel
sudo usermod -a -G render,video $LOGNAME
#REPOs
sudo tee /etc/yum.repos.d/rocm.repo <<EOF
[ROCm]
name=rocm
baseurl=https://repo.radeon.com/rocm/el9/latest/main/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo tee /etc/yum.repos.d/rocm-graphics.repo <<EOF
[ROCmGraphics]
name=rocmgraphics
baseurl=https://repo.radeon.com/graphics/latest/el/9.6/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
#INSTALLING ROCm
sudo dnf clean all
sudo dnf install rocm
#REMOVING ROCm
sudo dnf remove rocm
sudo rm /etc/yum.repos.d/rocm*.repo*
sudo rm -rf /var/cache/dnf
sudo dnf clean all
#ROCm Latest OpenSUSE
sudo tee /etc/zypp/repos.d/amdgpu.repo <<EOF
[amdgraphics]
name=amdgpu
baseurl=https://repo.radeon.com/graphics/latest/sle/15.7/main/x86_64/
enabled=1
priority=50
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo tee --append /etc/zypp/repos.d/rocm.repo <<EOF
[rocm]
name=rocm
baseurl=https://repo.radeon.com/rocm/zyp/latest/main/
enabled=1
gpgcheck=1
gpgkey=https://repo.radeon.com/rocm/rocm.gpg.key
EOF
sudo zypper ref
#Installing OpenSUSE
sudo zypper --gpg-auto-import-keys install rocm
sudo usermod -a -G video,render $LOGNAME
sudo reboot
rocminfo
clinfo
#Uninstalling
sudo zypper remove rocm
sudo zypper remove rocm-core amdgpu-core
sudo zypper removerepo "rocm"
sudo zypper removerepo "amdgpu"
sudo zypper clean --all
sudo zypper refresh
#ComfyUI GIT from /home
mkdir comfy && cd comfy
python3.12 -m venv venv --system-site-packages
git clone https://github.com/comfyanonymous/ComfyUI.git
source venv/bin/activate
pip install --pre -U torch torchvision torchaudio pytorch-triton-rocm --index-url https://download.pytorch.org/whl/nightly/rocm7.0
pip install --upgrade pip wheel setuptools
cd ComfyUI
pip install -r requirements.txt
cd custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager comfyui-manager
git clone https://github.com/pnikolic-amd/ComfyUI_MIGraphX.git
cd ComfyUI_MIGraphX
pip install -r requirements.txt
cd ..
cd ..
#export PYTHONPATH=/opt/rocm/lib:$PYTHONPATH
#EXECUTE
python3 main.py
##python main.py --use-pytorch-cross-attention
#TheRock ROCm 7.0
md rocm && cd rocm
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install \
--index-url https://d2awnip2yjpvqn.cloudfront.net/v2/gfx120X-all/ \
rocm[libraries,devel]
python -m pip install torch torchvision torchaudio --index-url https://d2awnip2yjpvqn.cloudfront.net/v2/gfx120X-all --force-reinstall
#pip install --pre -U torch torchvision torchaudio pytorch-triton-rocm --index-url https://download.pytorch.org/whl/nightly/rocm6.4 --force-reinstall
pip freeze
#Automatic 1111
mkdir automatic && cd automatic
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
python3.10 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip wheel
pip install --pre -U torch torchvision torchaudio pytorch-triton-rocm --index-url https://download.pytorch.org/whl/nightly/rocm7.0
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
./webui.sh --upcast-sampling
#SDNext
git clone https://github.com/vladmandic/sdnext
cd sdnext
python3.12 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip wheel
pip install --pre -U torch torchvision torchaudio pytorch-triton-rocm --index-url https://download.pytorch.org/whl/nightly/rocm7.0
pip install -r requirements.txt
#Upgrade and Execute
git pull https://github.com/vladmandic/sdnext
cd sdnext
source venv/bin/activate
export PYTHONPATH=/opt/rocm/lib:$PYTHONPATH
export PYTORCH_TUNABLEOP_ENABLED=1
export TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1
python launch.py --medvram
#Optional
sudo dnf install google-perftools
sudo ldconfig
export LD_PRELOAD=libtcmalloc.so.4
#export MIOPEN_FIND_MODE=2
#export MIGRAPHX_MLIR_USE_SPECIFIC_OPS="attention"
#export PYTORCH_HIP_ALLOC_CONF=expandable_segments:True
#TORCH_BLAS_PREFER_HIPBLASLT=1
#export TORCH_BLAS_PREFER_HIPBLASLT=1
#export ROCBLAS_USE_HIPBLASLT=1
#ComfyUI Extensions
--use-pytorch-cross-attention
--fp16-vae
--fast
--supports-fp8-compute
--use-split-cross-attention
--use-quad-cross-attention
--cpu-vae
--lowvram
--normalvram
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment