stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

Run with RTX50xx

Open gin1412a-b opened this issue 8 months ago • 21 comments

anyone ever tried torch-2.6.0+cu128.nv in forge? is it Ok to run?

gin1412a-b avatar Mar 14 '25 13:03 gin1412a-b

yeah, my 5070Ti seem work fine.

nyancatza avatar Mar 15 '25 14:03 nyancatza

I had problems with the 5090 in Forge so im using AUTOMATIC 1111's 50xx blackwell version for now

9wow avatar Mar 16 '25 14:03 9wow

I had problems with the 5090 in Forge so im using AUTOMATIC 1111's 50xx blackwell version for now

incase you're really need to use forge

  • fresh install reForge
  • copy venv from reForge and paste in " webui " folder at forge
  • copy " Scripts " folder " inside that " venv " folder and replace it at " webui_forge_cu121_torch231\system\python "

this solution work for me

nyancatza avatar Mar 16 '25 14:03 nyancatza

this solution work for me

interesting, ill try that out. thank you

9wow avatar Mar 16 '25 17:03 9wow

I had problems with the 5090 in Forge so im using AUTOMATIC 1111's 50xx blackwell version for now

incase you're really need to use forge

* fresh install reForge

* copy venv from reForge and paste in " webui " folder at forge

* copy " Scripts " folder " inside that " venv " folder and replace it at " webui_forge_cu121_torch231\system\python "

this solution work for me

Could you describe this more in detail since i'm very new to this and don't relay understand exactly what i'm supposed to do/how to do what you recommended?

Popmannen avatar Mar 17 '25 12:03 Popmannen

Good evening Unfortunately, Forge doesn't work for me. I have an NV 5080 can you help mior maybe? Unfortunately, I have hardly any knowledge of Python. so an explanation for dummies would be nice.

Dahitcha avatar Mar 18 '25 18:03 Dahitcha

same 5090

dann1kid avatar Mar 23 '25 23:03 dann1kid

Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

  1. Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
  1. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x
C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip
  1. Since Blackwell GPUs (sm_120 architecture) need CUDA 12.8, install a version of PyTorch that supports it
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site)

  1. Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
  1. Install Project Requirements
pip install --prefer-binary -r .\requirements_versions.txt 

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

  1. Finally, run the project
python .\launch.py

Hope it helps!

Image

yumeria avatar Mar 30 '25 00:03 yumeria

Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

1. Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
2. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x
C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip
3. Since Blackwell GPUs (`sm_120` architecture) need CUDA 12.8, install a version of PyTorch that supports it
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site)

4. Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
5. Install Project Requirements
pip install --prefer-binary -r .\requirements_versions.txt 

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

6. Finally, run the project
python .\launch.py

Hope it helps!

Image

Really appreciate your reply and guide to try to help. I know I got all the requirement you mentioned for this, However I got stuck on second step: I don't know how to create a "a new virtual environment with Python 3.10.x" and "C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv" do not say me alot, (I know I'm not smart with this). I think I need a video for this since this "Installation this way is beyond my experience. Thanks again for replying.

Popmannen avatar Mar 30 '25 21:03 Popmannen

I know for a lot of us we don't need all the think this the first thing but have you considered asking ChatGPT Or a similar LLM 4 step by step instructions? Get it to tailor it to you for complete amateur with step by steps and you can almost always figure it out.

On Sun, Mar 30, 2025 at 2:49 PM Popmannen @.***> wrote:

Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

  1. Clone the Repository

git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git

  1. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x

C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip

  1. Since Blackwell GPUs (sm_120 architecture) need CUDA 12.8, install a version of PyTorch that supports it

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page https://pytorch.org/get-started/locally/ and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site https://developer.nvidia.com/cuda-downloads)

  1. Install InsightFace. This dependency, for some reason, doesn’t install automatically

pip install insightface

  1. Install Project Requirements

pip install --prefer-binary -r .\requirements_versions.txt

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

  1. Finally, run the project

python .\launch.py

Hope it helps!

image.png (view on web) https://github.com/user-attachments/assets/d9dc95d2-fd61-462c-819f-12be89bb4bdd

Really appreciate your reply and guide to try to help. I know I got all the requirement you mentioned for this, However I got stuck on second step: I don't know how to create a "a new virtual environment with Python 3.10.x" and "C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv" do not say me alot, (I know I'm not smart with this). I think I need a video for this since this "Installation this way is beyond my experience. Thanks again for replying.

— Reply to this email directly, view it on GitHub https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/2746#issuecomment-2764760925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN7U77DWRSPOYTW5B3XJH32XBRFVAVCNFSM6AAAAABZAVUQDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUG43DAOJSGU . You are receiving this because you are subscribed to this thread.Message ID: @.*** .com> [image: Popmannen]Popmannen left a comment (lllyasviel/stable-diffusion-webui-forge#2746) https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/2746#issuecomment-2764760925

Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

  1. Clone the Repository

git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git

  1. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x

C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip

  1. Since Blackwell GPUs (sm_120 architecture) need CUDA 12.8, install a version of PyTorch that supports it

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page https://pytorch.org/get-started/locally/ and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site https://developer.nvidia.com/cuda-downloads)

  1. Install InsightFace. This dependency, for some reason, doesn’t install automatically

pip install insightface

  1. Install Project Requirements

pip install --prefer-binary -r .\requirements_versions.txt

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

  1. Finally, run the project

python .\launch.py

Hope it helps!

image.png (view on web) https://github.com/user-attachments/assets/d9dc95d2-fd61-462c-819f-12be89bb4bdd

Really appreciate your reply and guide to try to help. I know I got all the requirement you mentioned for this, However I got stuck on second step: I don't know how to create a "a new virtual environment with Python 3.10.x" and "C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv" do not say me alot, (I know I'm not smart with this). I think I need a video for this since this "Installation this way is beyond my experience. Thanks again for replying.

— Reply to this email directly, view it on GitHub https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/2746#issuecomment-2764760925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN7U77DWRSPOYTW5B3XJH32XBRFVAVCNFSM6AAAAABZAVUQDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUG43DAOJSGU . You are receiving this because you are subscribed to this thread.Message ID: @.*** .com>

SillySilk avatar Mar 31 '25 02:03 SillySilk

I know for a lot of us we don't need all the think this the first thing but have you considered asking ChatGPT Or a similar LLM 4 step by step instructions? Get it to tailor it to you for complete amateur with step by steps and you can almost always figure it out.

On Sun, Mar 30, 2025 at 2:49 PM Popmannen @.***> wrote: Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

  1. Clone the Repository

git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git

  1. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x

C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip

  1. Since Blackwell GPUs (sm_120 architecture) need CUDA 12.8, install a version of PyTorch that supports it

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page https://pytorch.org/get-started/locally/ and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site https://developer.nvidia.com/cuda-downloads)

  1. Install InsightFace. This dependency, for some reason, doesn’t install automatically

pip install insightface

  1. Install Project Requirements

pip install --prefer-binary -r .\requirements_versions.txt

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

  1. Finally, run the project

python .\launch.py

Hope it helps!

image.png (view on web) https://github.com/user-attachments/assets/d9dc95d2-fd61-462c-819f-12be89bb4bdd

Really appreciate your reply and guide to try to help. I know I got all the requirement you mentioned for this, However I got stuck on second step: I don't know how to create a "a new virtual environment with Python 3.10.x" and "C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv" do not say me alot, (I know I'm not smart with this). I think I need a video for this since this "Installation this way is beyond my experience. Thanks again for replying.

— Reply to this email directly, view it on GitHub <#2746 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN7U77DWRSPOYTW5B3XJH32XBRFVAVCNFSM6AAAAABZAVUQDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUG43DAOJSGU . You are receiving this because you are subscribed to this thread.Message ID: @.*** .com> [image: Popmannen]Popmannen left a comment (lllyasviel/stable-diffusion-webui-forge#2746) <#2746 (comment)>

Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

  1. Clone the Repository

git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git

  1. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x

C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip

  1. Since Blackwell GPUs (sm_120 architecture) need CUDA 12.8, install a version of PyTorch that supports it

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page https://pytorch.org/get-started/locally/ and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site https://developer.nvidia.com/cuda-downloads)

  1. Install InsightFace. This dependency, for some reason, doesn’t install automatically

pip install insightface

  1. Install Project Requirements

pip install --prefer-binary -r .\requirements_versions.txt

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

  1. Finally, run the project

python .\launch.py

Hope it helps!

image.png (view on web) https://github.com/user-attachments/assets/d9dc95d2-fd61-462c-819f-12be89bb4bdd

Really appreciate your reply and guide to try to help. I know I got all the requirement you mentioned for this, However I got stuck on second step: I don't know how to create a "a new virtual environment with Python 3.10.x" and "C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv" do not say me alot, (I know I'm not smart with this). I think I need a video for this since this "Installation this way is beyond my experience. Thanks again for replying.

