Skip to content

Commit 46cfc2c

Browse files
Merge branch 'nm/update_outetts' of https://github.com/KodiaqQ/openvino_notebooks into nm/update_outetts
2 parents 39e8e22 + c93ea44 commit 46cfc2c

File tree

69 files changed

+3619
-2475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3619
-2475
lines changed

.ci/ignore_treon_docker.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,5 @@ notebooks/llm-agent-react/llm-agent-react.ipynb
8282
notebooks/multilora-image-generation/multilora-image-generation.ipynb
8383
notebooks/llm-agent-react/llm-agent-react-langchain.ipynb
8484
notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb
85-
notebooks/llm-rag-langchain/llm-rag-langchain-genai.ipynb
85+
notebooks/llm-rag-langchain/llm-rag-langchain-genai.ipynb
86+
notebooks/ltx-video/ltx-video.ipynb

.ci/skipped_notebooks.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,6 @@
334334
- ubuntu-20.04
335335
- ubuntu-22.04
336336
- windows-2019
337-
- notebook: notebooks/openvoice/openvoice.ipynb
338-
skips:
339-
- os:
340-
- macos-13
341-
- ubuntu-20.04
342-
- ubuntu-22.04
343-
- windows-2019
344337
- notebook: notebooks/instant-id/instant-id.ipynb
345338
skips:
346339
- os:
@@ -569,4 +562,11 @@
569562
- notebook: notebooks/tensorflow-quantization-aware-training/tensorflow-quantization-aware-training.ipynb
570563
skips:
571564
- python:
572-
- '3.12'
565+
- '3.12'
566+
- notebook: notebooks/ltx-video/ltx-video.ipynb
567+
skips:
568+
- os:
569+
- macos-13
570+
- ubuntu-20.04
571+
- ubuntu-22.04
572+
- windows-2019

.ci/spellcheck/.pyspelling.wordlist.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ DeciDiffusion's
183183
deduplicated
184184
DeepFloyd
185185
DeepLabV
186+
DeepSeek
186187
denoise
187188
denoised
188189
denoises
@@ -233,6 +234,7 @@ Downloader
233234
downloader
234235
downsample
235236
downsampled
237+
downscaling
236238
DPM
237239
DPO
238240
dpo
@@ -323,6 +325,7 @@ GPUs
323325
Gradio
324326
gradio
325327
grayscale
328+
grey
326329
GroundedSAM
327330
GroundingDINO
328331
gRPC
@@ -477,6 +480,7 @@ LoRAs
477480
lraspp
478481
LRASPP
479482
LTS
483+
LTX
480484
LSTM
481485
LSTMs
482486
Luo
@@ -664,6 +668,7 @@ parameterization
664668
parametrize
665669
Parler
666670
parsers
671+
patchifying
667672
perceptron
668673
Patil
669674
PEFT
@@ -832,6 +837,7 @@ Segmenter
832837
segmenter
833838
Segmind
834839
segmind
840+
selfattention
835841
serializable
836842
sft
837843
ShapeNet
@@ -861,6 +867,7 @@ sparsity
861867
Sparisty
862868
sparsified
863869
sparsify
870+
spatiotemporal
864871
spectrogram
865872
spectrograms
866873
SpeechBrain
@@ -978,6 +985,7 @@ uparrow
978985
upcast
979986
upcasts
980987
Upcroft
988+
updo
981989
upsample
982990
upsampled
983991
upsamples
@@ -988,6 +996,7 @@ upscales
988996
upscaling
989997
utils
990998
VAE
999+
VAE's
9911000
Validator
9921001
validator
9931002
variational

