stable-diffusion-webui-forge
stable-diffusion-webui-forge copied to clipboard
Run with RTX50xx
anyone ever tried torch-2.6.0+cu128.nv in forge? is it Ok to run?
yeah, my 5070Ti seem work fine.
I had problems with the 5090 in Forge so im using AUTOMATIC 1111's 50xx blackwell version for now
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
this solution work for me
interesting, ill try that out. thank you
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?
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.
same 5090
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.
- Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
- 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
- Since Blackwell GPUs (
sm_120architecture) 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)
- Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
- 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
- Finally, run the project
python .\launch.py
Hope it helps!
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 Repositorygit clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git2. Navigate into the cloned directory, then create a new virtual environment with Python 3.10.xC:\PATH_TO_YOUR_PYTHON_3_10_INSTALLATION\python.exe -m venv venvMake sure Python 3.10 is installed, newer versions are not compatible
Activate it
.\venv\Scripts\activateAnd update pip
python -m pip install --upgrade pip3. Since Blackwell GPUs (`sm_120` architecture) need CUDA 12.8, install a version of PyTorch that supports itpip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128You 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 automaticallypip install insightface5. Install Project Requirementspip install --prefer-binary -r .\requirements_versions.txtUse the provided
requirements_versions.txtfile, preferring binary installations for speed and compatibility6. Finally, run the projectpython .\launch.pyHope it helps!
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.
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.
- Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
- 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
- Since Blackwell GPUs (
sm_120architecture) need CUDA 12.8, install a version of PyTorch that supports itpip3 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)
- Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
- 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
- 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.
- Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
- 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
- Since Blackwell GPUs (
sm_120architecture) need CUDA 12.8, install a version of PyTorch that supports itpip3 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)
- Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
- 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
- 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>
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.
- Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
- 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
- Since Blackwell GPUs (
sm_120architecture) need CUDA 12.8, install a version of PyTorch that supports itpip3 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)
- Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
- 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
- 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.
- Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
- 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
- Since Blackwell GPUs (
sm_120architecture) need CUDA 12.8, install a version of PyTorch that supports itpip3 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)
- Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
- 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
- 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>
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.
- Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
- 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
- Since Blackwell GPUs (
sm_120architecture) need CUDA 12.8, install a version of PyTorch that supports itpip3 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)
- Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
- 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
- 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.
- Clone the Repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git
- 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
- Since Blackwell GPUs (
sm_120architecture) need CUDA 12.8, install a version of PyTorch that supports itpip3 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)
- Install InsightFace. This dependency, for some reason, doesn’t install automatically
pip install insightface
- 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
- 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>
I can't get xformers to work with this one. Is there a specific method that needs to be used?
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!
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)
I got it to work with RTX5080 using this Docker setup
I got it to work with RTX5080 using this Docker setup
Please! Can you explain how you set it up step by step?
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.
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 😁
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.
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)
- Activate your WebUI venv (mine is
E:\Automatic111\sd-venv312):
E:\Automatic111\stable-diffusion-webui> call E:\Automatic111\sd-venv312\Scripts\activate
- Clean old Torch installs & cache:
pip uninstall -y torch torchvision torchaudio xformers
pip cache purge
- 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
- 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)
- 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...+cu128torchvision 0.24.0.dev...+cu128- CUDA runtime reported by Torch: 12.8
Note: cu124 (CUDA 12.4) does not include
sm_120for RTX 50‑series, so those wheels either warn about unsupported capability or fall back to CPU. Nightly cu128 wheels do includesm_120support.
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_COMMANDto the nightly cu128 line:set TORCH_COMMAND=pip install --no-cache-dir --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu128But 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()isFalseand 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.