— Reply to this email directly, view it on GitHub <#2746 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN7U77DWRSPOYTW5B3XJH32XBRFVAVCNFSM6AAAAABZAVUQDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUG43DAOJSGU .

No I did not think about asking ChatGPT or LLM. That is a very good advice! Thank you again for helping me! You are receiving this because you are subscribed to this thread.Message ID: @.*** .com>

Popmannen avatar Mar 31 '25 09:03 Popmannen

I know for a lot of us we don't need all the think this the first thing but have you considered asking ChatGPT Or a similar LLM 4 step by step instructions? Get it to tailor it to you for complete amateur with step by steps and you can almost always figure it out.

On Sun, Mar 30, 2025 at 2:49 PM Popmannen @.***> wrote: Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

  1. Clone the Repository

git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git

  1. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x

C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip

  1. Since Blackwell GPUs (sm_120 architecture) need CUDA 12.8, install a version of PyTorch that supports it

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page https://pytorch.org/get-started/locally/ and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site https://developer.nvidia.com/cuda-downloads)

  1. Install InsightFace. This dependency, for some reason, doesn’t install automatically

pip install insightface

  1. Install Project Requirements

pip install --prefer-binary -r .\requirements_versions.txt

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

  1. Finally, run the project

python .\launch.py

Hope it helps!

image.png (view on web) https://github.com/user-attachments/assets/d9dc95d2-fd61-462c-819f-12be89bb4bdd

Really appreciate your reply and guide to try to help. I know I got all the requirement you mentioned for this, However I got stuck on second step: I don't know how to create a "a new virtual environment with Python 3.10.x" and "C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv" do not say me alot, (I know I'm not smart with this). I think I need a video for this since this "Installation this way is beyond my experience. Thanks again for replying.

— Reply to this email directly, view it on GitHub <#2746 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN7U77DWRSPOYTW5B3XJH32XBRFVAVCNFSM6AAAAABZAVUQDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUG43DAOJSGU . You are receiving this because you are subscribed to this thread.Message ID: @.*** .com> [image: Popmannen]Popmannen left a comment (lllyasviel/stable-diffusion-webui-forge#2746) <#2746 (comment)>

Hi, RTX 5070 Ti owner here installing for the first time on a Windows 11 machine

Only Cuda 12.8 supports Blackwell GPUs and at the moment only the nightly build have it

Here’s the clean install process that worked for me.

  1. Clone the Repository

git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git

  1. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.x

C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv

Make sure Python 3.10 is installed, newer versions are not compatible

Activate it

.\venv\Scripts\activate

And update pip

python -m pip install --upgrade pip

  1. Since Blackwell GPUs (sm_120 architecture) need CUDA 12.8, install a version of PyTorch that supports it

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

You can check which versions support Blackwell on PyTorch's 'Start Locally' page https://pytorch.org/get-started/locally/ and get the full command from there You’ll need CUDA 12.8 installed on your system beforehand (download from NVIDIA’s site https://developer.nvidia.com/cuda-downloads)

  1. Install InsightFace. This dependency, for some reason, doesn’t install automatically

pip install insightface

  1. Install Project Requirements

pip install --prefer-binary -r .\requirements_versions.txt

Use the provided requirements_versions.txt file, preferring binary installations for speed and compatibility

  1. Finally, run the project

python .\launch.py

Hope it helps!

image.png (view on web) https://github.com/user-attachments/assets/d9dc95d2-fd61-462c-819f-12be89bb4bdd

Really appreciate your reply and guide to try to help. I know I got all the requirement you mentioned for this, However I got stuck on second step: I don't know how to create a "a new virtual environment with Python 3.10.x" and "C:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venv" do not say me alot, (I know I'm not smart with this). I think I need a video for this since this "Installation this way is beyond my experience. Thanks again for replying.

— Reply to this email directly, view it on GitHub <#2746 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHN7U77DWRSPOYTW5B3XJH32XBRFVAVCNFSM6AAAAABZAVUQDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRUG43DAOJSGU .

No I did not think about asking ChatGPT or LLM. That is a very good advice! Thank you again for helping me! You are receiving this because you are subscribed to this thread.Message ID: @.*** .com>

Popmannen avatar Mar 31 '25 09:03 Popmannen

I can't get xformers to work with this one. Is there a specific method that needs to be used?

AnteMaxx avatar Mar 31 '25 19:03 AnteMaxx

For xformers, someone build a wheel for cu128:

https://huggingface.co/ChoIntelligence/xformers-windows-cp310-cu128/tree/main

download the wheel install it to the venv by pip install PATH\TO\WHEEL Then it works!

TZFC avatar Mar 31 '25 22:03 TZFC

For xformers, someone build a wheel for cu128:

https://huggingface.co/ChoIntelligence/xformers-windows-cp310-cu128/tree/main

download the wheel install it to the venv by pip install PATH\TO\WHEEL Then it works!

I did the whole install process and then installed this version of xformers, but when I start with xformers I get the following error:

The procedure entry point ?_singleton@UndefinedTensorImpl@c10@@0U12@A could not be located in the dynamic link library C:\stable-diffusion-webui-forge\venv\Lib\site-packages\xformers_C.pyd.

And:

WARNING:xformers:WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.3.1+cu121 with CUDA 1201 (you have 2.8.0.dev20250327+cu128) Python 3.10.11 (you have 3.10.9) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)

AnteMaxx avatar Apr 01 '25 10:04 AnteMaxx

I got it to work with RTX5080 using this Docker setup

mkautto avatar Apr 02 '25 15:04 mkautto

I got it to work with RTX5080 using this Docker setup

Please! Can you explain how you set it up step by step?

Popmannen avatar Apr 02 '25 16:04 Popmannen

I got it to work with RTX5080 using this Docker setup

Please! Can you explain how you set it up step by step?

I added some instructions to the gist. They are for Linux only, but it should also work on Windows with Docker Desktop (requires WSL2) or a native Docker install inside WSL2. Unfortunately I can’t help with the Windows setup.

mkautto avatar Apr 02 '25 19:04 mkautto

so its working fine, inpainting and so on? Just want to know bevor I sit down and take a day off to get it running 😁

Teskun avatar Apr 16 '25 07:04 Teskun

i updated with

I:\Users\admin\Documents\FORGE\system\python\python.exe -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

its works, but some traceback

    return self._call_hook(
  File "I:\Users\admin\Documents\FORGE\system\python\lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 402, in _call_hook
    raise BackendUnavailable(
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'

Warning: Failed to install handrefinerportable. Some processors will not work.

dann1kid avatar Apr 16 '25 16:04 dann1kid

Fix: “Torch not compiled with CUDA enabled” in Automatic1111 on RTX 5090 (Windows)

This is a complete, reproducible fix for getting Automatic1111 Stable Diffusion WebUI to use the GPU on an RTX 5090.
It captures the exact errors I hit, why they happened, and the step‑by‑step commands that solved them.


TL;DR (Quick Fix)

  1. Activate your WebUI venv (mine is E:\Automatic111\sd-venv312):
E:\Automatic111\stable-diffusion-webui> call E:\Automatic111\sd-venv312\Scripts\activate
  1. Clean old Torch installs & cache:
pip uninstall -y torch torchvision torchaudio xformers
pip cache purge
  1. Install PyTorch nightly with CUDA 12.8 (sm_120 support for RTX 50‑series):
pip install --no-cache-dir --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128
  1. Verify GPU is detected:
python -c "import torch,torchvision; print('torch',torch.__version__,'cuda',getattr(torch.version,'cuda',None)); \
print('avail',torch.cuda.is_available()); print('name', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'NO GPU'); \
print('cap', torch.cuda.get_device_capability(0) if torch.cuda.is_available() else None)"

You should see something like:

torch 2.9.0.dev20xx+cu128 cuda 12.8
avail True
name NVIDIA GeForce RTX 5090
cap (12, 0)
  1. Launch WebUI with a simple webui-user.bat (no extra Torch commands, no skip‑cuda‑test):
set COMMANDLINE_ARGS=--opt-sdp-attention
call webui.bat

If the UI shows steps running ~20–30 it/s and no “CUDA not enabled” errors, you’re good.


My Environment (when it failed & then worked)

  • Windows
  • GPU: NVIDIA GeForce RTX 5090
  • Python: 3.10.11 (64‑bit)
  • WebUI: v1.10.1 (82a973c0...)
  • Venv: E:\Automatic111\sd-venv312
  • Final working Torch/TV:
    • torch 2.9.0.dev...+cu128
    • torchvision 0.24.0.dev...+cu128
    • CUDA runtime reported by Torch: 12.8

Note: cu124 (CUDA 12.4) does not include sm_120 for RTX 50‑series, so those wheels either warn about unsupported capability or fall back to CPU. Nightly cu128 wheels do include sm_120 support.


The Errors I Saw

1) CPU build or CUDA disabled

From WebUI and terminal:

AssertionError: Torch not compiled with CUDA enabled
Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS ...

and

torch 2.8.0+cpu cuda None is_available False

2) Older CUDA (12.4) wheels on a 5090

UserWarning:
NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 ... sm_90.

This means those wheels don’t include sm_120, so the 5090 won’t be used.


Root Cause (Why it Broke)

  • I had CPU‑only or older CUDA (cu124) Torch/TV wheels installed.
  • RTX 5090 requires sm_120 support, which currently ships in nightly CUDA 12.8 wheels (cu128).
  • WebUI’s auto‑install / custom index settings can sometimes pull the wrong wheels (CPU or older CUDA).

The Full Fix (Step by Step)

Paths below are mine; adjust for your setup.

0) Open a fresh terminal and activate the correct venv

call E:\Automatic111\sd-venv312\Scripts\activate

Confirm you’re in the venv:

python -c "import sys; print(sys.executable)"

Expected:

E:\Automatic111\sd-venv312\Scripts\python.exe

1) Remove bad installs and cache

pip uninstall -y torch torchvision torchaudio xformers
pip cache purge

2) Install nightly cu128 wheels (have sm_120 for 50‑series)

pip install --no-cache-dir --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128

3) Sanity‑check GPU from Python

python -c "import torch,torchvision; print('torch',torch.__version__); print('torchvision',torchvision.__version__); \
print('cuda?',torch.cuda.is_available()); print('cuda runtime',getattr(torch.version,'cuda',None)); \
print(torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'NO GPU'); \
print('cap', torch.cuda.get_device_capability(0) if torch.cuda.is_available() else None)"

I got:

torch 2.9.0.dev...+cu128
torchvision 0.24.0.dev...+cu128
cuda? True
cuda runtime 12.8
NVIDIA GeForce RTX 5090
cap (12, 0)

4) Keep WebUI from re‑installing the wrong Torch

Use a minimal webui-user.bat. Mine looks like this:

@echo off
rem --- Use the venv that already has the correct Torch installed ---
set PYTHON=E:\Automatic111\sd-venv312\Scripts\python.exe
set VENV_DIR=E:\Automatic111\sd-venv312

rem --- Do NOT force torch installs here ---
set TORCH_COMMAND=

rem --- Clean, safe args (no skip-cuda-test needed) ---
set COMMANDLINE_ARGS=--opt-sdp-attention

rem --- Nuke any custom pip index URLs that could fetch CPU/old wheels ---
set TORCH_INDEX_URL=
set PIP_INDEX_URL=
set PIP_EXTRA_INDEX_URL=

call webui.bat

If you must install through WebUI, set TORCH_COMMAND to the nightly cu128 line:

set TORCH_COMMAND=pip install --no-cache-dir --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128

But I prefer keeping it empty once I’ve installed the right wheels in the venv.

5) Launch and confirm it’s using the GPU

On launch I see:

Applying attention optimization: sdp... done.
Model loaded in 3.1s ...
20/20 [00:00<00:00, 21–27 it/s]

That iteration speed is GPU‑level. No more CUDA errors.


What Didn’t Work (and Why)

  • cu124 wheels (Torch 2.6.0+cu124, TV 0.21.0+cu124) → missing sm_120, so 5090 prints warnings and/or falls back to CPU.
  • CPU wheels (torch 2.8.0+cpu)torch.cuda.is_available() is False and WebUI throws “not compiled with CUDA”.
  • Adding --skip-torch-cuda-test → just hides the problem; it doesn’t enable GPU.

Optional Notes

  • xFormers is optional. With modern GPUs, PyTorch SDPA (--opt-sdp-attention) is fast and stable.
  • The TF32 warning from PyTorch 2.9 is harmless; it’s just a heads‑up about a future API change.
  • If you ever slip back to CPU, rerun the uninstall + purge + cu128 install steps above.

Log Snippets (for searchability)

Failure (CPU / no CUDA):

AssertionError: Torch not compiled with CUDA enabled
Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
torch 2.8.0+cpu cuda None is_available False

Failure (old CUDA 12.4 on 5090):

UserWarning:
NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90.

Success:

torch 2.9.0.dev...+cu128 cuda 12.8
avail True
name NVIDIA GeForce RTX 5090
cap (12, 0)

Applying attention optimization: sdp... done.
... 20/20 [00:00<00:00, 21–27 it/s]

Credit / Context

This write‑up is distilled from a live troubleshooting session.
If it helps you, consider replying with your exact GPU / driver / Torch versions so others can compare.

hassan09814 avatar Sep 07 '25 07:09 hassan09814