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

Function mtmd_debug_encode_image

tools/mtmd/mtmd.cpp:1428–1442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1426}
1427
1428void mtmd_debug_encode_image(mtmd_context * ctx, const std::vector<std::vector<float>> & image) {
1429 if (!ctx->ctx_v) {
1430 LOG_ERR("%s: model does not support vision input\n", __func__);
1431 return;
1432 }
1433 clip_image_f32 inp_image;
1434 inp_image.nx = image.size();
1435 inp_image.ny = inp_image.nx;
1436 inp_image.buf.reserve(inp_image.nx * inp_image.ny);
1437 for (const auto & row : image) {
1438 inp_image.buf.insert(inp_image.buf.end(), row.begin(), row.end());
1439 }
1440 LOG_INF("%s: created input image with nx=%d, ny=%d\n", __func__, inp_image.nx, inp_image.ny);
1441 mtmd_debug_encode_impl(ctx, ctx->ctx_v, inp_image);
1442}
1443
1444void mtmd_debug_encode_audio(mtmd_context * ctx, const std::vector<float> & input) {
1445 if (!ctx->ctx_a) {

Callers 1

mainFunction · 0.85

Calls 5

mtmd_debug_encode_implFunction · 0.85
endMethod · 0.80
sizeMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected