-
Notifications
You must be signed in to change notification settings - Fork 25.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update torch and other dependencies to make it work on 24.04 #15716
base: dev
Are you sure you want to change the base?
Update torch and other dependencies to make it work on 24.04 #15716
Conversation
4ac789f
to
60031e2
Compare
60031e2
to
8f8ea14
Compare
you forgot AMD changes |
I tried this out on amdgpu on arch linux and it worked fine actually 👍 |
@HinaHyugaHime what do you mean by amd changes? I would be glad to provide them. |
Torch version |
CLIPTextModel_from_pretrained change should not be there. This code is to prevent loading CLIP model from the web as its weights are already included into the checkpoint, and removing None disables that. As for the rest, I'm generally against updating versions without an explicit need for it... Does this all work on Windows with recommended python 3.10.6? |
@janbernloehr I finally fixed Torch hell for MacOS with this PR, so please do not modify Have you tried just to change python and torch in Something like:
If that works I have another suggestion.
@AUTOMATIC1111 If what I proposed above works, I would suggest similar approach as we have for MacOS. Something like:
I am not sure what some_other_check should be. Something like |
@janbernloehr I managed to run A1111 with 3.12 on my Mac with just a few minor changes. I only have Ubuntu 20.04.6 (on a server without GPU) so I can't test if this work on 24.x with Nvidia. I only changed this: webui-user sh # python3 executable
- #python_cmd="python3"
+ python_cmd="python3.12"
# install command for torch
- #export TORCH_COMMAND="pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
+ export TORCH_COMMAND="pip install torch==2.3.0 torchvision==0.18.0" requirements_versions.txt - transformers==4.30.2
+ transformers==4.41.2 I haven't changed requirements.txt, since it is for colab users. And I used Thats all. After I remove venv, on the first run I am always getting this error, even
But if I just rerun ./webui again it works 🤷🏻♂️ I am getting the error below every time, since I haven't replace
Otherwise it works fine as far as I can tell. @AUTOMATIC1111 If you don't mind, I will reopen #13667 with a steps to reproduce and a note that I noticed that problem only with 3.12 and not with 3.10. @janbernloehr that is the reason I am not using the Slow method works just fine:
All test passed:
and basic generation works fine (I just did some basic tests):
|
@viking1304 : thanks for your input - indeed this is very minimal changes! My intention of this PR was to fix all the weird things too so that’s why I in the end updated a lot more deps. But I see that this might cause some unforeseen problems for some users. |
EDIT:
from https://github.com/pytorch/pytorch/releases/tag/v2.3.0 So, it would be better to find another solution instead of trying to make a1111 run on Python 3.12 since PyTorch, which is the most important package, does not work with 3.12 properly. Can you please try this?
|
Description
Ubuntu 24.04 comes with python 3.12 and a newer rustc. This requires to update torch to 2.2+ which is available for py3.12 and also transformers to 4.34+ since only then tokenizers is new enough to build with the provided rustc.
Screenshots/videos:
Checklist: