Skip to content

Quick fix for clip requirements#4187

Open
rasapala wants to merge 5 commits intomainfrom
fix_clip_demo
Open

Quick fix for clip requirements#4187
rasapala wants to merge 5 commits intomainfrom
fix_clip_demo

Conversation

@rasapala
Copy link
Copy Markdown
Collaborator

@rasapala rasapala commented May 7, 2026

🛠 Summary

Quick fix for clip requirements

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

Copilot AI review requested due to automatic review settings May 7, 2026 07:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CLIP image-classification demo’s model download/export flow to use optimum-intel for exporting the Hugging Face CLIP model to OpenVINO IR, along with updated Python requirements and a small .gitignore tweak.

Changes:

  • Switch download_model.py from manual transformers + openvino.convert_model() conversion to OVModelForZeroShotImageClassification(..., export=True) and save into model/1.
  • Update download_model_requirements.txt to use optimum-intel (VCS install) and loosen transformers constraint.
  • Ignore .github/skills/ in the repo root .gitignore.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
demos/python_demos/clip_image_classification/download_model.py Replaces manual OpenVINO conversion with optimum-intel export + renaming of generated IR artifacts.
demos/python_demos/clip_image_classification/download_model_requirements.txt Adjusts dependencies to support the new export path (optimum-intel, updated transformers constraint, etc.).
.gitignore Adds an ignore rule for .github/skills/.

Comment on lines +31 to +37
for src, dst in (
("openvino_model.xml", "clip-vit-base-patch16.xml"),
("openvino_model.bin", "clip-vit-base-patch16.bin"),
):
src_path = os.path.join(model_path, src)
if os.path.exists(src_path):
os.replace(src_path, os.path.join(model_path, dst))
--extra-index-url "https://storage.openvinotoolkit.org/simple/wheels/nightly"
--pre
openvino==2026.1.*
optimum-intel@git+https://github.com/huggingface/optimum-intel.git
@rasapala rasapala requested review from dtrawins and mzegla May 7, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants