facebookresearch / facebookresearch/segment-anything

RuntimeError: nonzero is not supported for tensors with more than INT_MAX elements, file a support request

Open
#427 6 comments 3 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
54.9k
Forks
6.4k
PR merge metrics
No merged PRs in 30d

Description

I got this error at this line `masks = mask_generator.generate(image)`. What caused the error?

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `mask_generator.generate(image)` call in the notebook or script that reports the error. Inspect the input image and generated tensor sizes, then compare them with the Segment Anything inference examples. Done means identifying the input or configuration that triggers the limit and documenting a confirmed cause or workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
computer-vision
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.