Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/sam3_agent.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"torch.autocast(\"cuda\", dtype=torch.bfloat16).__enter__()\n",
"\n",
"# inference mode for the whole notebook. Disable if you need gradients\n",
"torch.inference_mode().__enter__()"
"_inference_mode = torch.inference_mode()\n",
"_inference_mode.__enter__()"
]
},
{
Expand Down
9 changes: 5 additions & 4 deletions examples/sam3_image_batched_inference.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -81,7 +81,8 @@
"torch.autocast(\"cuda\", dtype=torch.bfloat16).__enter__()\n",
"\n",
"# inference mode for the whole notebook. Disable if you need gradients\n",
"torch.inference_mode().__enter__()\n"
"_inference_mode = torch.inference_mode()\n",
"_inference_mode.__enter__()"
]
},
{
Expand Down Expand Up @@ -650,7 +651,7 @@
"fileUid": "76928cb6-3532-4024-bafd-4d3a609dfe2a",
"isAdHoc": false,
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "sam3",
"language": "python",
"name": "python3"
},
Expand All @@ -664,7 +665,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.11"
"version": "3.12.12"
}
},
"nbformat": 4,
Expand Down
5 changes: 3 additions & 2 deletions examples/sam3_image_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "13325376-658b-48d6-8528-2a006f223d44",
"metadata": {},
"outputs": [],
Expand All @@ -75,7 +75,8 @@
"torch.autocast(\"cuda\", dtype=torch.bfloat16).__enter__()\n",
"\n",
"# inference mode for the whole notebook. Disable if you need gradients\n",
"torch.inference_mode().__enter__()"
"_inference_mode = torch.inference_mode()\n",
"_inference_mode.__enter__()"
]
},
{
Expand Down