Skip to content

Commit

Permalink
revise peft installation in notebooks (#2387)
Browse files Browse the repository at this point in the history
  • Loading branch information
eaidova authored Sep 12, 2024
1 parent 330992a commit dfc7746
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 39 deletions.
2 changes: 1 addition & 1 deletion notebooks/distil-whisper-asr/distil-whisper-asr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"outputs": [],
"source": [
"%pip install -q \"transformers>=4.35\" \"torch>=2.1,<2.4.0\" \"torchvision<0.19.0\" \"onnx<1.16.2\" \"peft==0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"transformers>=4.35\" \"torch>=2.1,<2.4.0\" \"torchvision<0.19.0\" \"onnx<1.16.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\"\n",
"%pip install -q \"openvino>=2023.2.0\" datasets \"gradio>=4.0\" \"librosa\" \"soundfile\"\n",
"%pip install -q \"nncf>=2.6.0\" \"jiwer\"\n",
Expand Down
4 changes: 1 addition & 3 deletions notebooks/instant-id/instant-id.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q \"openvino>=2023.3.0\" opencv-python transformers diffusers accelerate gdown \"scikit-image>=0.19.2\" \"gradio>=4.19\" \"nncf>=2.9.0\" \"datasets>=2.14.6\" \"peft==0.6.2\""
"%pip install -q \"openvino>=2023.3.0\" opencv-python transformers \"diffusers>=0.24.0\" accelerate gdown \"scikit-image>=0.19.2\" \"gradio>=4.19\" \"nncf>=2.9.0\" \"datasets>=2.14.6\" \"peft>=0.6.2\""
]
},
{
Expand Down Expand Up @@ -246,8 +246,6 @@
" outputs = self.ov_model.outputs\n",
" self.input_mean = 127.5\n",
" self.input_std = 128.0\n",
" # print(self.output_names)\n",
" # assert len(outputs)==10 or len(outputs)==15\n",
" self.use_kps = False\n",
" self._anchor_ratio = 1.0\n",
" self._num_anchors = 1\n",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "37b660e4-3cba-412b-ab1a-b4acb88ff329",
"metadata": {},
Expand Down Expand Up @@ -47,7 +46,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ee66539d-99cc-45a3-80e4-4fbd6b520650",
"metadata": {},
Expand All @@ -64,11 +62,10 @@
"outputs": [],
"source": [
"%pip install -q \"torch>=2.1\" --index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"openvino>=2023.1.0\" transformers \"diffusers>=0.23.1\" pillow \"gradio>=4.19\" \"nncf>=2.7.0\" \"datasets>=2.14.6\" \"peft==0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu"
"%pip install -q \"openvino>=2024.3.0\" transformers \"diffusers>=0.30.1\" pillow \"gradio>=4.19\" \"nncf>=2.12.0\" \"datasets>=2.14.6\" --extra-index-url https://download.pytorch.org/whl/cpu"
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "9523be62-2c38-480d-ae53-13910ae6d049",
"metadata": {},
Expand Down Expand Up @@ -221,7 +218,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "8972c4f5-4dbb-4650-a97a-8debbfab1d58",
"metadata": {},
Expand Down Expand Up @@ -310,7 +306,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "ea926988-97d0-4722-9c5d-72a16635c86e",
"metadata": {},
Expand Down Expand Up @@ -371,7 +366,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "6ecdac70-4194-4345-b816-26454e5941d4",
"metadata": {},
Expand Down Expand Up @@ -435,7 +429,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d38976ba-29bf-49f2-8fc8-02d66f342d07",
"metadata": {},
Expand Down Expand Up @@ -672,7 +665,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "8de4233d-f6df-44a5-a319-af24fd2d6ee1",
"metadata": {},
Expand Down Expand Up @@ -738,7 +730,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "8ca4d4ac-66e0-4636-bb26-d3e66eb90639",
"metadata": {},
Expand All @@ -765,7 +756,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "21bc3f1b-c324-4f8d-bcf9-19504f5826f5",
"metadata": {},
Expand Down Expand Up @@ -837,7 +827,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "7600eaf2-6a6a-4f07-8fdc-fa7155acc842",
"metadata": {},
Expand All @@ -846,7 +835,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "919bf570",
"metadata": {},
Expand Down Expand Up @@ -899,7 +887,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "7383b987",
"metadata": {},
Expand Down Expand Up @@ -927,7 +914,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "2931a018",
"metadata": {},
Expand Down Expand Up @@ -1040,7 +1026,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "0421a05a",
"metadata": {},
Expand Down Expand Up @@ -1231,7 +1216,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "d90608e5",
"metadata": {},
Expand Down Expand Up @@ -1294,7 +1278,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "3ea2cfd0",
"metadata": {},
Expand Down Expand Up @@ -1372,7 +1355,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "1cfcd78e",
"metadata": {},
Expand Down Expand Up @@ -1409,7 +1391,6 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "035dffa6-0ce9-4d22-8638-a2217d06e828",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install -q \"torch\" transformers \"diffusers>=0.22.0\" \"controlnet-aux>=0.0.6\" \"peft==0.6.2\" accelerate --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"torch\" transformers \"diffusers>=0.24.0\" \"controlnet-aux>=0.0.6\" \"peft>=0.6.2\" accelerate --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"openvino>=2023.2.0\" pillow \"gradio>=4.19\" \"datasets>=2.14.6\" \"nncf>=2.7.0\""
]
},
Expand Down
2 changes: 1 addition & 1 deletion notebooks/paint-by-example/paint-by-example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"outputs": [],
"source": [
"%pip install -q \"torch>=2.1\" torchvision --extra-index-url \"https://download.pytorch.org/whl/cpu\"\n",
"%pip install -q \"diffusers>=0.25.0\" \"peft==0.6.2\" \"openvino>=2023.2.0\" \"transformers>=4.25.1\" ipywidgets opencv-python pillow \"nncf>=2.7.0\" \"gradio==3.44.1\" tqdm"
"%pip install -q \"diffusers>=0.25.0\" \"peft>=0.6.2\" \"openvino>=2023.2.0\" \"transformers>=4.25.1\" ipywidgets opencv-python pillow \"nncf>=2.7.0\" \"gradio==3.44.1\" tqdm"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/photo-maker/photo-maker.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"outputs": [],
"source": [
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \\\n",
"transformers \"torch>=2.1\" \"diffusers>=0.26,<0.30\" \"gradio>=4.19\" \"openvino>=2024.0.0\" \"einops\" torchvision \"peft==0.6.2\" \"nncf>=2.9.0\" \"protobuf==3.20.3\" \"insightface\" \"onnxruntime\""
"transformers \"torch>=2.1\" \"diffusers>=0.26,<0.30\" \"gradio>=4.19\" \"openvino>=2024.0.0\" \"einops\" torchvision \"peft>=0.6.2\" \"nncf>=2.9.0\" \"protobuf==3.20.3\" \"insightface\" \"onnxruntime\""
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/pix2struct-docvqa/pix2struct-docvqa.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"outputs": [],
"source": [
"%pip install -q \"torch>=2.1\" torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\" \"openvino>=2023.1.0\" \"transformers>=4.33.0\" \"peft==0.6.2\" \"onnx<1.16.2\" \"gradio>=4.19\" --extra-index-url https://download.pytorch.org/whl/cpu"
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\" \"openvino>=2023.1.0\" \"onnx<1.16.2\" \"gradio>=4.19\" --extra-index-url https://download.pytorch.org/whl/cpu"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion notebooks/qrcode-monster/qrcode-monster.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
"outputs": [],
"source": [
"%pip install -q accelerate diffusers transformers \"torch>=2.1\" \"gradio>=4.19\" qrcode opencv-python \"peft==0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q accelerate \"diffusers>=0.24.0\" transformers \"torch>=2.1\" \"gradio>=4.19\" qrcode opencv-python \"peft>=0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"openvino>=2023.1.0\" \"nncf>=2.7.0\""
]
},
Expand Down
2 changes: 1 addition & 1 deletion notebooks/sdxl-turbo/sdxl-turbo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"outputs": [],
"source": [
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu \\\n",
"\"torch>=2.1\" transformers diffusers \"git+https://github.com/huggingface/optimum-intel.git\" \"gradio>=4.19\" \"peft==0.6.2\" \"openvino>=2023.3.0\""
"\"torch>=2.1\" transformers \"diffusers>=0.24.0\" \"git+https://github.com/huggingface/optimum-intel.git\" \"gradio>=4.19\" \"peft>=0.6.2\" \"openvino>=2023.3.0\""
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
},
"outputs": [],
"source": [
"%pip install -q \"openvino>=2024.1.0\" \"torch>=2.1\" torchvision \"diffusers==0.25.1\" \"peft==0.6.2\" transformers tqdm pillow opencv-python \"gradio==3.43.1\" --extra-index-url https://download.pytorch.org/whl/cpu"
"%pip install -q \"openvino>=2024.1.0\" \"torch>=2.1\" torchvision \"diffusers==0.25.1\" \"peft>=0.6.2\" transformers tqdm pillow opencv-python \"gradio==3.43.1\" --extra-index-url https://download.pytorch.org/whl/cpu"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -45,6 +46,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -60,11 +62,12 @@
},
"outputs": [],
"source": [
"%pip install -qU accelerate \"diffusers>=0.30.0\" \"transformers>=4.43\" \"torch>=2.1\" \"gradio>=4.19\" \"peft==0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -qU accelerate \"diffusers>=0.30.0\" \"transformers>=4.43\" \"torch>=2.1\" \"gradio>=4.19\" \"peft>=0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"openvino>=2024.0.0\""
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -237,6 +240,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -275,6 +279,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -349,6 +354,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -396,6 +402,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -445,6 +452,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -515,6 +523,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -557,6 +566,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -633,6 +643,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -689,6 +700,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -736,6 +748,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -854,6 +867,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -945,6 +959,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down
2 changes: 1 addition & 1 deletion notebooks/speculative-sampling/speculative-sampling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"%pip install -Uq pip\n",
"%pip uninstall -q -y optimum optimum-intel\n",
"%pip install --pre -Uq \"openvino>=2024.2.0\" openvino-tokenizers[transformers] --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly\n",
"%pip install -q --upgrade transformers \"torch>=2.1\" \"torchvision\" \"gradio>=4.19\" accelerate \"onnx<1.16.2\" ipywidgets \"peft==0.6.2\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q --upgrade transformers \"torch>=2.1\" \"torchvision\" \"gradio>=4.19\" accelerate \"onnx<1.16.2\" ipywidgets --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"git+https://github.com/huggingface/optimum-intel.git\""
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"source": [
"import platform\n",
"\n",
"%pip install -q \"torch>=2.1\" transformers accelerate diffusers \"openvino>=2023.3.0\" \"gradio>=4.19\" opencv-python \"peft==0.6.2\" \"protobuf>=3.20\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"%pip install -q \"torch>=2.1\" transformers accelerate \"diffusers>=0.24.0\" \"openvino>=2023.3.0\" \"gradio>=4.19\" opencv-python \"peft>=0.6.2\" \"protobuf>=3.20\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
"\n",
"if platform.system() != \"Windows\":\n",
" %pip install -q \"matplotlib>=3.4\"\n",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/stable-diffusion-xl/segmind-vegart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"outputs": [],
"source": [
"%pip install -q --extra-index-url https://download.pytorch.org/whl/cpu\\\n",
"\"torch>=2.1\" transformers diffusers \"git+https://github.com/huggingface/optimum-intel.git\" \"gradio>=4.19\" \"openvino>=2023.3.0\" \"peft==0.6.2\""
"\"torch>=2.1\" transformers \"diffusers>=0.24.0\" \"git+https://github.com/huggingface/optimum-intel.git\" \"gradio>=4.19\" \"openvino>=2023.3.0\" \"peft>=0.6.2\""
]
},
{
Expand Down
Loading

0 comments on commit dfc7746

Please sign in to comment.