MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / mtmd_debug_encode_impl

Function mtmd_debug_encode_impl

tools/mtmd/mtmd.cpp:1413–1426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1411//
1412
1413static void mtmd_debug_encode_impl(mtmd_context * ctx, clip_ctx * ctx_clip, clip_image_f32 & image) {
1414 clip_set_debug_output_embeddings(ctx_clip, true);
1415 int n_mmproj_embd = clip_n_mmproj_embd(ctx_clip);
1416 int n_tokens = clip_n_output_tokens(ctx_clip, &image);
1417 std::vector<float> embd_output(n_tokens * n_mmproj_embd, 0.0f);
1418 bool ok = clip_image_encode(
1419 ctx_clip,
1420 ctx->n_threads,
1421 &image,
1422 embd_output.data());
1423 if (!ok) {
1424 LOG_ERR("%s: failed to encode image\n", __func__);
1425 }
1426}
1427
1428void mtmd_debug_encode_image(mtmd_context * ctx, const std::vector<std::vector<float>> & image) {
1429 if (!ctx->ctx_v) {

Callers 2

mtmd_debug_encode_imageFunction · 0.85
mtmd_debug_encode_audioFunction · 0.85

Calls 5

clip_n_mmproj_embdFunction · 0.85
clip_n_output_tokensFunction · 0.85
clip_image_encodeFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected