This commit is contained in:
John 2024-02-11 03:44:07 +01:00
parent 7dcadb4ec3
commit 7107b9098e
2 changed files with 4 additions and 4 deletions

View file

@ -1277,7 +1277,7 @@ void bilinear_resize(const clip_image_u8& src, clip_image_u8& dst, int target_wi
float x_ratio = static_cast<float>(src.nx - 1) / target_width;
float y_ratio = static_cast<float>(src.ny - 1) / target_height;
for (int y = 0; y < target_height; y++) {
for (int x = 0; x < target_width; x++) {
float px = x_ratio * x;
@ -1654,7 +1654,7 @@ bool clip_image_preprocess(struct clip_ctx * ctx, const clip_image_u8 * img, std
// printf("patch %d: %d %d\n", i, patches[i]->nx, patches[i]->ny);
clip_image_u8_free(patches[i]);
}
clip_image_u8_free(temp);
return true;
@ -2009,4 +2009,4 @@ int clip_n_patches(const struct clip_ctx * ctx) {
size_t clip_embd_nbytes(const struct clip_ctx * ctx) {
return clip_n_patches(ctx) * clip_n_mmproj_embd(ctx) * sizeof(float);
}
}

View file

@ -156,4 +156,4 @@ if len(first_mm_tensors) > 0:
print("Done!")
print(f"Now you can convert {args.model} to a a regular LLaMA GGUF file.")
print(f"Also, use {args.model}/llava.projector to prepare a llava-encoder.gguf file.")
print(f"Also, use {args.model}/llava.projector to prepare a llava-encoder.gguf file.")