llava : fix regression for square images in #3613

This commit is contained in:
M. Yusuf Sarıgöz 2023-11-13 11:55:57 +03:00
parent 21fd874c8d
commit 5925436075

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;