notebooks/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
- [Visual-language assistant with Llama-3.2-11B-Vision and OpenVINO](./mllama-3.2/mllama-3.2.ipynb)
5959
- [Visual-language assistant with MiniCPM-V2 and OpenVINO](./minicpm-v-multimodal-chatbot/minicpm-v-multimodal-chatbot.ipynb)
6060
- [Magika: AI powered fast and efficient file type identification using OpenVINO](./magika-content-type-recognition/magika-content-type-recognition.ipynb)
61+
- [LTX Video and OpenVINO™](./ltx-video/ltx-video.ipynb)
6162
- [Create a RAG system using OpenVINO and LlamaIndex](./llm-rag-llamaindex/llm-rag-llamaindex.ipynb)
6263
- [Create a RAG system using OpenVINO and LangChain](./llm-rag-langchain/llm-rag-langchain.ipynb)
6364
- [Create a RAG system using OpenVINO GenAI and LangChain](./llm-rag-langchain/llm-rag-langchain-genai.ipynb)
@@ -251,6 +252,7 @@
251252
- [Visual-language assistant with MiniCPM-V2 and OpenVINO](./minicpm-v-multimodal-chatbot/minicpm-v-multimodal-chatbot.ipynb)
252253
- [Industrial Meter Reader](./meter-reader/meter-reader.ipynb)
253254
- [Magika: AI powered fast and efficient file type identification using OpenVINO](./magika-content-type-recognition/magika-content-type-recognition.ipynb)
255+
- [LTX Video and OpenVINO™](./ltx-video/ltx-video.ipynb)
254256
- [Create a RAG system using OpenVINO and LlamaIndex](./llm-rag-llamaindex/llm-rag-llamaindex.ipynb)
255257
- [Create a RAG system using OpenVINO and LangChain](./llm-rag-langchain/llm-rag-langchain.ipynb)
256258
- [Create a RAG system using OpenVINO GenAI and LangChain](./llm-rag-langchain/llm-rag-langchain-genai.ipynb)

notebooks/bark-text-to-audio/bark-text-to-audio.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,6 @@
671671
" semantic_history = None\n",
672672
" encoded_text = np.ascontiguousarray(_tokenize(tokenizer, text)) + TEXT_ENCODING_OFFSET\n",
673673
" if len(encoded_text) > 256:\n",
674-
" p = round((len(encoded_text) - 256) / len(encoded_text) * 100, 1)\n",
675674
" encoded_text = encoded_text[:256]\n",
676675
" encoded_text = np.pad(\n",
677676
" encoded_text,\n",

