Skip to content

local-inference does not declare torchvision, so SAM 2 checkpoints cannot be loaded from a clean install #457

Description

@JArmandoAnaya

local-inference declares torch, transformers, accelerate and
huggingface-hub. None of those depends on torchvision, so a clean
pip install "visionset[local-inference]" does not have it.

SAM 2's image processor does. AutoProcessor.from_pretrained on a SAM 2 checkpoint
raises before a forward pass is attempted:

ImportError:
Sam2ImageProcessor requires the Torchvision library but it was not found in your
environment. Check out the instructions on the installation page:
https://pytorch.org/get-started/locally/ and follow the ones that match your
environment.

Observed 2026-08-08 in an environment carrying the extra exactly as declared
(torch 2.13.0+cu130, transformers 5.14.1), against a ready local connection for
facebook/sam2-hiera-base-plus with its weights in the workspace cache.

Why it matters

The model id the connection form suggests is a SAM 2 checkpoint, so the path a user
is steered onto is the one that cannot run. The refusal is honest and comes from
transformers rather than from anything in this repository, which is why it is a
dependency defect rather than an adapter one — but a user following the product's own
suggestion reaches it.

The detector adapter is unaffected: the grounding-dino processors do not need
torchvision.

What it needs

torchvision declared in the local-inference extra, with a floor chosen the way the
others were, and the lock regenerated.

Found while fixing #456; not fixed there, whose scope was the resolver and its error
message. cf. #456, #418

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendvisionset Python distribution — kernel, server, cli, mcp, formatsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions