Skip to content

Commit bd90eca

Browse files
authored
llava : fix regression for square images in ggml-org#3613 (ggml-org#4056)
1 parent 3d68f36 commit bd90eca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/llava/clip.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ bool clip_image_preprocess(const clip_ctx * ctx, const clip_image_u8 * img, clip
761761
temp->ny = img->ny;
762762
temp->size = img->size;
763763
temp->data = new uint8_t[temp->size]();
764-
*temp->data = *img->data; // copy
764+
memcpy(&temp->data[0], &img->data[0], temp->size); // copy
765765
}
766766

767767
const int nx = temp->nx;

0 commit comments

Comments
 (0)