notebooks/blip-visual-language-processing/blip-visual-language-processing.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1293,7 +1293,7 @@
12931293
"source": [
12941294
"%%skip not $to_quantize.value\n",
12951295
"\n",
1296-
"if not TEXT_ENCODER_OV_INT8.exists()\n",
1296+
"if not TEXT_ENCODER_OV_INT8.exists():\n",
12971297
" text_encoder_dataset = nncf.Dataset(calibration_data, lambda x: x[\"text_encoder_inputs\"])\n",
12981298
" text_encoder_model = core.read_model(TEXT_ENCODER_OV)\n",
12991299
"\n",

notebooks/clip-zero-shot-image-classification/clip-zero-shot-classification.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
"sample_path = Path(\"data/coco.jpg\")\n",
201201
"sample_path.parent.mkdir(parents=True, exist_ok=True)\n",
202202
"\n",
203-
"if not sample_path.exists()\n",
203+
"if not sample_path.exists():\n",
204204
" r = requests.get(\"https://storage.openvinotoolkit.org/repositories/openvino_notebooks/data/data/image/coco.jpg\")\n",
205205
"\n",
206206
" with sample_path.open(\"wb\") as f:\n",

notebooks/efficient-sam/gradio_helper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ def get_examples():
1515
examples_dir = Path("examples")
1616
examples_dir.mkdir(exist_ok=True)
1717
for img_id, image_url in enumerate(example_images):
18-
r = requests.get(image_url)
1918
img_path = examples_dir / f"example_{img_id}.jpg"
20-
with img_path.open("wb") as f:
21-
f.write(r.content)
19+
if not img_path.exists():
20+
r = requests.get(image_url)
21+
with img_path.open("wb") as f:
22+
f.write(r.content)
2223
return [[img] for img in examples_dir.glob("*.jpg")]
2324

2425

notebooks/fast-segment-anything/gradio_helper.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@
22
import gradio as gr
33
from PIL import Image, ImageDraw
44
import numpy as np
5+
from pathlib import Path
6+
import requests
57

68
examples = [
79
["https://storage.openvinotoolkit.org/repositories/openvino_notebooks/data/data/image/coco_bike.jpg"],
810
["https://storage.openvinotoolkit.org/repositories/openvino_notebooks/data/data/image/empty_road_mapillary.jpg"],
911
["https://storage.openvinotoolkit.org/repositories/openvino_notebooks/data/data/image/wall.jpg"],
1012
]
1113

12-
last_image = examples[0][0]
14+
# last_image = examples[0][0]
15+
16+
example_images = []
17+
for example_image_url in examples:
18+
image_name = example_image_url[0].split("/")[-1]
19+
if not Path(image_name).exists():
20+
image = Image.open(requests.get(example_image_url[0], stream=True).raw)
21+
image.save(image_name)
22+
example_images.append([image_name])
23+
24+
last_image = example_images[0][0]
1325

1426

1527
def select_point(img: Image.Image, point_type: str, evt: gr.SelectData) -> Image.Image:
@@ -70,7 +82,7 @@ def save_last_picked_image(img: Image.Image) -> None:
7082
def make_demo(fn: Callable, quantized: bool):
7183
with gr.Blocks(title="Fast SAM") as demo:
7284
with gr.Row(variant="panel"):
73-
original_img = gr.Image(label="Input", value=examples[0][0], type="pil")
85+
original_img = gr.Image(label="Input", type="pil")
7486
segmented_img = gr.Image(label="Segmentation Map", type="pil")
7587
with gr.Row():
7688
point_type = gr.Radio(
@@ -87,7 +99,7 @@ def make_demo(fn: Callable, quantized: bool):
8799
segment_button = gr.Button("Segment", variant="primary")
88100
clear_button = gr.Button("Clear points", variant="secondary")
89101
gr.Examples(
90-
examples,
102+
example_images,
91103
inputs=original_img,
92104
fn=save_last_picked_image,
93105
run_on_click=True,

notebooks/glm-edge-v/glm-edge-v.ipynb

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,31 +64,8 @@
6464
],
6565
"source": [
6666
"%pip install -q \"torch>=2.1\" \"torchvision\" \"protobuf>=3.20\" \"gradio>=4.26\" \"Pillow\" \"accelerate\" \"tqdm\" --extra-index-url https://download.pytorch.org/whl/cpu\n",
67-
"%pip install -q \"openvino>=2024.5.0\" \"nncf>=2.14.0\""
68-
]
69-
},
70-
{
71-
"cell_type": "code",
72-
"execution_count": 2,
73-
"id": "bbe33d8a",
74-
"metadata": {},
75-
"outputs": [
76-
{
77-
"name": "stdout",
78-
"output_type": "stream",
79-
"text": [
80-
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
81-
"llama-index-embeddings-openvino 0.5.0 requires huggingface-hub<0.24.0,>=0.23.0, but you have huggingface-hub 0.26.3 which is incompatible.\n",
82-
"mobileclip 0.1.0 requires timm>=0.9.5, but you have timm 0.4.12 which is incompatible.\n",
83-
"mobileclip 0.1.0 requires torchvision==0.14.1, but you have torchvision 0.20.1+cpu which is incompatible.\n",
84-
"optimum-intel 1.21.0.dev0+080180b requires transformers<4.47,>=4.36, but you have transformers 4.47.0.dev0 which is incompatible.\n",
85-
"salesforce-lavis 1.0.2 requires transformers<4.27,>=4.25.0, but you have transformers 4.47.0.dev0 which is incompatible.\u001b[0m\u001b[31m\n",
86-
"\u001b[0mNote: you may need to restart the kernel to use updated packages.\n"
87-
]
88-
}
89-
],
90-
"source": [
91-
"%pip install -q \"git+https://github.com/huggingface/transformers\""
67+
"%pip install -q \"openvino>=2024.5.0\" \"nncf>=2.14.0\"\n",
68+
"%pip install -q \"git+https://github.com/huggingface/transformers\" --extra-index-url https://download.pytorch.org/whl/cpu"
9269
]
9370
},
9471
{
@@ -105,7 +82,6 @@
10582
" r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/glm-edge-v/glmv_helper.py\")\n",
10683
" open(\"glmv_helper.py\", \"w\").write(r.text)\n",
10784
"\n",
108-
"\n",
10985
"if not Path(\"gradio_helper.py\").exists():\n",
11086
" r = requests.get(url=\"https://raw.githubusercontent.com/openvinotoolkit/openvino_notebooks/latest/notebooks/glm-edge-v/gradio_helper.py\")\n",
11187
" open(\"gradio_helper.py\", \"w\").write(r.text)\n",
@@ -346,8 +322,14 @@
346322
"import requests\n",
347323
"from PIL import Image\n",
348324
"\n",
349-
"url = \"https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11\"\n",
350-
"image = Image.open(requests.get(url, stream=True).raw)\n",
325+
"image_path = Path(\"cat.png\")\n",
326+
"\n",
327+
"if not image_path.exists():\n",
328+
" url = \"https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/d5fbbd1a-d484-415c-88cb-9986625b7b11\"\n",
329+
" image = Image.open(requests.get(url, stream=True).raw)\n",
330+
" image.save(image_path)\n",
331+
"else:\n",
332+
" image = Image.open(image_path)\n",
351333
"\n",
352334
"query = \"Please describe this picture\"\n",
353335
"\n",

0 commit comments

Comments
 (0)