Skip to content

Commit

Permalink
add skipped os
Browse files Browse the repository at this point in the history
  • Loading branch information
openvino-dev-samples committed Dec 6, 2024
2 parents 0833101 + be81d7e commit 5203bc1
Show file tree
Hide file tree
Showing 30 changed files with 1,935 additions and 213 deletions.
1 change: 1 addition & 0 deletions .ci/check_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
Path("notebooks/sparsity-optimization/sparsity-optimization.ipynb"), # cpu expected to be used
Path("notebooks/s3d-mil-nce-text-to-video-retrieval/s3d-mil-nce-text-to-video-retrieval.ipynb"), # only cpu
Path("notebooks/explainable-ai-2-deep-dive/explainable-ai-2-deep-dive.ipynb"), # device-agnostic
Path("notebooks/localai/localai.ipynb"), # can not change device in docker configuration on the fly
]


Expand Down
4 changes: 4 additions & 0 deletions .ci/skipped_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@
- ubuntu-20.04
- ubuntu-22.04
- windows-2019
- notebook: notebooks/glm-edge-v/glm-edge-v.ipynb
skips:
- os:
- macos-13
- notebook: notebooks/multimodal-rag/multimodal-rag-llamaindex.ipynb
skips:
- os:
Expand Down
4 changes: 4 additions & 0 deletions .ci/spellcheck/.pyspelling.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ convolutional
coreference
CoSENT
cpm
cpp
CPUs
cpu
CRNN
Expand Down Expand Up @@ -435,6 +436,7 @@ LangChain
langchain
Lasinger
latents
LocalAI
lookahead
LCMs
LCMScheduler
Expand Down Expand Up @@ -691,6 +693,7 @@ precomputed
preconverted
prefetching
preformatted
prem
PrePostProcessing
prepostprocessing
prepostprocessor
Expand Down Expand Up @@ -1033,6 +1036,7 @@ xt
xvector
xxl
XYWH
YAML
Yiqin
YOLO
YOLOv
Expand Down
4 changes: 0 additions & 4 deletions check_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ def kernel_check():
"See https://github.com/openvinotoolkit/openvino_notebooks/wiki/Windows"
)

if not DEVTOOLS_INSTALLED:
print()
print("OpenVINO development tools are not installed in this Python environment. \n" "Please follow the instructions in the README to install `openvino`\n")

