feat: upgrade to ROCm 7.2.2 / PyTorch 2.10.0 with native RDNA4 support#6
feat: upgrade to ROCm 7.2.2 / PyTorch 2.10.0 with native RDNA4 support#6brosequist wants to merge 2 commits intocorundex:mainfrom
Conversation
- Base image: rocm/pytorch:rocm7.2.2_ubuntu24.04_py3.12_pytorch_release_2.10.0 - ComfyUI: v0.19.3 - torchaudio 2.10.0+rocm7.2.2 ships pre-built in base image — no separate install or workaround needed - Replace onnxruntime_rocm with onnxruntime_migraphx (AMD renamed package in ROCm 7.x, same 'onnxruntime' Python namespace, provides MIGraphX backend) - RDNA4 (gfx1200/gfx1201) supported natively — no HSA_OVERRIDE_GFX_VERSION workaround required - numpy 2.x compatible with PyTorch 2.10.0 — removed numpy<2 pin - Update requirements: add requests, piexif, soundfile; pin transformers==5.6.1 and tokenizers==0.22.2 for ComfyUI compatibility - Update build.sh detailed tag format, README version table, hardware table, and troubleshooting guide - Credit Griznah (Ole-Magnus Sæther) for ROCm 7.x update groundwork (PR corundex#5) Supersedes PR corundex#5 — extends Griznah's ROCm 7.1.1 base to 7.2.2 + PyTorch 2.10.0
Additional findings from production deployment (k3s + dual RDNA4 GPUs)Sharing a few things discovered while deploying this image in a k3s cluster with both RX 9070 XT (gfx1201) + RX 9060 XT (gfx1200): Dual-GPU setupSet Kubernetes resource claim: WanVideoWrapper multitalk import ordering patchWith Workaround applied in our startup script: SAMPLER=custom_nodes/ComfyUI-WanVideoWrapper/nodes_sampler.py
if [ -f "$SAMPLER" ] && ! grep -q MULTITALK_AVAILABLE "$SAMPLER"; then
sed -i 's/^ MULTITALK_AVAILABLE = True$/ from .multitalk.multitalk_loop import multitalk_loop\n MULTITALK_AVAILABLE = True/' "$SAMPLER"
sed -i '/^from \.multitalk\.multitalk_loop import multitalk_loop$/d' "$SAMPLER"
fiThis moves the import inside the ComfyUI version string patchThe If you check out the latest release branch at startup (rather than pinning in the image), patch the version strings to match: VER=$(echo "$LATEST_REL" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
sed -i "s/__version__ = \".*\"/__version__ = \"${VER}\"/" comfyui_version.py
sed -i "s/^version = \".*\"/version = \"${VER}\"/" pyproject.tomlonnxruntime_migraphx — gfx1200/gfx1201 worksConfirmed
|
|
Hey, thanks for the PR — I gave this a try and ran into a startup issue.
docker compose up logTracked it down to requirements_rocm.txt — it's missing a few packages that ComfyUI v0.19.3 now imports at module level in main.py:
https://github.com/Comfy-Org/ComfyUI/blob/3086026401180c9216bcb6ace442a4e3587d2c66/main.py#L34 The upstream requirements.txt includes comfy-aimdo>=0.2.12 (and comfy-kitchen and blake3), but they didn't make it into the ROCm version of the file. Adding them back fixes the crash: pydantic~=2.0
pydantic-settings~=2.0
+comfy-aimdo>=0.2.12
+comfy-kitchen>=0.2.8
+simpleeval>=1.0.0
+blake3
+filelock
+
# Image / video / audio
kornia>=0.7.1After adding those, another warning shows up — PyOpenGL and glfw are also missing, which breaks comfy_extras/nodes_glsl.py. The upstream requirements has these too, just listed under "non essential dependencies". After first fix — OpenGL warningHere's the complete fix for requirements_rocm.txt: +comfy-aimdo>=0.2.12
+comfy-kitchen>=0.2.8
+simpleeval>=1.0.0
+blake3
+filelock
+
+# OpenGL
+PyOpenGL
+glfw
+
# Image / video / audio
kornia>=0.7.1With these additions everything starts cleanly. Tested on RX 7800 XT |
ComfyUI v0.19.3 imports `comfy_aimdo` and friends at module level in
main.py. The upstream requirements.txt lists these, but they were
missing from the ROCm-specific requirements_rocm.txt — so containers
built from this PR crash on startup with:
ModuleNotFoundError: No module named 'comfy_aimdo'
Add the missing packages (comfy-aimdo, comfy-kitchen, simpleeval,
blake3, filelock) to match upstream requirements.txt. Reported by
@SWZ128 in PR corundex#6.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for catching this @SWZ128 — pushed |

Summary
Upgrades the base image from ROCm 6.x to ROCm 7.2.2 / PyTorch 2.10.0, adding native RDNA4 support and resolving several dependency issues.
This supersedes PR #5 (thank you @Griznah for the ROCm 7.x groundwork!), extending it further to 7.2.2 + PyTorch 2.10.0.
Changes
Base image
rocm/pytorch:rocm7.2.2_ubuntu24.04_py3.12_pytorch_release_2.10.0torchaudio — now works out of the box
torchaudio 2.10.0+rocm7.2.2ships pre-built in the AMD base imagetry/exceptguard neededonnxruntime
onnxruntime_rocm→onnxruntime_migraphxstarting in ROCm 7.xrepo.radeon.comonnxruntimePython namespace (drop-in replacement)RDNA4 native support (RX 9000 series)
HSA_OVERRIDE_GFX_VERSIONworkaround is no longer needednumpy
numpy<2pinrequirements_rocm.txt
requests(needed by ComfyUI and several custom nodes)piexif,soundfiletransformers==5.6.1,tokenizers==0.22.2for ComfyUI compatibilityComfyUI version
Test plan
torch.cuda.is_available()returnsTruein the built containertorchaudio.__version__reports2.10.0+rocm7.2.2.git5047768fwithout any install steptorchvisionimports cleanlyHSA_OVERRIDE_GFX_VERSIONneeded🤖 Generated with Claude Code