llava : fix regression for square images in #3613 (#4056)

This commit is contained in:
M. Yusuf Sarıgöz 2023-11-13 18:20:52 +03:00 committed by GitHub
parent 3d68f364f1
commit bd90eca237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -761,7 +761,7 @@ bool clip_image_preprocess(const clip_ctx * ctx, const clip_image_u8 * img, clip
temp->ny = img->ny;
temp->size = img->size;
temp->data = new uint8_t[temp->size]();
*temp->data = *img->data; // copy
memcpy(&temp->data[0], &img->data[0], temp->size); // copy
}
const int nx = temp->nx;