Skip to content

Conversation

@krzyczar
Copy link
Contributor

Description

CVS-173846

Checklist:

  • Tests have been updated or added to cover the new code.
  • This patch fully addresses the ticket.
  • I have made corresponding changes to the documentation.

@github-actions github-actions bot added the category: llm_bench Label for tool/llm_bench folder label Nov 14, 2025
@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch 8 times, most recently from 23248ee to f9b317c Compare November 17, 2025 15:51
@github-actions github-actions bot added category: visual language Visual language pipeline category: GGUF GGUF file reader labels Nov 18, 2025
@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch from b913954 to 475d3ee Compare November 18, 2025 16:35
@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch 2 times, most recently from 5767112 to efdaa7c Compare November 18, 2025 18:15
@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch from efdaa7c to b709f0c Compare November 18, 2025 19:42
@github-actions github-actions bot added the category: visual language Visual language pipeline label Nov 18, 2025
@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch from b709f0c to 0281d1b Compare November 18, 2025 19:59
@Wovchena Wovchena requested review from Copilot and popovaan November 19, 2025 06:44
Copy link
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

This PR adds support for video input processing in the benchmark tool for visual language generation tasks. The main enhancement allows the tool to process video files in addition to existing image support, with configurable frame decimation/reduction capabilities.

Key changes:

  • Added video processing functionality with OpenCV integration
  • Implemented frame decimation logic to control the number of frames processed
  • Extended prompt parsing to handle both image and video inputs

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
tools/llm_bench/task/visual_language_generation.py Updated to support video inputs by integrating new prompt extraction utilities and video tensor processing
tools/llm_bench/requirements.txt Added opencv-python dependency for video processing
tools/llm_bench/llm_bench_utils/prompt_utils.py Implemented video loading, frame decimation, and unified prompt extraction for images and videos
tools/llm_bench/llm_bench_utils/parse_json_data.py Refactored JSON parsing with a shared base function and added video field support
tools/llm_bench/llm_bench_utils/model_utils.py Extended parameter handling to support video inputs alongside media/images
tools/llm_bench/benchmark.py Added command-line arguments for video input and frame control
tests/python_tests/samples/test_tools_llm_benchmark.py Added tests for video prompt processing with various frame decimation scenarios
tests/python_tests/samples/conftest.py Added fixture to download test video from GitHub repository

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch 4 times, most recently from 79f3690 to 3be850c Compare November 19, 2025 15:40
@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch 3 times, most recently from 9580816 to 4621da6 Compare November 27, 2025 08:34
@sbalandi
Copy link
Contributor

build_jenkins

import sys
from pathlib import Path

import requests
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like you don't need these imports now, please, remove

Copy link
Contributor

@sbalandi sbalandi left a comment

Choose a reason for hiding this comment

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

LGTM, let's remove commented text and PR will be ready to merge for me
@as-suvorov please, take a look

but, I face problem on generate() with qwen2-vl-7b-instruct, with master of GenAI and openvino dev build 11.24 . It's not a problem of that PR, I got it with another code too(also llava-next video works well), I just want to ask if it is known problem ?

generation_result = model.generate(prompts[0], generation_config=gen_config, **kwargs)
RuntimeError: Exception from src/inference/src/cpp/infer_request.cpp:75:
Exception from src/inference/src/cpp/infer_request.cpp:67:
Exception from src/inference/src/dev/isync_infer_request.cpp:228:
Failed to set tensor. Exception from src/inference/src/dev/make_tensor.cpp:161:
Can not access non-const pointer use e.g. 'static_cast<const ov::Tensor&>.data()'

@sbalandi sbalandi requested a review from as-suvorov November 27, 2025 22:02
@as-suvorov
Copy link
Collaborator

LGTM, let's remove commented text and PR will be ready to merge for me @as-suvorov please, take a look

but, I face problem on generate() with qwen2-vl-7b-instruct, with master of GenAI and openvino dev build 11.24 . It's not a problem of that PR, I got it with another code too(also llava-next video works well), I just want to ask if it is known problem ?

generation_result = model.generate(prompts[0], generation_config=gen_config, **kwargs)
RuntimeError: Exception from src/inference/src/cpp/infer_request.cpp:75:
Exception from src/inference/src/cpp/infer_request.cpp:67:
Exception from src/inference/src/dev/isync_infer_request.cpp:228:
Failed to set tensor. Exception from src/inference/src/dev/make_tensor.cpp:161:
Can not access non-const pointer use e.g. 'static_cast<const ov::Tensor&>.data()'

Probable fix: #3026. @krzyczar I'm not sure if your branch have this fix, could you please update to latest master

@as-suvorov
Copy link
Collaborator

LGTM, let's remove commented text and PR will be ready to merge for me @as-suvorov please, take a look
but, I face problem on generate() with qwen2-vl-7b-instruct, with master of GenAI and openvino dev build 11.24 . It's not a problem of that PR, I got it with another code too(also llava-next video works well), I just want to ask if it is known problem ?

generation_result = model.generate(prompts[0], generation_config=gen_config, **kwargs)
RuntimeError: Exception from src/inference/src/cpp/infer_request.cpp:75:
Exception from src/inference/src/cpp/infer_request.cpp:67:
Exception from src/inference/src/dev/isync_infer_request.cpp:228:
Failed to set tensor. Exception from src/inference/src/dev/make_tensor.cpp:161:
Can not access non-const pointer use e.g. 'static_cast<const ov::Tensor&>.data()'

Probable fix: #3026. @krzyczar I'm not sure if your branch have this fix, could you please update to latest master

Double checked @sbalandi message. It's not reproduced in this PR, so master update is not strongly required.
@sbalandi please ask @sgonorov he recenlty worked on a similar issue

@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch 2 times, most recently from e550888 to ea1c2a7 Compare November 28, 2025 08:55
@as-suvorov as-suvorov requested a review from Copilot November 28, 2025 11:04
Copy link
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

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch 2 times, most recently from 8d887e4 to 947d105 Compare November 28, 2025 11:22
@krzyczar krzyczar force-pushed the kcz/master/support-for-video-in-benchmark branch from 947d105 to 904cea3 Compare November 28, 2025 11:23
@sbalandi sbalandi enabled auto-merge November 28, 2025 11:50
@sbalandi
Copy link
Contributor

build_jenkins

@sbalandi sbalandi added this pull request to the merge queue Nov 28, 2025
Merged via the queue into openvinotoolkit:master with commit df1c52d Nov 28, 2025
149 of 153 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GGUF GGUF file reader category: llm_bench Label for tool/llm_bench folder category: visual language Visual language pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants