The message
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Affects: AUTOMATIC1111 Stable Diffusion WebUI, Stable Diffusion WebUI Forge
Why is this happening?
How to fix it
- Check which graphics card you have. If you have an AMD card or a Mac, you need a suitable version (for example, the program’s AMD guide). Only then does
--skip-torch-cuda-testinCOMMANDLINE_ARGSmake sense. - For NVIDIA: Update the graphics driver through the NVIDIA app or nvidia.com and restart the PC.
- Delete the
venvfolder in the WebUI folder and restartwebui-user.bat. PyTorch will then be freshly installed with CUDA support. - If that doesn’t help, open a terminal in the WebUI folder and run
.\venv\Scripts\python.exe -m torch.utils.collect_env(in the classic Command Prompt without.\at the beginning). The output shows which torch and CUDA version is installed and helps when asking in the forum. - If you have an RTX-50 card, also read the entry for "sm_120 is not compatible".
Better not: On an NVIDIA card, don’t just add --skip-torch-cuda-test, or everything will run extremely slowly on the CPU.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- VRAM explained: why it decides everything
How much VRAM does local AI need? Rule of thumb, quantization (Q4, Q8, fp8), context, image and video models, offloading, and which card si…
Terms for this
Similar errors
- A1111/Forge with RTX 50: sm_120 is not compatible
- AMD Radeon is not being used, PyTorch is running on the CPU
- The NVIDIA driver on your system is too old
- RuntimeError: CUDA error: an illegal memory access was encountered – the graphics card accessed invalid memory
- A1111/Forge: A tensor with NaNs was produced (black image)
Sources
- https://raw.githubusercontent.com/wiki/AUTOMATIC1111/stable-diffusion-webui/Troubleshooting.md
- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/modules/launch_utils.py
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.