Skip to content

Commit 52c6526

Browse files
authored
Merge branch 'master' into xp/enable_vlm_lookup
2 parents 490d6e1 + 843b463 commit 52c6526

25 files changed

+2191
-19
lines changed

samples/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
if(ENABLE_SAMPLES)
55
add_subdirectory(cpp/text_generation)
66
add_subdirectory(cpp/image_generation)
7+
add_subdirectory(cpp/video_generation)
78
add_subdirectory(cpp/speech_generation)
89
add_subdirectory(cpp/visual_language_chat)
910
add_subdirectory(cpp/whisper_speech_recognition)
@@ -23,6 +24,7 @@ install(FILES
2324
install(DIRECTORY
2425
cpp/text_generation
2526
cpp/image_generation
27+
cpp/video_generation
2628
cpp/speech_generation
2729
cpp/visual_language_chat
2830
cpp/whisper_speech_recognition

samples/cpp/image_generation/progress_bar.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <optional>
55

66
#include "indicators/progress_bar.hpp"
7+
#include <openvino/runtime/tensor.hpp>
78

89
bool progress_bar(size_t step, size_t num_steps, ov::Tensor& /* latent */) {
910
using namespace indicators;
@@ -21,7 +22,7 @@ bool progress_bar(size_t step, size_t num_steps, ov::Tensor& /* latent */) {
2122
}
2223

2324
std::stringstream stream;
24-
stream << "Image generation step " << (step + 1) << " / " << num_steps;
25+
stream << "Generation step " << (step + 1) << " / " << num_steps;
2526

2627
bar->set_option(option::PostfixText{stream.str()});
2728
bar->set_progress((100 * (step + 1)) / num_steps);
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright (C) 2025-2026 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
find_package(OpenVINOGenAI REQUIRED
5+
PATHS
6+
"${CMAKE_BINARY_DIR}" # Reuse the package from the build.
7+
${OpenVINO_DIR} # GenAI may be installed alongside OpenVINO.
8+
NO_CMAKE_FIND_ROOT_PATH
9+
)
10+
11+
file(DOWNLOAD https://raw.githubusercontent.com/nothings/stb/f75e8d1cad7d90d72ef7a4661f1b994ef78b4e31/stb_image_write.h ${CMAKE_BINARY_DIR}/stb_image_write.h
12+
EXPECTED_HASH MD5=845b8b43d7d941890a57a477455558ad)
13+
14+
include(FetchContent)
15+
16+
if(POLICY CMP0135)
17+
cmake_policy(SET CMP0135 NEW)
18+
endif()
19+
20+
FetchContent_Declare(indicators
21+
URL https://github.com/p-ranav/indicators/archive/refs/tags/v2.3.tar.gz
22+
URL_HASH SHA256=70da7a693ff7a6a283850ab6d62acf628eea17d386488af8918576d0760aef7b)
23+
FetchContent_MakeAvailable(indicators)
24+
25+
# create main sample executable
26+
27+
add_executable(text2video text2video.cpp)
28+
29+
target_include_directories(text2video PRIVATE ${CMAKE_BINARY_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/../image_generation/" "${CMAKE_CURRENT_SOURCE_DIR}/../../../src/cpp/src/")
30+
target_link_libraries(text2video PRIVATE openvino::genai indicators::indicators)
31+
32+
target_sources(text2video PRIVATE imwrite_video.cpp)
33+
34+
set_target_properties(text2video PROPERTIES
35+
# Ensure out of box LC_RPATH on macOS with SIP
36+
INSTALL_RPATH_USE_LINK_PATH ON)
37+
38+
install(TARGETS text2video
39+
RUNTIME DESTINATION samples_bin/
40+
COMPONENT samples_bin
41+
EXCLUDE_FROM_ALL)

0 commit comments

Comments
 (0)