1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

EVO-X2(AI MAX+ 395, Radeon 8060S)+Ubuntu24.04+ComfyUI ROCm 7.2.1で画像生成

1
Last updated at Posted at 2026-04-18

Ubuntu 24.04 + Radeon 8060S で ComfyUI を動かす最短手順

Ubuntu 24.04 と Radeon 8060S グラフィックスの環境で、ComfyUI を正常起動するまでの手順だけをまとめます。
2026/4/2時点で最新のROCm 7.2.1での環境構築です。
試行錯誤で増えがちな分岐は省き、動作確認できた構成に絞っています。
ROCmのバージョンを全て(ドライバ、torch、等)において揃えることができれば成功するはずです。ComfyUIで使用しているtorchのバージョンが違う、等で失敗するとハマります。

想定読者

  • EVO-X2所有者
    • Ubuntu 24.04利用

動作環境

  • OS: Ubuntu 24.04
  • GPU: Radeon 8060S グラフィックス(AI Max+ 395)
  • ドライバ: ROCm 7.2.1
  • Python: 3.12
  • パッケージ管理: uv

今回のポイントは、Radeon 8060S を gfx1151 として扱うことです。
ComfyUI 起動時に HSA_OVERRIDE_GFX_VERSION=11.5.1PYTORCH_ROCM_ARCH=gfx1151 を付けると安定しました。

先にやること

uv が未導入なら先に入れておきます。

curl -LsSf https://astral.sh/uv/install.sh | sh

ComfyUI のセットアップ

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
uv python pin 3.12
uv venv
source .venv/bin/activate

依存関係を入れます。

uv pip install -r requirements.txt

ROCm 版 PyTorch を入れる

cp312 向けの ROCm 7.2.1 wheel を使います。

wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.1/torch-2.9.1%2Brocm7.2.1.lw.gitff65f5bc-cp312-cp312-linux_x86_64.whl
wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.1/torchvision-0.24.0%2Brocm7.2.1.gitb919bd0c-cp312-cp312-linux_x86_64.whl
wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.1/triton-3.5.1%2Brocm7.2.1.gita272dfa8-cp312-cp312-linux_x86_64.whl
wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.2.1/torchaudio-2.9.0%2Brocm7.2.1.gite3c6ee2b-cp312-cp312-linux_x86_64.whl

既存の PyTorch 関連を外してから入れ直します。

uv pip uninstall torch torchvision triton torchaudio
uv pip install \
  torch-2.9.1+rocm7.2.1.lw.gitff65f5bc-cp312-cp312-linux_x86_64.whl \
  torchvision-0.24.0+rocm7.2.1.gitb919bd0c-cp312-cp312-linux_x86_64.whl \
  torchaudio-2.9.0+rocm7.2.1.gite3c6ee2b-cp312-cp312-linux_x86_64.whl \
  triton-3.5.1+rocm7.2.1.gita272dfa8-cp312-cp312-linux_x86_64.whl

PyTorch の認識確認

GPU が見えていれば次へ進みます。

python -c "import torch; print(f'PyTorch version: {torch.__version__}'); print(f'CUDA available: {torch.cuda.is_available()}'); print(f'Device count: {torch.cuda.device_count()}'); print(f'Device name: {torch.cuda.get_device_name(0) if torch.cuda.is_available() else \"N/A\"}')"

CUDA available: True になれば OK です。
ROCm 環境でも PyTorch 側は cuda 表記になります。(混乱ポイント)

ComfyUI の起動

まずはこのコマンドで起動します。

HSA_OVERRIDE_GFX_VERSION=11.5.1 \
PYTORCH_ROCM_ARCH=gfx1151 \
uv run main.py --listen

ブラウザから http://localhost:8188/ にアクセスします。

起動シェル

※"~"部分は自動起動させる際に展開されない可能性があるため、絶対パスに書き換え推奨

  • 手元の環境で安定して起動した際のものです
  • 追加で検証していないため不要なパラメータが含まれている可能性があります
#!/bin/bash
# EVO-X2 (gfx1151)

export ROCM_VER=7.2.1
export ROCM_PATH=/opt/rocm-${ROCM_VER}
export PATH=${ROCM_PATH}/bin:$PATH
export LD_LIBRARY_PATH=${ROCM_PATH}/lib:${ROCM_PATH}/lib64:${LD_LIBRARY_PATH}
export PYTHONPATH=/opt/rocm-${ROCM_VER}/share/amd_smi:${PYTHONPATH:-}

export HSA_OVERRIDE_GFX_VERSION=11.0.0

source ~/ComfyUI/.venv/bin/activate

cd ~/ComfyUI
~/.local/bin/uv run --active main.py \
    --listen 0.0.0.0 \
    --port 8188 \
    --cuda-device 0 \
    --use-split-cross-attention \
    --preview-method none \
    --cpu-vae \
    --force-fp32

自動起動

  • serviceファイル作成
sudo vi /etc/systemd/system/comfyui.service
[Unit]
Description=Comfy UI
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=[ComfyUI起動ユーザー名]
WorkingDirectory=/path/to/ComfyUI
ExecStart=/path/to/ComfyUI/startup.sh
Restart=always
RestartSec=5
StandardOutput=append:/var/log/comfyui.log
StandardError=append:/var/log/comfyui.log
TimeoutStartSec=300
TimeoutStopSec=30

[Install]
WantedBy=multi-user.target
  • 有効化
sudo systemctl enabled comfyui

うまく起動しないとき

  • ログを詳しく見たいとき
HSA_OVERRIDE_GFX_VERSION=11.5.1 \
PYTORCH_ROCM_ARCH=gfx1151 \
uv run main.py --listen --verbose

まとめ

Ubuntu 24.04 + Radeon 8060S で ComfyUI を動かすうえで重要だと感じたのは次の 2 点でした。

  • Python 3.12 環境を uv で作る
  • ROCm 7.2.1 向けの PyTorch wheel を使う

この構成なら、余計な分岐を増やさずに ComfyUI の起動まで持っていけます。

参考にさせていただいた記事

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?