ci: keep pins.json in sync with pyproject.toml; cap torch <2.12#9351
Open
lstein wants to merge 3 commits into
Open
ci: keep pins.json in sync with pyproject.toml; cap torch <2.12#9351lstein wants to merge 3 commits into
lstein wants to merge 3 commits into
Conversation
pins.json is consumed only by the Invoke Launcher (fetched at the release tag) to pick the torch wheel index for legacy installs. Nothing in-repo references it, so it silently drifted from pyproject.toml: its Linux ROCm index stayed at rocm6.3 after the torch-rocm index moved to rocm7.1, causing the launcher to install ROCm 6.3 wheels (invoke-ai#9328, launcher#131). - Add scripts/check_pins.py, which fails if any torchIndexUrl entry in pins.json differs from the matching [[tool.uv.index]] URL in pyproject.toml. - Run it from the uv-lock-checks workflow, triggered by changes to any of pyproject.toml, uv.lock, pins.json, or the check script. - Bump pins.json rocm index to rocm7.1 (matches invoke-ai#9337) so the check passes. - Bump the workflow's uv from 0.6.10 to 0.11.28: uv.lock is already lock format revision 3, which 0.6.x cannot parse. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
torch 2.12.x+rocm7.1 breaks generation (invoke-ai#9328; 2.11 works, and 2.10 is what the rocm extra pins). The cap only matters for legacy (pre-6.14) launcher installs, which resolve the base range live against the pytorch wheel indexes instead of using uv.lock — with the range open to <3.0, AMD users could land on the broken 2.12.x. Lockfile-based installs are unaffected: uv.lock stays at 2.7.1 / 2.10.0+rocm7.1 (no locked versions changed, only the recorded specifier). Remove the cap once the 2.12 ROCm incompatibility is diagnosed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
JPPhoto
requested changes
Jul 12, 2026
JPPhoto
left a comment
Collaborator
There was a problem hiding this comment.
invokeai/scripts/check_pins.py:32-43: The consistency check only validates entries that already exist inpins.json; it does not require every launcher-supported platform/backend entry to be present. RemovingtorchIndexUrl.linux.rocmstill printspins.json is consistent with pyproject.tomland exits 0. The launcher's schema (mainover in the launcher repo) permits backend keys to be absent, and its legacy install path only adds--indexwhen the selected entry exists. An omitted ROCm entry therefore silently falls back from the ROCm wheel index, causing AMD installations to resolve an unsuitable build or fail. This recreates the exact installation failure the new guardrail is intended to prevent. To expose this issue, add a test that removes each required CPU, CUDA, or ROCm entry in turn and asserts that the checker exits nonzero; the implementation should validate an explicit required platform/backend matrix, not merely iterate existing entries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The launcher installs InvokeAI's dependencies from two sources that nothing keeps in sync:
pins.json(fetched at the release tag, used for the torch index URL in legacy installs) andpyproject.toml/uv.lock.pins.jsondrifted — its Linux ROCm index stayed atrocm6.3afterpyproject.tomlmoved torocm7.1— so launcher installs on AMD got ROCm 6.3 wheels, which cannot work at all on RDNA4 cards (#9328). #9337 fixes the immediate URL; this PR adds the guardrail so it can't silently drift again, and caps torch below the version that breaks ROCm installs.Changes
scripts/check_pins.py: fails if anytorchIndexUrlentry inpins.jsondiffers from the matchingtorch-<backend>[[tool.uv.index]]URL inpyproject.toml.uv-lock-checksworkflow: runs the new check, triggered by changes topyproject.toml,uv.lock,pins.json, or the check script. Also bumps the workflow's uv from 0.6.10 to 0.11.28 —uv.lockis already lock-format revision 3, which uv 0.6.x cannot parse, so the old pin was stale.pins.json: ROCm index bumpedrocm6.3→rocm7.1. This is the same one-line change as fix: bump launcher ROCm torch index from rocm6.3 to rocm7.1 #9337 (needed here for the new check to pass); happy to rebase if that merges first.pyproject.toml+uv.lock: base torch constraint capped at<2.12on linux/windows. torch 2.12.x+rocm7.1 breaks generation ([bug]: Release 6.13.5rc1 not installing ROCm 7.1 as expected #9328; 2.11 works, and therocmextra pins 2.10.0). The cap only affects legacy (pre-6.14) launcher installs, which resolve this range live against the pytorch indexes instead of usinguv.lock— no locked versions changed (uv lock --lockedpasses; the lock diff is just the recorded specifier). Remove the cap once the 2.12 ROCm incompatibility is diagnosed.Caveat
Because the launcher fetches
pins.jsonat the release tag, none of this retroactively fixes already-tagged releases (e.g.v6.13.5.rc1carriesrocm6.3forever). It takes effect from the next tag onward.QA
python3 scripts/check_pins.pypasses on the fixed files; a negative test (rocm URL reverted) exits 1 with a message pointing at the exact mismatched entry.uv lock --lockedpasses after the constraint change; no package versions moved in the lock.Related: #9328, #9337, invoke-ai/launcher#131
🤖 Generated with Claude Code