-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Support Python 3.12 #6539
base: main
Are you sure you want to change the base?
Support Python 3.12 #6539
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I do not have a system with both 3.12 and a CUDA GPU, so I can't test this properly. It would be good to get testing on both CUDA and MPS systems.
I did however update the installer and its readme so that it will allow python 3.12.
Hello @lstein,
I have both
- rtx 4090
- Python 3.12
What should I be testing?
Lincoln Stein ***@***.***> schrieb am Di., 25. Juni 2024,
02:56:
… ***@***.**** commented on this pull request.
Unfortunately I do not have a system with both 3.12 and a CUDA GPU, so I
can't test this properly. It would be good to get testing on both CUDA and
MPS systems.
I did however update the installer and its readme so that it will allow
python 3.12.
—
Reply to this email directly, view it on GitHub
<#6539 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZNARBAPKKKB6LFPLC4ROLZJC52VAVCNFSM6AAAAABJZ2IZGCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMZXGA3DIOBXGE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@JamesClarke7283 @lstein
|
I followd "QA instructions" as above until the step:
|
Last i checked, some dependencies did not have versions supporting 3.12 as wheels are not build for the older versions. I will give it another try now... |
I was able to get the WebUI up by using these commands: export INVOKEAI_ROOT=~/invokeai
mkdir $INVOKEAI_ROOT
cd $INVOKEAI_ROOT
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e git+https://github.com/JamesClarke7283/InvokeAI#egg=InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu121
deactivate && source .venv/bin/activate
cd $INVOKEAI_ROOT/.venv/src/invokeai/invokeai/frontend/web
pnpm i
pnpm build
cd $INVOKEAI_ROOT
invokeai-web Manual dev build works! |
Think we need testing on MPS still - Discord might be a source of good recruits there |
I still have an issue:
|
@ebr @hipsterusername @blessedcoolant Can you approve the workflows to run please? I don't see any issues with the manual build, installer build i have not tested yet with it but at least if these pass i know its mostly sound and can proceed with further testing. |
@james Clark
My manual build fails with above error.
James Clarke ***@***.***> schrieb am Mo., 8. Juli 2024, 09:04:
… @ebr <https://github.com/ebr> @hipsterusername
<https://github.com/hipsterusername> @blessedcoolant
<https://github.com/blessedcoolant> Can you approve the workflows to run
please?
I don't see any issues with the manual build, installer build i have not
tested yet with it but at least if these pass i know its mostly sound.
—
Reply to this email directly, view it on GitHub
<#6539 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZNARBQ6VELTGLZIY7QPCLZLI2ZNAVCNFSM6AAAAABJZ2IZGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJTGE4TOMJTGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
We are pinning |
I tried |
another try with
complains about The full log mentioned in directory |
Two issues with the GH actions tests:
We'll need to point the actions at this branch and add 3.12 to the test matrix workflow. Not sure how to sequence things to make this work... Suppose we could change the python version reqs in |
Please merge this PR soon, Debian Testing's default Python is now 3.12 and 3.11 will get automatically uninstalled from users' machines when they next upgrade. |
Four days ago, the nvidia/cuda latest docker image was updated to default to python 3.12 as well, which immediately broke existing 3.10-based venv installations.
I could update manually on top of the current 4.25 but figure I can wait now that everything is running again. But yeah, I have a feeling this will become more of an issue pretty soon. Update-- I did have to rebuild patchmatch per a notice when running. Just had to import the -dev depencines and then import into python and it built and the notice went away. |
Thanks for the nudges all - we’ll get this in soon. |
@kent I object
Kent Keirsey ***@***.***> schrieb am Mi., 17. Juli 2024,
01:27:
… Thanks for the nudges all - we’ll get this in soon.
—
Reply to this email directly, view it on GitHub
<#6539 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZNARDXXNHPUC7CNWTY7XDZMWT4ZAVCNFSM6AAAAABJZ2IZGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZRHE3TSNBTGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I’m not proposing that we will merge it in without changes/fixing. Just that we recognize there are compelling reasons to evaluate how to solve any issues people will face and get moving to 3.12 This may not be a simple process. |
On review - Understanding that there are some emerging inconveniences that would make getting 3.12 migrated to, I think the rub here is going to be ensuring that all deep-down dependencies play well with it, and it will absorb a significant amount of time for regression testing and updating any language changes. This will happen - Eventually. But for the time being, we may rely on users to use some simple workarounds for the default python versions getting installed. E.g., installing 11. |
There's no pressing need to support 3.12 for the Invoke application itself. We don't gain anything meaningful. The main reasons to support 3.12 are the user-facing installation road bumps described in this issue. WorkaroundsUntil we get python 3.12 support in, there's a fairly straightforward and conventional workaround to get the installer to use python 3.11 on a system where python 3.12 is installed. Ensure python 3.11 is before python 3.12 in your
|
Thank you @hipsterusername and @psychedelicious As I commented here I do not have the option on manjaro to do an additional pyenv install of python 3.11: I am relying on fixing this pull request - additionally implementing a workaround for an additional 3.11 installation is fine with me, though. |
@leder11011 Hmm, I use pyenv to install on Ubuntu, have multiple versions installed. May be some other issue you are running into - pyenv definitely works in general. |
Docker image
Does it now do this? I'm running 4.2.5 successfully in the new "nvidia/cuda" container (24.04) (re-installed packages for updated 3.12 venv w/pip install per above), but it won't self-update to 4.2.6.post1 due to the <3.12 requirement on the update packages. |
@fat-tire I mean we probably need to update our docker do not use the latest image and instead use an image that provides 3.11. |
It is easily possible that the error lies between the keyboard and the seat as I am no proficient python developer - but shouldn't we investigate in the first place? |
Our image is based on ubuntu23.04 which ships with python3.11. python3.12 as default was introduced in 24.04, and we are not in a hurry to upgrade until we can support it, but it shouldn't be a complex change. doesn't need to be coupled with this PR. |
The error you got was: Maybe you need to install a devel package for python to get the shared libraries? Sorry, I'm not sure how to address this. |
Thank you! I will have a look.
psychedelicious ***@***.***> schrieb am Fr., 19. Juli 2024,
07:27:
… It is easily possible that the error lies between the keyboard and the
seat as I am no proficient python developer - but shouldn't we investigate
in the first place?
The error you got was:
/home/leder/invokeai/.venv/bin/python: error while loading shared
libraries: libpython3.11.so.1.0: cannot open shared object file: No such
file or directory
Maybe you need to install a devel package for python to get the shared
libraries? Sorry, I'm not sure how to address this.
—
Reply to this email directly, view it on GitHub
<#6539 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZNARAWFHPVI7LHZNZGS7TZNCPTVAVCNFSM6AAAAABJZ2IZGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZYGIZDEMBWHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Now I have an unhappy version mix of 3.11 and 3.12:
|
@JamesClarke7283 I'm unable to build this due to dependency issues - |
Ive resolved the conflicts. |
seems as if dependency pytorch will directly jump to python 3.13 support: |
Ubuntu 24.04.1 LTS is now out. This triggers existing Ubuntu 22.04 LTS systems to prompt an upgrade, and the default choice for a new LTS installation will be 24.04 (if it wasn't already). [as ebr pointed out earlier, this Ubuntu release uses Python 3.12. The 23.04 used by the docker image is seven months past its EOL now.] |
Got this to update from 4.2.7post1 to 4.2.9rc1 w/python3.12... First I edited: Then Downloaded the Flux.1 schnell quantized model, installed |
Feel free to work on this PR, i won't be maintaining it, just a FYI. |
Are you serious: works on my machine? |
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Summary
This PR updates the pinned dependencies in the pyproject.toml to support python3.12. this is a first draft.
If we are making use of asyncio in some capacity, it might improve performance a fair amount in some use cases, as a added bonus.
Related Issues / Discussions
Will likely fix #6214
Will also likely fix #5674 although, we may want to add scripts which update the pinned versions to the lowest version that x python version supports, as long as the version is equal to or greater than whats already in the dependencies.
QA Instructions
Merge Plan
Should be fairly simple to merge, as long as the tests pass, its mostly only the pyproject.toml that needs editing at the moment.
Checklist