mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 18:45:00 +00:00
13 lines
No EOL
706 B
Diff
13 lines
No EOL
706 B
Diff
diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp
|
|
index 7f892beb..0517e529 100644
|
|
--- a/examples/llava/clip.cpp
|
|
+++ b/examples/llava/clip.cpp
|
|
@@ -2766,7 +2766,7 @@ bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_ima
|
|
int patch_offset = ctx->has_class_embedding ? 1 : 0;
|
|
int* patches_data = (int*)malloc(ggml_nbytes(patches));
|
|
for (int i = 0; i < num_patches; i++) {
|
|
- patches_data[i] = i + patch_offset;
|
|
+ patches_data[i] = i + 1;
|
|
}
|
|
ggml_backend_tensor_set(patches, patches_data, 0, ggml_nbytes(patches));
|
|
free(patches_data);
|