diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp index 7a7374cd8..56d3fd0af 100644 --- a/examples/llava/clip.cpp +++ b/examples/llava/clip.cpp @@ -1277,7 +1277,7 @@ void bilinear_resize(const clip_image_u8& src, clip_image_u8& dst, int target_wi float x_ratio = static_cast(src.nx - 1) / target_width; float y_ratio = static_cast(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); -} \ No newline at end of file +} diff --git a/examples/llava/llava-surgery-v2.py b/examples/llava/llava-surgery-v2.py index e94d10a55..f0ade4ceb 100644 --- a/examples/llava/llava-surgery-v2.py +++ b/examples/llava/llava-surgery-v2.py @@ -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.") \ No newline at end of file +print(f"Also, use {args.model}/llava.projector to prepare a llava-encoder.gguf file.")