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.
Bug Description
When running the
sam3_image_interactive.ipynbnotebook step-by-step, the model throws aValueError: Expected grad to be disabledduring the inference/activation step.I was able to run it by changing
torch.inference_mode().__enter__()totorch.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.