|
79 | 79 | " )\n",
|
80 | 80 | " open(\"cmd_helper.py\", \"w\").write(r.text)\n",
|
81 | 81 | "\n",
|
| 82 | + "if not Path(\"pip_helper.py\").exists():\n", |
| 83 | + " r = requests.get(\n", |
| 84 | + " url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/utils/pip_helper.py\",\n", |
| 85 | + " )\n", |
| 86 | + " open(\"pip_helper.py\", \"w\").write(r.text)\n", |
| 87 | + "\n", |
82 | 88 | "\n",
|
83 |
| - "%pip install -q \"gradio>=4.19\" \"openvino>=2024.3.0\" wheel \"gradio-litmodel3d==0.0.1\"\n", |
84 |
| - "%pip install -q \"torch>=2.2.2\" torchvision \"transformers>=4.42.3\" \"open_clip_torch==2.24.0\" --extra-index-url https://download.pytorch.org/whl/cpu\n", |
85 |
| - "%pip install -q \"omegaconf==2.4.0.dev3\"\n", |
86 |
| - "%pip install -q \"git+https://github.com/vork/PyNanoInstantMeshes.git\"\n", |
87 |
| - "%pip install -q jaxtyping gpytoolbox trimesh einops\n", |
| 89 | + "from pip_helper import pip_install\n", |
| 90 | + "\n", |
| 91 | + "\n", |
| 92 | + "pip_install(\"-q\", \"gradio>=4.19\", \"openvino>=2024.3.0\", \"wheel\", \"gradio-litmodel3d==0.0.1\")\n", |
| 93 | + "pip_install(\"-q\", \"torch>=2.2.2\", \"torchvision\", \"transformers>=4.42.3\", \"open_clip_torch==2.24.0\", \"--extra-index-url\", \"https://download.pytorch.org/whl/cpu\")\n", |
| 94 | + "pip_install(\"-q\", \"omegaconf==2.4.0.dev3\")\n", |
| 95 | + "pip_install(\"-q\", \"git+https://github.com/vork/PyNanoInstantMeshes.git\")\n", |
| 96 | + "pip_install(\"-q\", \"jaxtyping\", \"gpytoolbox\", \"trimesh\", \"einops\")\n", |
88 | 97 | "# rembg requires opencv-python-headless that can't be installed with opencv-python. So, we install rembg without dependencies and install its requirements\n",
|
89 |
| - "%pip install -q rembg --no-deps\n", |
90 |
| - "%pip install -q onnxruntime \"opencv-python\" pymatting pooch pynim\n", |
| 98 | + "pip_install(\"-q\", \"rembg\", \"--no-deps\")\n", |
| 99 | + "pip_install(\"-q\", \"onnxruntime\", \"opencv-python\", \"pymatting\", \"pooch\", \"pynim\")\n", |
91 | 100 | "\n",
|
92 | 101 | "# Read more about telemetry collection at https://github.com/openvinotoolkit/openvino_notebooks?tab=readme-ov-file#-telemetry\n",
|
93 | 102 | "from notebook_utils import collect_telemetry\n",
|
|
107 | 116 | "from cmd_helper import clone_repo\n",
|
108 | 117 | "\n",
|
109 | 118 | "\n",
|
110 |
| - "clone_repo(\"https://github.com/Stability-AI/stable-fast-3d\", \"2b35658e6fa41df4171f15d8696102c62845f16a\")\n", |
| 119 | + "clone_repo(\"https://github.com/Stability-AI/stable-fast-3d\", \"ff21fc491b4dc5314bf6734c7c0dabd86b5f5bb2\")\n", |
111 | 120 | "\n",
|
112 |
| - "%pip install -q {Path(\"stable-fast-3d/texture_baker/\")}\n", |
113 |
| - "%pip install -q {Path(\"stable-fast-3d/uv_unwrapper/\")}" |
| 121 | + "pip_install(\"-q\", Path(\"stable-fast-3d/texture_baker/\"))\n", |
| 122 | + "pip_install(\"-q\", Path(\"stable-fast-3d/uv_unwrapper/\"))" |
114 | 123 | ]
|
115 | 124 | },
|
116 | 125 | {
|
|
122 | 131 | "## Get the original model"
|
123 | 132 | ]
|
124 | 133 | },
|
| 134 | + { |
| 135 | + "cell_type": "code", |
| 136 | + "execution_count": null, |
| 137 | + "id": "5b488801", |
| 138 | + "metadata": {}, |
| 139 | + "outputs": [], |
| 140 | + "source": [] |
| 141 | + }, |
125 | 142 | {
|
126 | 143 | "cell_type": "code",
|
127 | 144 | "execution_count": null,
|
|
0 commit comments