-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Upgrade pytorch to 2.6, python to 3.12 #7847
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.
LGTM 👍
How do we regenerate |
We need to be careful about this change and its interaction w/ launcher. Though the launcher supports "pinning" versions of invoke to different versions of python, that information is hardcoded and we'll need to do a launcher release. I suspect attempting to install the version of Invoke that enforces python 3.12 without updating the launcher beforehand will result in errors. Maybe we should figure out how to make the launcher query PyPI to get the python version required by a package? |
we do still need to test how |
100% agreed, we'd need to enable the launcher to install different python versions
depends on whether we want to continue supporting <=3.11 ... but yes, the launcher could easily query pypi for this info:
we can also query for any particular release |
I believe the remaining failing |
a197b16
to
b728e18
Compare
Rebased on |
b728e18
to
2bdd3f2
Compare
I believe this PR is ready. At least, all CI is passing. We need to check on how it might interact with the launcher and existing installs. So I've marked it as draft to prevent a premature merge. |
…itate upgrading co-dependencies. we will use uv.lock to ensure reproducibility
…arently been removed
… when loading them In `ObjectSerializerDisk`, we use `torch.load` to load serialized objects from disk. With torch 2.6.0, torch defaults to `weights_only=True`. As a result, torch will raise when attempting to deserialize anything with an unrecognized class. For example, our `ConditioningFieldData` class is untrusted. When we load conditioning from disk, we will get a runtime error. Torch provides a method to add trusted classes to an allowlist. This change adds an arg to `ObjectSerializerDisk` to add a list of safe globals to the allowlist and uses it for both `ObjectSerializerDisk` instances. Note: My first attempt inferred the class from the generic type arg that `ObjectSerializerDisk` accepts, and added that to the allowlist. Unfortunately, this doesn't work. For example, `ConditioningFieldData` has a `conditionings` attribute that may be one some other untrusted classes representing model-specific conditioning data. So, even if we allowlist `ConditioningFieldData`, loading will fail when torch deserializes the `conditionings` attribute.
In pydantic/pydantic#10029, pydantic made an improvement to its generated JSON schemas (OpenAPI schemas). The previous and new generated schemas both meet the schema spec. When we parse the OpenAPI schema to generate node templates, we use some typeguard to narrow schema components from generic OpenAPI schema objects to a node field schema objects. The narrower node field schema objects contain extra data. For example, they contain a `field_kind` attribute that indicates it the field is an input field or output field. These extra attributes are not part of the OpenAPI spec (but the spec allows does allow for this extra data). This typeguard relied on a pydantic implementation detail. This was changed in the linked pydantic PR, which released with v2.9.0. With the change, our typeguard rejects input field schema objects, causing parsing to fail with errors/warnings like `Unhandled input property` in the JS console. In the UI, this causes many fields - mostly model fields - to not show up in the workflow editor. The fix for this is very simple - instead of relying on an implementation detail for the typeguard, we can check if the incoming schema object has any of our invoke-specific extra attributes. Specifically, we now look for the presence of the `field_kind` attribute on the incoming schema object. If it is present, we know we are dealing with an invocation input field and can parse it appropriately.
Ran `uv lock --upgrade-package pydantic`
Doing a dev build so I can test the launcher.
The launcher will query this file to get the pins needed for installation
48d5ce6
to
bea9d03
Compare
Superseded by #7873, which I needed to create as a branch on the origin repo to do testing of CI changes. I did quite a bit of extra work on it. |
Summary
timm
andcontrolnet-aux
pins to fix LLaVA model support #7846 - may need to rebase this PR if that one is merged firstuv
to manage itQA Instructions
Merge Plan
Checklist
What's New
copy (if doing a release after this PR)