|
3 | 3 | // I'll gradually clean and extend it
|
4 | 4 | // Note: Even when using identical normalized image inputs (see normalize_image_u8_to_f32()) we have a significant difference in resulting embeddings compared to pytorch
|
5 | 5 | #include "clip.h"
|
6 |
| -#include "common.h" |
7 | 6 | #include "log.h"
|
8 | 7 | #include "ggml.h"
|
9 | 8 | #include "ggml-alloc.h"
|
@@ -1485,8 +1484,7 @@ struct clip_ctx * clip_model_load(const char * fname, const int verbosity = 1) {
|
1485 | 1484 | new_clip->compute_alloc = ggml_gallocr_new(ggml_backend_get_default_buffer_type(new_clip->backend));
|
1486 | 1485 | clip_image_f32_batch batch;
|
1487 | 1486 | batch.size = 1;
|
1488 |
| - ggml_cgraph * gf = clip_image_build_graph(new_clip, &batch, nullptr, false); |
1489 |
| - LOG_TEE("%s: flag\n", __func__); |
| 1487 | + ggml_cgraph * gf = clip_image_build_graph(new_clip, &batch, nullptr, false); |
1490 | 1488 | ggml_gallocr_reserve(new_clip->compute_alloc, gf);
|
1491 | 1489 | size_t compute_memory_buffer_size = ggml_gallocr_get_buffer_size(new_clip->compute_alloc, 0);
|
1492 | 1490 | LOG_TEE("%s: compute allocated memory: %.2f MB\n", __func__, compute_memory_buffer_size /1024.0/1024.0);
|
@@ -2608,7 +2606,7 @@ int clip_n_mmproj_embd(const struct clip_ctx * ctx) {
|
2608 | 2606 | throw std::runtime_error(format("%s: don't support projector with: %s currently\n", __func__, proj_type.c_str()));
|
2609 | 2607 | }
|
2610 | 2608 |
|
2611 |
| -int clip_is_minicpmv(const struct clip_ctx * ctx) { |
| 2609 | +int clip_is_minicpmv(const struct clip_ctx * ctx) { |
2612 | 2610 | if (ctx->has_minicpmv_projector) {
|
2613 | 2611 | return ctx->minicpmv_version;
|
2614 | 2612 | }
|
|
0 commit comments