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

Torch 2.4 error (Your device does not support the current version of Torch; 4080 Super). So which devices DO support Torch 2.4?

Open aoleg opened this issue 1 year ago • 34 comments

Fresh install from https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/download/latest/webui_forge_cu124_torch24.7z updated to latest commit 86ee2d9462cc3baf8618430513e2fc0b6e4cabff. Unable to run with "Your device does not support the current version of Torch/CUDA" error.

Using RTX 4080 Super, Windows 11, latest GeForce drivers, CUDA 12.4 installed from https://developer.nvidia.com/cuda-12-4-0-download-archive

If Torch 2.4 is not supported on this hardware, which devices does it support then? Or am I missing something? (Yes, I can probably roll back to https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/download/latest/webui_forge_cu121_torch21.7z, but I'd like to use the latest version of Torch).

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: f2.0.1v1.10.1-previous-223-g86ee2d94 Commit hash: 86ee2d9462cc3baf8618430513e2fc0b6e4cabff Traceback (most recent call last): File "C:\stable-diffusion\forge124\webui\launch.py", line 51, in main() File "C:\stable-diffusion\forge124\webui\launch.py", line 39, in main prepare_environment() File "C:\stable-diffusion\forge124\webui\modules\launch_utils.py", line 434, in prepare_environment raise RuntimeError( RuntimeError: Your device does not support the current version of Torch/CUDA! Consider download another version: https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/tag/latest Press any key to continue . . .

aoleg avatar Aug 11 '24 10:08 aoleg

Same here, rtx 3060

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: f2.0.1v1.10.1-previous-223-g86ee2d94 Commit hash: 86ee2d9462cc3baf8618430513e2fc0b6e4cabff Traceback (most recent call last): File "C:\webuiForgeNew\webui\launch.py", line 51, in main() File "C:\webuiForgeNew\webui\launch.py", line 39, in main prepare_environment() File "C:\webuiForgeNew\webui\modules\launch_utils.py", line 434, in prepare_environment raise RuntimeError( RuntimeError: Your device does not support the current version of Torch/CUDA! Consider download another version: https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/tag/latest Pressione qualquer tecla para continuar. . .

Ezgons123 avatar Aug 11 '24 10:08 Ezgons123

My RTX 2080 works fine, that’s weird. CUDA 12.4 do support RTX series I think. I log my configuration in this issue: #987 Not sure if the problem was from the "CUDA" in the prebuilt package.

pycms-nube avatar Aug 11 '24 10:08 pycms-nube

Your device of course does support Torch 2.4 & CUDA 12.4. The issue is that there is a missing dependency with Windows. (see pytorch/pytorch#131662)

Basically, you need to install the latest MSVC build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe). The specific component you need is MSVC v143 - VS 2022 C++ x64/x86 builds tools (latest). You can try running the command in the linked issue, but I personally think its easier to run the buildTools.exe and select the individual component:

image

Once that is done, just reboot your PC and you should be good to go.

@lllyasviel - perhaps a note for this could be added to readme?

MisterChief95 avatar Aug 11 '24 10:08 MisterChief95

Many thanks, that worked! I did have MS build tools installed, yet missing this particular component.

aoleg avatar Aug 11 '24 11:08 aoleg

Your device of course does support Torch 2.4 & CUDA 12.4. The issue is that there is a missing dependency with Windows. (see pytorch/pytorch#131662)

Basically, you need to install the latest MSVC build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe). The specific component you need is MSVC v143 - VS 2022 C++ x64/x86 builds tools (latest). You can try running the command in the linked issue, but I personally think its easier to run the buildTools.exe and select the individual component:

image

Once that is done, just reboot your PC and you should be good to go.

@lllyasviel - perhaps a note for this could be added to readme?

Just to ask but i've got a 2060 super and apparently I can run upto CUDA 12.2

Would this be enough to run the latest version if I go through the BuildTools guide?

warrockmill avatar Aug 11 '24 11:08 warrockmill

Your device of course does support Torch 2.4 & CUDA 12.4. The issue is that there is a missing dependency with Windows. (see pytorch/pytorch#131662)

Basically, you need to install the latest MSVC build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe). The specific component you need is MSVC v143 - VS 2022 C++ x64/x86 builds tools (latest). You can try running the command in the linked issue, but I personally think its easier to run the buildTools.exe and select the individual component:

image

Once that is done, just reboot your PC and you should be good to go.

@lllyasviel - perhaps a note for this could be added to readme?

Thanks, it worked!

Ezgons123 avatar Aug 11 '24 11:08 Ezgons123

I also faced the same issue when trying to run the preinstalled package. Even installing Visual Studio didn't help. What did work, however, was installing forge via the old git clone method. I remember I faced the same issue few months ago too when I installed forge via the same pre-installed package but using the git pull method worked flawlessly (Maybe it has something to do with windows 11, I don't know). Now it is working perfectly with cu12.4. Also, if someone doesn't want to re-download python packages they can just re-use the packages from the installation zip by copying the site-packages folder from the zip into webui/venv/Lib directory.

Necro-mancer avatar Aug 11 '24 13:08 Necro-mancer

Will torch2.4 bring more performance changes?

alex13by avatar Aug 11 '24 14:08 alex13by

I'm getting this error too and nobody gives a shit

wktra avatar Aug 13 '24 00:08 wktra

I'm getting this error too and nobody gives a shit

the fix is literally posted in this thread.....looks like you didnt even bother to read.

zethfoxster avatar Aug 13 '24 01:08 zethfoxster

I'm getting this error too and nobody gives a shit

the fix is literally posted in this thread.....looks like you didnt even bother to read.

I read and I tried all of the "solutions" installing MS Build tools didn't work. Neither did reinstalling CUDA or putting a finger up your mom's butthole.

What did work just now was clicking on the "webui-user.bat" and NOT clicking on the RUN.BAT as suggested for people who used the zipped archive.

wktra avatar Aug 13 '24 01:08 wktra

**What did work just now was clicking on the "webui-user.bat"

Same way

kutchek avatar Aug 14 '24 04:08 kutchek

I got the same error after updating to CUDA 12.4. The solutions above didn't work for me. In my case, the fix was to ensure that the Torch version being used was installed with CUDA 12.4 support. My Forge was configured to point to and make use of my old A1111 environment which was in a different folder, and that used a venv. So I went to the venv/scripts folder of that installation and ran "python" and in the python command line ran the following:

import torch
print(torch.version.cuda)

This showed that the CUDA version was none in my case. So I uninstalled torch. I think I used pip uninstall torch but can't remember for sure. I reinstalled with: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 (your install command may be different but you can get it from here: https://pytorch.org/get-started/locally/)

Forge worked fine after that. I am running a RTX 4060 8GB mobile on Windows (Intel)

sd321ca avatar Aug 14 '24 12:08 sd321ca

不知道你是不是用了花儿大佬的一键启动器,在高级设置里找到安全性设置,关掉就好了

martjay avatar Aug 16 '24 14:08 martjay

Your device of course does support Torch 2.4 & CUDA 12.4. The issue is that there is a missing dependency with Windows. (see pytorch/pytorch#131662)

Basically, you need to install the latest MSVC build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe). The specific component you need is MSVC v143 - VS 2022 C++ x64/x86 builds tools (latest). You can try running the command in the linked issue, but I personally think its easier to run the buildTools.exe and select the individual component:

image

Once that is done, just reboot your PC and you should be good to go.

@lllyasviel - perhaps a note for this could be added to readme?

Im trying to help someone installing forge but he ran into the same problem. we try the build box solution but it did not work. What else can we do?

charlumau avatar Aug 23 '24 02:08 charlumau

The only way I can run Forge on a remote computer with an A6000 GPU is by using the following command:

pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 xformers --index-url https://download.pytorch.org/whl/cu118

Otherwise, I get the error message mentioned above. Version 1.21 doesn’t work. It’s a remote machine running Linux.

LilithDragoness avatar Aug 30 '24 09:08 LilithDragoness

I'm getting this error too and nobody gives a shit

the fix is literally posted in this thread.....looks like you didnt even bother to read.

I read and I tried all of the "solutions" installing MS Build tools didn't work. Neither did reinstalling CUDA or putting a finger up your mom's butthole.

What did work just now was clicking on the "webui-user.bat" and NOT clicking on the RUN.BAT as suggested for people who used the zipped archive.

LOL you're obviously a smooth brain clown, as of the moment you completed the suggested steps in this thread, using the RUN or the webui-user.bat would BOTH have worked. its ok, not everyone can be adept in simple one-click set ups LOL

zethfoxster avatar Aug 31 '24 00:08 zethfoxster

Just found this post from a Google search, I installed forge, changed the web ui to share SD models and worked for 4 hours. on a reboot, got the error:

venv "C:\Users\jessi\Desktop\Forge\webui\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: f2.0.1v1.10.1-previous-224-g90019688 Commit hash: 9001968 Traceback (most recent call last): File "C:\Users\jessi\Desktop\Forge\webui\launch.py", line 51, in main() File "C:\Users\jessi\Desktop\Forge\webui\launch.py", line 39, in main prepare_environment() File "C:\Users\jessi\Desktop\Forge\webui\modules\launch_utils.py", line 434, in prepare_environment raise RuntimeError( RuntimeError: Your device does not support the current version of Torch/CUDA! Consider download another version: https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/tag/latest

done as requested above, was even a update from 17.11.1 to 17.11.2

rebooting now to see if works

lgwjames avatar Sep 01 '24 06:09 lgwjames

I am seeing this same error locally on Kubuntu with an RTX 2060 Super.

Previously i had forge working fine with this machine on Windows. Though that was likely a version from around April.

lawlessc avatar Sep 04 '24 21:09 lawlessc

更新到 CUDA 12.4 后,我遇到了同样的错误。上述解决方案对我不起作用。就我而言,解决方法是确保使用的 Torch 版本安装了 CUDA 12.4 支持。我的 Forge 配置为指向并使用我的旧 A1111 环境,该环境位于不同的文件夹中,并使用了 venv。因此,我转到该安装的 venv/scripts 文件夹并运行“python”,然后在 python 命令行中运行以下命令:

import torch
print(torch.version.cuda)

这表明我的 CUDA 版本为空。 所以我卸载了 torch。我想我用过,pip uninstall torch但记不清了。 我重新安装了:( pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 您的安装命令可能不同,但您可以从这里获取:https://pytorch.org/get-started/locally/)

此后 Forge 运行良好。 我在 Windows (Intel) 上运行 RTX 4060 8GB 移动设备

试了一下,我的问题和你的一样,我试了同样的方式得到了解决

future2017 avatar Sep 06 '24 11:09 future2017

Your device of course does support Torch 2.4 & CUDA 12.4. The issue is that there is a missing dependency with Windows. (see pytorch/pytorch#131662)

Basically, you need to install the latest MSVC build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe). The specific component you need is MSVC v143 - VS 2022 C++ x64/x86 builds tools (latest). You can try running the command in the linked issue, but I personally think its easier to run the buildTools.exe and select the individual component:

image

Once that is done, just reboot your PC and you should be good to go.

@lllyasviel - perhaps a note for this could be added to readme?

Is there a specific place the build tools need to go or are they supposed to fix the problem from their default installation? I installed the latest build tool as advised, restarted my computer, and tried to relaunch ForgeUI, but I encountered the same error as mentioned in the original post.

Did an update break something? ForgeUI was working just fine until yesterday, and I didn't change or touch anything besides update.bat.

Alicyl avatar Sep 16 '24 15:09 Alicyl

I have the same error what you have done did script install CUDA 12.6 Your device does not support the current version of Torch. Can you not push fault patches to the people ?

Zati1980 avatar Sep 16 '24 19:09 Zati1980

I am getting the same thing. I have a 4080 Super as well.

What I have tried:

  1. Checked build tools is installed. It is.
  2. Uninstalled build tools.
  3. Restarted computer.
  4. Installed build tools.
  5. Restarted computer.
  6. Attempted to run; error.

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] Version: f2.0.1v1.10.1-previous-535-gb20cb4bf Commit hash: b20cb4bf0e526f890fcd40a4d039da581cfebafa Traceback (most recent call last): File "C:\_AI\webui_forge_cu121_torch21\webui\launch.py", line 54, in <module> main() File "C:\_AI\webui_forge_cu121_torch21\webui\launch.py", line 42, in main prepare_environment() File "C:\_AI\webui_forge_cu121_torch21\webui\modules\launch_utils.py", line 434, in prepare_environment raise RuntimeError( RuntimeError: Your device does not support the current version of Torch/CUDA! Consider download another version: https://github.com/lllyasviel/stable-diffusion-webui-forge/releases/tag/latest

At this point I have attempted all pre-baked archive installers.

NVCC: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Wed_Feb__8_05:53:42_Coordinated_Universal_Time_2023 Cuda compilation tools, release 12.1, V12.1.66 Build cuda_12.1.r12.1/compiler.32415258_0

There are no updates for CUDA 12.1 at the moment that I can run. I could only try downgrading it.

I'll go and try the old install method. But I'd love to know if anyone else has any ideas on this.

SilverSeed93 avatar Sep 20 '24 05:09 SilverSeed93

FYI I solved this problem for myself by pre-creating a python env and preinstalling torch before launching for the first time.

cd D:_AI\forgeui python -m venv venv venv\scripts\activate pip install torch==2.3.1+cu121 torchaudio==2.3.1+cu121 --index-url https://download.pytorch.org/whl/cu121 webui-user.bat

SilverSeed93 avatar Sep 22 '24 04:09 SilverSeed93

None of these work at all. Is the 3050Ti unsupported?

Chonkblonk avatar Jan 02 '25 16:01 Chonkblonk

As simple as it sounds, I was having the same issue. I simply opened the run.bat with Run as Administrator and it worked. Dunno if that'll help anyone else but it worked for me. ¯_(ツ)_/¯

Bubblegum-Boy avatar Jan 17 '25 13:01 Bubblegum-Boy

I have the same error what you have done did script install CUDA 12.6 Your device does not support the current version of Torch. Can you not push fault patches to the people ?

Did an update break something? ForgeUI was working just fine until yesterday, and I didn't change or touch anything besides update.bat.

Same. I just ran update.bat and that was a huge mistake now my sdwebui is jacked up and doesn't load anymore. I ran webui-user as some other have suggestioned and it's acting like this is a new install that has never had Python or WebUI before. It's unistalling and installing a plethora of stuff that seems very unnecessary given it was just working 10 minutes ago.

MNLierman avatar Jan 22 '25 00:01 MNLierman

Image Все советы не помогли(

denvercry11 avatar Jan 27 '25 08:01 denvercry11

  1. i got this suddenly when i decided to install extensions manually, because of install by url website option took extreme long to downloaod just for 3 mb extension however. my perfectly working stable diffusion now is giving the same error.
  2. i tried all the fixes mentioned above
  3. i tried to get all extension out of the folder and it didnt worked.
  4. any ideas about this?

linuarM avatar Jan 30 '25 07:01 linuarM

Getting this as well. Was working yesterday and not it's not. tried everything mentioned here, no luck.

EDIT: In my case, it seems unattended-upgrades installed a newer version of the nvidia driver which broke things. so on linux anyway, I disabled unattended upgrades and reinstalled the older driver and things see good now.

bboyles303 avatar Jan 30 '25 15:01 bboyles303