PLEASE tell me how to UPDATE Torch correctly #10480
Replies: 12 comments 9 replies
-
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings |
Beta Was this translation helpful? Give feedback.
-
I tried this: but it seems still 1.13,1... |
Beta Was this translation helpful? Give feedback.
-
This has worked for me without issues, on Windows, with Python 3.10.11. Open CMD or Terminal inside your stable-diffusion-webui folder then type
|
Beta Was this translation helpful? Give feedback.
-
pip3 uninstall --y torch torchvision torchaudio clean-fid xformers |
Beta Was this translation helpful? Give feedback.
-
+1, there's minimal context for the CLI saying to append an arg without telling us the prefix command. Why not just tell us the command itself instead of leaving folks to deep Google? EDIT: Same with xformers, uselessly telling us Even to an experienced developer, I'm thinking "the commandline flag to what and where"? |
Beta Was this translation helpful? Give feedback.
-
Commandline to update pytorch to version >2.0 : |
Beta Was this translation helpful? Give feedback.
-
The question is, why wouldn't we show this friendly instruction to the end-users to explicitly teach them how? |
Beta Was this translation helpful? Give feedback.
-
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 -------- I have tried to run this for many times but... the version is still not updated to the right one. it just says a lot of "Requirement already satisfied xxxxxx", and nothing really installed on my computer, I think. PLS HELP! |
Beta Was this translation helpful? Give feedback.
-
None of the answeres here helped me at all untill I found this simple explanation at reddit: Reddit Thanks to that nice guy. What I had to do: |
Beta Was this translation helpful? Give feedback.
-
This is an utter mess. I want to provide how I updated to Python 3.10.11 to use PyTorch 2.1.12 with the newest xformers. This applies to Windows 11 64-bit. 1). Renamed my current Python directory (which was C:\Python310.6) to _Python310.6 4). OPEN A NEW CMD PROMPT FOR THE ABOVE TO TAKE EFFECT =D 5). Follow https://www.geeksforgeeks.org/how-to-install-pip-on-windows/ to install pip to your new Python install... 6). git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git (if you must, make a new folder so there are no conflicts). 7). ran webui-user.bat inside of stable-diffusion-webui to make sure everything loads. terminated the cmd prompt Window after. 8). modified webui-user.bat to set COMMANDLINE_ARGS=--xformers ( slight admission, maybe it was --reinstall-xformers) .. if one doesn't work, adjust.. sorry, it's late and I'm tired =) 9). re-ran webui-user.bat - it installs the new xformers that works with PyTorch 2.1.2+cu121 10). deleted the folders stable-diffusion-webui\models\Stable-diffusion, LORA, VAE, VAE-approx... c: be sure and do the same if you have a lot of embeddings and ESRGAN. if you have tons of HD space and a fast system, great - just copy the stuff if you like. The sd.webui.zip appears to still use Python 3.10.6 (if I am wrong, sorry!) .. I got sick and tired of this, so did everything manually. Problems solved. Yes this is overkill, but it works fine for me. Maybe this will help someone. Please do not blindly copy and paste stuff without reading, re-reading and thinking (into cmd.exe, etc..) - if you delete your a,b, or c from not paying attention, this is not my fault. |
Beta Was this translation helpful? Give feedback.
-
Maybe the confusion is about how to install/update in the right place (python, torch, cuda, etc.):
When you go for |
Beta Was this translation helpful? Give feedback.
-
For anyone on a Mac M1, M2, M3... 1.) The following Terminal command will activate your venv environment:
Notice the "(venv)" designation before your username in your Terminal window. 2.) Next, install the compatible version of PyTorch (aka "torch"):
If installed successfully, you'll get the following message: "Successfully installed torch-2.1.2 torchaudio-2.1.2 torchvision-0.16.2" (Note: When you close your current Terminal window it will automatically deactivate your venv.) The next time you launch a1111, the following message should be gone: "You are running torch 2.0.0. (or whatever earlier version you were running) Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
After updated, it says that:
You are running torch 1.13.1+cu117.
The program is tested to work with torch 2.0.0.
To reinstall the desired version, run with commandline flag --reinstall-torch.
I don't know much about coding.
PLEASE tell me how I can UPDATE my Torch correctly...
Where to type, what to type...
Waiting for reply. THX!
Beta Was this translation helpful? Give feedback.
All reactions