mtmd : fix padding of n_tokens (#19930)

This commit is contained in:
Georgi Gerganov
2026-02-26 18:39:49 +02:00
committed by GitHub
parent 01cd448b8c
commit 37964f44f9
+1 -1
View File
@@ -248,7 +248,7 @@ int32_t mtmd_helper_decode_image_chunk(
int32_t n_tokens = mtmd_input_chunk_get_n_tokens(chunk);
int32_t i_batch = 0;
int32_t n_img_batches = GGML_PAD(n_tokens, n_batch) / n_batch;
int32_t n_img_batches = (n_tokens + n_batch - 1) / n_batch;
decode_embd_batch batch_embd(encoded_embd, n_tokens, n_pos_per_embd, n_mmproj_embd);
if (mtmd_decode_use_mrope(ctx)) {