facebookresearch / facebookresearch/sam3
ValueError when running sam3_image_interactive.ipynb
Open
- Dominant language
- Python
- Stars
- 11.7k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
### Bug Description
When running the `sam3_image_interactive.ipynb` notebook step-by-step, the model throws a `ValueError: Expected grad to be disabled` during the inference/activation step.
I was able to run it by changing `torch.inference_mode().__enter__()` to `torch.set_grad_enabled(False)` but I wanted to flag this in case someone else encounters it too or if someone can help me understand why that happened.
Contributor guide
Assessment
This issue has not been assessed yet.