RuntimeError: Couldn't install torch.

I’ve been trying following instructions here, https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs
for amd gpu on windows but keep running into the same issue.

venv "C:\Users\rob\Desktop\stable-diffusion-webui-directml\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1-amd-53-g32f147b7
Commit hash: 32f147b7eb59be991db6619b9fa63874d59e1ed3
ROCm: agents=['gfx1201']
Installing rocm
ROCm: version=7.2, using agent gfx1201
Installing torch and torchvision
Looking in indexes: https://rocm.nightlies.amd.com/v2-staging/gfx120X-all
Collecting torch
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torch-2.10.0%2Brocm7.12.0a20260227-cp310-cp310-win_amd64.whl (267.6 MB)
Collecting torchvision
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260227-cp310-cp310-win_amd64.whl (1.3 MB)
Collecting filelock (from torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/filelock-3.24.2-py3-none-any.whl (24 kB)
Collecting typing-extensions>=4.10.0 (from torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Collecting sympy>=1.13.3 (from torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/sympy-1.14.0-py3-none-any.whl (6.3 MB)
Collecting networkx>=2.5.1 (from torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/networkx-3.4.2-py3-none-any.whl (1.7 MB)
Collecting jinja2 (from torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/jinja2-3.1.6-py3-none-any.whl (134 kB)
Collecting fsspec>=0.8.5 (from torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/fsspec-2026.2.0-py3-none-any.whl (202 kB)
Requirement already satisfied: rocm==7.12.0a20260227 in .\venv\lib\site-packages (from rocm[libraries]==7.12.0a20260227->torch) (7.12.0a20260227)
Requirement already satisfied: rocm-sdk-core==7.12.0a20260227 in .\venv\lib\site-packages (from rocm==7.12.0a20260227->rocm[libraries]==7.12.0a20260227->torch) (7.12.0a20260227)
Collecting rocm-sdk-libraries-gfx120X-all==7.12.0a20260227 (from rocm[libraries]==7.12.0a20260227->torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/rocm_sdk_libraries_gfx120x_all-7.12.0a20260227-py3-none-win_amd64.whl (557.7 MB)
INFO: pip is looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.
Collecting torchvision
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260226-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260225-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260224-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260223-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260222-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260221-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260220-cp310-cp310-win_amd64.whl (1.3 MB)
INFO: pip is still looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260219-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260218-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.25.0%2Brocm7.12.0a20260217-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260227-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260226-cp310-cp310-win_amd64.whl (1.3 MB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260225-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260224-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260223-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260222-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260221-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260220-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260219-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260218-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.12.0a20260217-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251216-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251215-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251214-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251213-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251212-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251211-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251210-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251209-cp310-cp310-win_amd64.whl (1.3 MB)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torchvision-0.24.0%2Brocm7.11.0a20251208-cp310-cp310-win_amd64.whl (1.3 MB)
Collecting torch
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/torch-2.10.0%2Brocm7.12.0a20260226-cp310-cp310-win_amd64.whl (267.5 MB)
Collecting rocm-sdk-core==7.12.0a20260227 (from rocm==7.12.0a20260227->rocm[libraries]==7.12.0a20260227->torch)
  Using cached https://rocm.nightlies.amd.com/v2-staging/gfx120X-all/rocm_sdk_core-7.12.0a20260227-py3-none-win_amd64.whl (694.7 MB)
Collecting rocm==7.12.0a20260227 (from rocm[libraries]==7.12.0a20260227->torch)
  Using cached rocm-7.12.0a20260227-py3-none-any.whl
ERROR: Cannot install torchvision==0.24.0+rocm7.11.0a20251208, torchvision==0.24.0+rocm7.11.0a20251209, torchvision==0.24.0+rocm7.11.0a20251210, torchvision==0.24.0+rocm7.11.0a20251211, torchvision==0.24.0+rocm7.11.0a20251212, torchvision==0.24.0+rocm7.11.0a20251213, torchvision==0.24.0+rocm7.11.0a20251214, torchvision==0.24.0+rocm7.11.0a20251215, torchvision==0.24.0+rocm7.11.0a20251216, torchvision==0.24.0+rocm7.12.0a20260217, torchvision==0.24.0+rocm7.12.0a20260218, torchvision==0.24.0+rocm7.12.0a20260219, torchvision==0.24.0+rocm7.12.0a20260220, torchvision==0.24.0+rocm7.12.0a20260221, torchvision==0.24.0+rocm7.12.0a20260222, torchvision==0.24.0+rocm7.12.0a20260223, torchvision==0.24.0+rocm7.12.0a20260224, torchvision==0.24.0+rocm7.12.0a20260225, torchvision==0.24.0+rocm7.12.0a20260226, torchvision==0.24.0+rocm7.12.0a20260227, torchvision==0.25.0+rocm7.12.0a20260217, torchvision==0.25.0+rocm7.12.0a20260218, torchvision==0.25.0+rocm7.12.0a20260219, torchvision==0.25.0+rocm7.12.0a20260220, torchvision==0.25.0+rocm7.12.0a20260221, torchvision==0.25.0+rocm7.12.0a20260222, torchvision==0.25.0+rocm7.12.0a20260223, torchvision==0.25.0+rocm7.12.0a20260224, torchvision==0.25.0+rocm7.12.0a20260225, torchvision==0.25.0+rocm7.12.0a20260226 and torchvision==0.25.0+rocm7.12.0a20260227 because these package versions have conflicting dependencies.

The conflict is caused by:
    torchvision 0.25.0+rocm7.12.0a20260227 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260226 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260225 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260224 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260223 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260222 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260221 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260220 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260219 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260218 depends on numpy
    torchvision 0.25.0+rocm7.12.0a20260217 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260227 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260226 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260225 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260224 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260223 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260222 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260221 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260220 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260219 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260218 depends on numpy
    torchvision 0.24.0+rocm7.12.0a20260217 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251216 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251215 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251214 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251213 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251212 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251211 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251210 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251209 depends on numpy
    torchvision 0.24.0+rocm7.11.0a20251208 depends on numpy

Additionally, some packages in these conflicts have no matching distributions available for your environment:
    numpy

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Traceback (most recent call last):
  File "C:\Users\rob\Desktop\stable-diffusion-webui-directml\launch.py", line 48, in <module>
    main()
  File "C:\Users\rob\Desktop\stable-diffusion-webui-directml\launch.py", line 39, in main
    prepare_environment()
  File "C:\Users\rob\Desktop\stable-diffusion-webui-directml\modules\launch_utils.py", line 618, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "C:\Users\rob\Desktop\stable-diffusion-webui-directml\modules\launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "C:\Users\rob\Desktop\stable-diffusion-webui-directml\venv\Scripts\python.exe" -m pip install torch torchvision --index-url https://rocm.nightlies.amd.com/v2-staging/gfx120X-all
Error code: 1
Press any key to continue . . .

It seems a dependency cannot be met and thus pip tries to download all nightly binaries for torchvision. Do you see a proper error when you are trying to install torchvision alone?

How do i install just torchvision alone, is it git clone and some url but which one?