Skip to content

Commit

Permalink
llava : fix regression for square images in #3613 (#4056)
Browse files Browse the repository at this point in the history
  • Loading branch information
monatis authored Nov 13, 2023
1 parent 3d68f36 commit bd90eca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/llava/clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bd90eca

Please sign in to comment.