diff --git a/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb b/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb index cf1d6a8e490..90134579740 100644 --- a/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb +++ b/notebooks/triposr-3d-reconstruction/triposr-3d-reconstruction.ipynb @@ -84,7 +84,21 @@ "execution_count": 2, "id": "b78424b7-80e4-4470-9427-7286b9837566", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Cloning into 'TripoSR'...\n", + "remote: Enumerating objects: 120, done.\u001b[K\n", + "remote: Counting objects: 100% (116/116), done.\u001b[K\n", + "remote: Compressing objects: 100% (114/114), done.\u001b[K\n", + "remote: Total 120 (delta 38), reused 0 (delta 0), pack-reused 4 (from 1)\u001b[K\n", + "Receiving objects: 100% (120/120), 570.19 KiB | 1.07 MiB/s, done.\n", + "Resolving deltas: 100% (38/38), done.\n" + ] + } + ], "source": [ "import sys\n", "from pathlib import Path\n", @@ -122,7 +136,7 @@ " weight_name=\"model.ckpt\",\n", ")\n", "model.renderer.set_chunk_size(131072)\n", - "model.to(\"cpu\")" + "model.to(\"cpu\");" ] }, { @@ -181,10 +195,19 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "id": "d9456c3c-64dd-4109-968c-8f51d42b9876", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/ea/work/py311/lib/python3.11/site-packages/transformers/models/vit/modeling_vit.py:163: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!\n", + " if num_channels != self.num_channels:\n" + ] + } + ], "source": [ "VIT_PATCH_EMBEDDINGS_OV_PATH = Path(\"models/vit_patch_embeddings_ir.xml\")\n", "\n", @@ -194,13 +217,13 @@ " super().__init__()\n", " self.patch_embeddings = patch_embeddings\n", "\n", - " def forward(self, pixel_values, interpolate_pos_encoding=True):\n", - " outputs = self.patch_embeddings(pixel_values=pixel_values, interpolate_pos_encoding=True)\n", + " def forward(self, pixel_values):\n", + " outputs = self.patch_embeddings(pixel_values=pixel_values)\n", " return outputs\n", "\n", "\n", "example_input = {\n", - " \"pixel_values\": torch.rand([1, 3, 512, 512], dtype=torch.float32),\n", + " \"pixel_values\": torch.rand([1, 3, 224, 224], dtype=torch.float32),\n", "}\n", "\n", "convert(\n", @@ -227,11 +250,7 @@ "\n", " def forward(\n", " self,\n", - " hidden_states=None,\n", - " head_mask=None,\n", - " output_attentions=False,\n", - " output_hidden_states=False,\n", - " return_dict=False,\n", + " hidden_states,\n", " ):\n", " outputs = self.encoder(\n", " hidden_states=hidden_states,\n", @@ -336,7 +355,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "7986388de70945238d4407af5c60c348", + "model_id": "03ad2a182a8b4218b2fa7e8eef4b05e3", "version_major": 2, "version_minor": 0 }, @@ -522,7 +541,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 15, "id": "28d8a250", "metadata": {}, "outputs": [], @@ -571,7 +590,29 @@ "execution_count": null, "id": "044bc9cf-3141-433d-a267-f5da84c9aa11", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Running on local URL: http://127.0.0.1:7860\n", + "\n", + "To create a public link, set `share=True` in `launch()`.\n" + ] + }, + { + "data": { + "text/html": [ + "
" + ], + "text/plain": [ + "