if not NO_BROKEN_REQUIREMENTS:
print()
print("`pip check` shows broken requirements:")
Expand Down
3 changes: 3 additions & 0 deletions notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
- [InstantID: Zero-shot Identity-Preserving Generation using OpenVINO](./instant-id/instant-id.ipynb)
- [Image generation with HunyuanDIT and OpenVINO](./hunyuan-dit-image-generation/hunyuan-dit-image-generation.ipynb)
- [Object detection and masking from prompts with GroundedSAM (GroundingDINO + SAM) and OpenVINO](./grounded-segment-anything/grounded-segment-anything.ipynb)
- [Visual-language assistant with GLM-Edge-V and OpenVINO](./glm-edge-v/glm-edge-v.ipynb)
- [Image generation with Flux.1 and OpenVINO](./flux.1-image-generation/flux.1-image-generation.ipynb)
- [Florence-2: Open Source Vision Foundation Model](./florence2/florence2.ipynb)
- [Frame interpolation using FILM and OpenVINO](./film-slowmo/film-slowmo.ipynb)
Expand All @@ -100,6 +101,7 @@
- [OpenVINO Tokenizers: Incorporate Text Processing Into OpenVINO Pipelines](./openvino-tokenizers/openvino-tokenizers.ipynb)
- [Convert models from ModelScope to OpenVINO](./modelscope-to-openvino/modelscope-to-openvino.ipynb)
- [Hello Model Server](./model-server/model-server.ipynb)
- [LocalAI and OpenVINO](./localai/localai.ipynb)
- [Quantize NLP models with Post-Training Quantization ​in NNCF](./language-quantize-bert/language-quantize-bert.ipynb)
- [Convert a JAX Model to OpenVINO™ IR](./jax-to-openvino/jax-classification-to-openvino.ipynb)
- [Quantization of Image Classification Models](./image-classification-quantization/image-classification-quantization.ipynb)
Expand Down Expand Up @@ -260,6 +262,7 @@
- [Handwritten Chinese and Japanese OCR with OpenVINO™](./handwritten-ocr/handwritten-ocr.ipynb)
- [Object detection and masking from prompts with GroundedSAM (GroundingDINO + SAM) and OpenVINO](./grounded-segment-anything/grounded-segment-anything.ipynb)
- [Grammatical Error Correction with OpenVINO](./grammar-correction/grammar-correction.ipynb)
- [Visual-language assistant with GLM-Edge-V and OpenVINO](./glm-edge-v/glm-edge-v.ipynb)
- [High-Quality Text-Free One-Shot Voice Conversion with FreeVC and OpenVINO™](./freevc-voice-conversion/freevc-voice-conversion.ipynb)
- [Image generation with Flux.1 and OpenVINO](./flux.1-image-generation/flux.1-image-generation.ipynb)
- [Florence-2: Open Source Vision Foundation Model](./florence2/florence2.ipynb)
Expand Down
18 changes: 8 additions & 10 deletions notebooks/depth-anything/depth-anything-v2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,10 @@
"from notebook_utils import download_file, device_widget, quantization_widget\n",
"\n",
"\n",
"if not Path(\"furseal.png\").exists():\n",
" download_file(\n",
" \"https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/3f779fc1-c1b2-4dec-915a-64dae510a2bb\",\n",
" \"furseal.png\",\n",
" )\n",
"download_file(\n",
" \"https://github.com/openvinotoolkit/openvino_notebooks/assets/29454499/3f779fc1-c1b2-4dec-915a-64dae510a2bb\",\n",
" \"furseal.png\",\n",
")\n",
"\n",
"Image.open(\"furseal.png\").resize((600, 400))"
]
Expand Down Expand Up @@ -547,11 +546,10 @@
"source": [
"VIDEO_FILE = \"./Coco Walking in Berkeley.mp4\"\n",
"\n",
"if not Path(VIDEO_FILE).exists():\n",
" download_file(\n",
" \"https://storage.openvinotoolkit.org/repositories/openvino_notebooks/data/data/video/Coco%20Walking%20in%20Berkeley.mp4\",\n",
" VIDEO_FILE,\n",
" )\n",
"download_file(\n",
" \"https://storage.openvinotoolkit.org/repositories/openvino_notebooks/data/data/video/Coco%20Walking%20in%20Berkeley.mp4\",\n",
" VIDEO_FILE,\n",
")\n",
"\n",
"# Number of seconds of input video to process. Set `NUM_SECONDS` to 0 to process\n",
"# the full video.\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
" hf_hub_download(repo_id=REPO_ID, filename=\"model.ckpt\", local_dir=\"./checkpoints/dynamicrafter_256_v1/\", local_dir_use_symlinks=False)\n",
"\n",
" ckpt_path = \"checkpoints/dynamicrafter_256_v1/model.ckpt\"\n",
" config_file = \"dynamicrafter/configs/inference_256_v1.0.yaml\"\n",
" config_file = \"DynamiCrafter/configs/inference_256_v1.0.yaml\"\n",
" config = OmegaConf.load(config_file)\n",
" model_config = config.pop(\"model\", OmegaConf.create())\n",
" model_config[\"params\"][\"unet_config\"][\"params\"][\"use_checkpoint\"] = False\n",
Expand Down Expand Up @@ -875,7 +875,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"id": "e9a0137a",
"metadata": {},
"outputs": [
Expand All @@ -898,7 +898,7 @@
}
],
"source": [
"image_path = \"dynamicrafter/prompts/256/art.png\"\n",
"image_path = \"DynamiCrafter/prompts/256/art.png\"\n",
"prompt = \"man fishing in a boat at sunset\"\n",
"seed = 234\n",
"image = Image.open(image_path)\n",
Expand Down Expand Up @@ -1629,7 +1629,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": null,
"id": "1e77da42",
"metadata": {},
"outputs": [
Expand All @@ -1652,7 +1652,7 @@
"source": [
"%%skip not $to_quantize.value\n",
"\n",
"image_path = \"dynamicrafter/prompts/256/art.png\"\n",
"image_path = \"DynamiCrafter/prompts/256/art.png\"\n",
"prompt = \"man fishing in a boat at sunset\"\n",
"seed = 234\n",
"image = Image.open(image_path)\n",
Expand Down
10 changes: 5 additions & 5 deletions notebooks/dynamicrafter-animating-images/gradio_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
css = """#input_img {max-width: 256px !important} #output_vid {max-width: 256px; max-height: 256px}"""

i2v_examples_256 = [
["dynamicrafter/prompts/256/art.png", "man fishing in a boat at sunset", 50, 7.5, 1.0, 3, 234],
["dynamicrafter/prompts/256/boy.png", "boy walking on the street", 50, 7.5, 1.0, 3, 125],
["dynamicrafter/prompts/256/dance1.jpeg", "two people dancing", 50, 7.5, 1.0, 3, 116],
["dynamicrafter/prompts/256/fire_and_beach.jpg", "a campfire on the beach and the ocean waves in the background", 50, 7.5, 1.0, 3, 111],
["dynamicrafter/prompts/256/guitar0.jpeg", "bear playing guitar happily, snowing", 50, 7.5, 1.0, 3, 122],
["DynamiCrafter/prompts/256/art.png", "man fishing in a boat at sunset", 50, 7.5, 1.0, 3, 234],
["DynamiCrafter/prompts/256/boy.png", "boy walking on the street", 50, 7.5, 1.0, 3, 125],
["DynamiCrafter/prompts/256/dance1.jpeg", "two people dancing", 50, 7.5, 1.0, 3, 116],
["DynamiCrafter/prompts/256/fire_and_beach.jpg", "a campfire on the beach and the ocean waves in the background", 50, 7.5, 1.0, 3, 111],
["DynamiCrafter/prompts/256/guitar0.jpeg", "bear playing guitar happily, snowing", 50, 7.5, 1.0, 3, 122],
]


Expand Down
27 changes: 27 additions & 0 deletions notebooks/glm-edge-v/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Visual-language assistant with GLM-Edge-V and OpenVINO

The [GLM-Edge](https://huggingface.co/collections/THUDM/glm-edge-6743283c5809de4a7b9e0b8b) series is [Zhipu](https://huggingface.co/THUDM)'s attempt to meet real-world deployment scenarios for edge devices. It consists of two sizes of large language dialogue models and multimodal understanding models (GLM-Edge-1.5B-Chat, GLM-Edge-4B-Chat, GLM-Edge-V-2B, GLM-Edge-V-5B). Among them, the 1.5B / 2B models are mainly targeted at platforms like mobile phones and car machines, while the 4B / 5B models are aimed at platforms like PCs. Based on the technological advancements of the GLM-4 series, some targeted adjustments have been made to the model structure and size, balancing model performance, real-world inference efficiency, and deployment convenience. Through deep collaboration with partner enterprises and relentless efforts in inference optimization, the GLM-Edge series models can run at extremely high speeds on some edge platforms.

In this tutorial we consider how to launch multimodal model GLM-Edge-V using OpenVINO for creation multimodal chatbot. Additionally, we optimize model to low precision using [NNCF](https://github.com/openvinotoolkit/nncf)

![image](https://github.com/user-attachments/assets/06c51867-0580-4434-962e-31b6068c2001)

## Notebook contents
The tutorial consists from following steps:

- Install requirements
- Convert and Optimize model
- Run OpenVINO model inference
- Launch Interactive demo

In this demonstration, you'll create interactive chatbot that can answer questions about provided image's content.


## Installation instructions
This is a self-contained example that relies solely on its own code.</br>
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start.
For details, please refer to [Installation Guide](../../README.md).

<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=5b5a4db0-7875-4bfb-bdbd-01698b5b1a77&file=notebooks/phi-3-vision/README.md" />

<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=5b5a4db0-7875-4bfb-bdbd-01698b5b1a77&file=notebooks/glm-edge-v/README.md" />
Loading

0 comments on commit 5203bc1

Please sign in to comment.