Skip to content

Commit a036a6d

Browse files
authored
Fix image_id unary error (#1927)
**Details:** Fix image_id unary error Ticket: CVS-164360 --------- Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
1 parent 9534f2c commit a036a6d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cpp/src/visual_language/phi3_vision/classes.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,11 @@ ov::Tensor insert_image_placeholders(
542542
return length;
543543
},
544544
[&](size_t image_id) {
545+
int64_t fill_value = -(static_cast<int64_t>(image_id)) - 1;
545546
std::fill_n(
546547
merged.data<int64_t>() + offset,
547548
tokens_per_images.at(image_id),
548-
-image_id - 1 // -1 to distinguish 0 token and 0 image id.
549+
fill_value // -1 to distinguish 0 token and 0 image id.
549550
);
550551
return tokens_per_images.at(image_id);
551552
}

0 commit comments

Comments
 (0)