From 38fb9fd484c32805bdf26cf743fe2e74ded4e6d3 Mon Sep 17 00:00:00 2001 From: chejh-amd Date: Wed, 1 Jul 2026 12:24:39 +0800 Subject: [PATCH] Add ROCm 7.2 support and default to it --- comfy_cli/cmdline.py | 2 +- comfy_cli/command/install.py | 4 ++-- comfy_cli/constants.py | 1 + comfy_cli/uv.py | 4 ++-- tests/comfy_cli/test_install_python_resolution.py | 1 + tests/uv/test_uv.py | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/comfy_cli/cmdline.py b/comfy_cli/cmdline.py index 3bae27dd..02007f96 100644 --- a/comfy_cli/cmdline.py +++ b/comfy_cli/cmdline.py @@ -450,7 +450,7 @@ def install( ), ] = None, cuda_version: Annotated[CUDAVersion | None, typer.Option(show_default=False)] = None, - rocm_version: Annotated[ROCmVersion, typer.Option(show_default=True)] = ROCmVersion.v6_3, + rocm_version: Annotated[ROCmVersion, typer.Option(show_default=True)] = ROCmVersion.v7_2, amd: Annotated[ bool | None, typer.Option( diff --git a/comfy_cli/command/install.py b/comfy_cli/command/install.py index 1aa5723f..db89f2ed 100755 --- a/comfy_cli/command/install.py +++ b/comfy_cli/command/install.py @@ -51,7 +51,7 @@ def pip_install_comfyui_dependencies( skip_torch_or_directml: bool, skip_requirement: bool, python: str = sys.executable, - rocm_version: constants.ROCmVersion = constants.ROCmVersion.v6_3, + rocm_version: constants.ROCmVersion = constants.ROCmVersion.v7_2, cuda_tag: str | None = None, ): os.chdir(repo_dir) @@ -153,7 +153,7 @@ def execute( gpu: constants.GPU_OPTION | None = None, cuda_version: constants.CUDAVersion | None = None, cuda_tag: str | None = None, - rocm_version: constants.ROCmVersion = constants.ROCmVersion.v6_3, + rocm_version: constants.ROCmVersion = constants.ROCmVersion.v7_2, plat: constants.OS = None, skip_torch_or_directml: bool = False, skip_requirement: bool = False, diff --git a/comfy_cli/constants.py b/comfy_cli/constants.py index 0f7634bb..5f88be96 100644 --- a/comfy_cli/constants.py +++ b/comfy_cli/constants.py @@ -89,6 +89,7 @@ class CUDAVersion(str, Enum): class ROCmVersion(str, Enum): + v7_2 = "7.2" v7_1 = "7.1" v7_0 = "7.0" v6_3 = "6.3" diff --git a/comfy_cli/uv.py b/comfy_cli/uv.py index 17bebd22..f1d89ae2 100644 --- a/comfy_cli/uv.py +++ b/comfy_cli/uv.py @@ -122,11 +122,11 @@ def parse_req_file(rf: PathLike, skips: list[str] | None = None): class DependencyCompiler: cpuPytorchUrl = "https://download.pytorch.org/whl/cpu" - rocmPytorchUrl = "https://download.pytorch.org/whl/rocm6.3" + rocmPytorchUrl = "https://download.pytorch.org/whl/rocm7.2" nvidiaPytorchUrl = "https://download.pytorch.org/whl/cu126" cpuTorchBackend = "cpu" - rocmTorchBackend = "rocm6.3" + rocmTorchBackend = "rocm7.2" nvidiaTorchBackend = "cu126" overrideGpu = dedent( diff --git a/tests/comfy_cli/test_install_python_resolution.py b/tests/comfy_cli/test_install_python_resolution.py index 8736fe56..f5d44137 100644 --- a/tests/comfy_cli/test_install_python_resolution.py +++ b/tests/comfy_cli/test_install_python_resolution.py @@ -283,6 +283,7 @@ class TestTorchInstallCommands: @pytest.mark.parametrize( "rocm_version,expected_url", [ + (constants.ROCmVersion.v7_2, "https://download.pytorch.org/whl/rocm7.2"), (constants.ROCmVersion.v7_1, "https://download.pytorch.org/whl/rocm7.1"), (constants.ROCmVersion.v7_0, "https://download.pytorch.org/whl/rocm7.0"), (constants.ROCmVersion.v6_3, "https://download.pytorch.org/whl/rocm6.3"), diff --git a/tests/uv/test_uv.py b/tests/uv/test_uv.py index bf2933c2..eefa1374 100644 --- a/tests/uv/test_uv.py +++ b/tests/uv/test_uv.py @@ -89,7 +89,7 @@ def test_torch_backend_nvidia(): def test_torch_backend_amd(): depComp = DependencyCompiler(cwd=temp, gpu=GPU_OPTION.AMD, outDir=temp, reqFilesCore=[], reqFilesExt=[]) - assert depComp.torchBackend == "rocm6.3" + assert depComp.torchBackend == "rocm7.2" assert depComp.gpuUrl == DependencyCompiler.rocmPytorchUrl