Created
December 17, 2025 16:46
-
-
Save rahra/cbe27e193544dc13705291ed4d204e91 to your computer and use it in GitHub Desktop.
ROCm 7.1.1 + ComfyUI Automated Installer (Ubuntu 25.10)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ############################################### | |
| # This script is a full automated ComfyUI installation with ROCm 7.1.1 for | |
| # Ubuntu 25.10. Nevertheless, it should work in most Linux distros. Just take | |
| # care on the versions of the PyTorch wheels which should fit to your Python | |
| # version. | |
| # | |
| # This script was originally published on | |
| # [Reddit](https://www.reddit.com/r/ROCm/comments/1p9s0dr/comment/nu5ibgw/) for | |
| # Ubuntu 24.04 and I took it as is and modified it to fit for Ubuntu 25.10. | |
| ############################################### | |
| set -e | |
| ############################################### | |
| # SAFETY + CONFIRMATION | |
| ############################################### | |
| echo "=======================================================" | |
| echo " ROCm 7.1.1 + ComfyUI Automated Installer (Ubuntu 25.10)" | |
| echo "=======================================================" | |
| echo | |
| echo "This script will:" | |
| echo " - Remove old ROCm repo entries" | |
| echo " - Add ROCm 7.1.1 repositories" | |
| echo " - Install ROCm & developer dependencies" | |
| echo " - Modify GRUB to enable IOMMU + ReBAR" | |
| echo " - Install ComfyUI and AMD/ROCm-compatible packages" | |
| echo | |
| read -rp "Do you want to continue? (y/N): " RESP | |
| if [[ "${RESP,,}" != "y" ]]; then | |
| echo "Installation cancelled." | |
| exit 1 | |
| fi | |
| ############################################### | |
| # ROOT CHECK | |
| ############################################### | |
| if [[ "$EUID" -eq 0 ]]; then | |
| echo "❌ Do NOT run this script as root. Run normally (it will use sudo)." | |
| exit 1 | |
| fi | |
| ############################################### | |
| # START | |
| ############################################### | |
| echo "⬇ Removing old ROCm repo…" | |
| sudo rm -f /etc/apt/sources.list.d/rocm.list || true | |
| echo "📁 Ensuring keyring directory exists…" | |
| sudo mkdir -p /etc/apt/keyrings | |
| sudo chmod 0755 /etc/apt/keyrings | |
| echo "🔑 Downloading ROCm repo key…" | |
| wget -q https://repo.radeon.com/rocm/rocm.gpg.key -O - | \ | |
| gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null | |
| echo "📄 Adding ROCm 7.1.1 repositories…" | |
| sudo tee /etc/apt/sources.list.d/rocm.list >/dev/null << 'EOF' | |
| deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/7.1.1 noble main | |
| deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/graphics/7.1.1/ubuntu noble main | |
| EOF | |
| echo "📌 Setting apt pin priority…" | |
| sudo tee /etc/apt/preferences.d/rocm-pin-600 >/dev/null << 'EOF' | |
| Package: * | |
| Pin: release o=repo.radeon.com | |
| Pin-Priority: 600 | |
| EOF | |
| echo "🔄 Updating apt package lists…" | |
| sudo apt update | |
| echo "📦 Installing ROCm base package…" | |
| sudo apt install -y rocm | |
| echo "👤 Adding user to video/render groups…" | |
| sudo usermod -a -G render,video "$LOGNAME" | |
| ############################################### | |
| # GRUB CONFIGURATION | |
| ############################################### | |
| echo "⚙ Configuring GRUB kernel parameters…" | |
| # Backup existing GRUB first | |
| sudo cp /etc/default/grub /etc/default/grub.bak | |
| sudo sed -i \ | |
| 's/^\(GRUB_CMDLINE_LINUX_DEFAULT=.*\)"/\1 iommu=pt amd_iommu=force_isolation amd_iommu=on above4g_decoding resizable_bar amdgpu.mcbp=0 amdgpu.cwsr_enable=0 amdgpu.queue_preemption_timeout_ms=1"/' \ | |
| /etc/default/grub | |
| sudo update-grub | |
| ############################################### | |
| # INSTALL ROCm DEVELOPMENT LIBRARIES | |
| ############################################### | |
| echo "🧩 Installing development + ROCm packages…" | |
| sudo apt install -y \ | |
| python3-venv git python3-setuptools python3-wheel \ | |
| graphicsmagick-imagemagick-compat \ | |
| llvm-amdgpu libamd-comgr2 libhsa-runtime64-1 \ | |
| librccl1 librocalution0 librocblas0 librocfft0 \ | |
| librocm-smi64-1 librocsolver0 librocsparse0 \ | |
| rocm-device-libs-17 rocm-smi rocminfo hipcc \ | |
| libhiprand1 libhiprtc-builtins5 \ | |
| radeontop cmake clang gcc g++ rocm miopen-hip | |
| ############################################### | |
| # ROCm ENVIRONMENT VARIABLES | |
| ############################################### | |
| echo "📦 Setting up ROCm environment paths…" | |
| sudo tee /etc/profile.d/rocm_path.sh >/dev/null << 'EOF' | |
| export PATH="$PATH:/opt/rocm/bin" | |
| export LD_LIBRARY_PATH="/opt/rocm/lib:$LD_LIBRARY_PATH" | |
| EOF | |
| sudo chmod +x /etc/profile.d/rocm_path.sh | |
| sudo tee /etc/ld.so.conf.d/rocm.conf >/dev/null << 'EOF' | |
| /opt/rocm/lib | |
| EOF | |
| sudo ldconfig | |
| ############################################### | |
| # CLONE & INSTALL COMFYUI | |
| ############################################### | |
| echo "🧰 Cloning ComfyUI…" | |
| git clone https://github.com/comfyanonymous/ComfyUI || true | |
| cd ComfyUI | |
| echo "🐍 Creating Python venv…" | |
| python3 -m venv .venv | |
| source .venv/bin/activate | |
| pip install --upgrade pip wheel setuptools | |
| echo "📥 Installing ComfyUI base Python requirements…" | |
| pip install -r requirements.txt | |
| ############################################### | |
| # INSTALL ROCm PYTORCH WHEELS | |
| ############################################### | |
| echo "🔥 Downloading ROCm PyTorch wheels (ROCm 7.1.1)…" | |
| wget -q https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torch-2.9.1%2Brocm7.1.1.lw.git351ff442-cp313-cp313-linux_x86_64.whl | |
| wget -q https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchvision-0.24.0%2Brocm7.1.1.gitb919bd0c-cp313-cp313-linux_x86_64.whl | |
| wget -q https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/triton-3.5.1%2Brocm7.1.1.gita272dfa8-cp313-cp313-linux_x86_64.whl | |
| wget -q https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1.1/torchaudio-2.9.0%2Brocm7.1.1.gite3c6ee2b-cp313-cp313-linux_x86_64.whl | |
| echo "🧹 Removing conflicting PyTorch installations…" | |
| pip uninstall -y torch torchvision torchaudio triton || true | |
| echo "📦 Installing ROCm wheels…" | |
| pip install *.whl | |
| pip install matplotlib pandas simpleeval | |
| pip install comfyui-frontend-package --upgrade | |
| ############################################### | |
| # COMFYUI EXTENSIONS | |
| ############################################### | |
| echo "🧩 Installing ComfyUI extensions…" | |
| cd custom_nodes | |
| git clone -b AMD https://github.com/crystian/ComfyUI-Crystools.git || true | |
| cd ComfyUI-Crystools && pip install -r requirements.txt && cd .. | |
| git clone https://github.com/ltdrdata/ComfyUI-Manager comfyui-manager || true | |
| cd comfyui-manager && pip install -r requirements.txt && cd .. | |
| pip install diffusers | |
| git clone https://github.com/pnikolic-amd/ComfyUI_MIGraphX.git || true | |
| cd ComfyUI_MIGraphX && pip install -r requirements.txt && cd .. | |
| git clone https://github.com/ltdrdata/comfyui-unsafe-torch || true | |
| git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack || true | |
| cd comfyui-impact-pack && pip install -r requirements.txt && cd .. | |
| git clone https://github.com/ltdrdata/ComfyUI-Impact-Subpack || true | |
| cd ComfyUI-Impact-Subpack && pip install -r requirements.txt && cd .. | |
| git clone https://github.com/chengzeyi/Comfy-WaveSpeed.git || true | |
| git clone https://github.com/willmiao/ComfyUI-Lora-Manager.git || true | |
| cd ComfyUI-Lora-Manager && pip install -r requirements.txt && cd .. | |
| ############################################### | |
| # FINAL MESSAGE | |
| ############################################### | |
| echo | |
| echo "==================================================" | |
| echo "🎉 Installation complete!" | |
| echo "👉 Reboot required for GRUB + GPU group changes." | |
| echo "==================================================" | |
| echo | |
| echo "After reboot, start ComfyUI with:" | |
| echo " cd ~/ComfyUI" | |
| echo " source .venv/bin/activate" | |
| echo " python main.py" | |
| echo | |
| echo "Your system is now ready for ROCm 7.1.1 + ComfyUI 🚀" | |
| echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment