Skip to content

fix: pin torchvision to the cu126 index so the vision extra imports - #27

Merged
rasros merged 1 commit into
mainfrom
fix-torchvision-cu126-index
Aug 7, 2026
Merged

fix: pin torchvision to the cu126 index so the vision extra imports#27
rasros merged 1 commit into
mainfrom
fix-torchvision-cu126-index

Conversation

@rasros

@rasros rasros commented Aug 7, 2026

Copy link
Copy Markdown
Owner

uv sync --extra vision resolved torchvision from PyPI while torch came from the pinned pytorch-cu126 index. The mismatched builds import fine individually but blow up when transformers touches torchvision ops:

RuntimeError: operator torchvision::nms does not exist

That surfaced as the vision scorer silently falling back to SimpleFallbackScorer under --scorer auto, since the AutoImageProcessor load failure is caught and downgraded.

Two changes:

  • Declare torchvision explicitly in the vision extra — it was only ever an implicit transitive need of the SigLIP image processor.
  • Pin it to pytorch-cu126 in [tool.uv.sources], matching torch.

Verified after the change: torch 2.13.0+cu126 | torchvision 0.28.0+cu126, SigLIP processor loads, and a run reports Using vision scorer instead of falling back.

@rasros
rasros merged commit 5f6819c into main Aug 7, 2026
1 check passed
@rasros
rasros deleted the fix-torchvision-cu126-index branch August 8, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant