Skip to content

Commit edfb440

Browse files
authored
server : fix processing of multiple back-to-back mtmd chunks (#21107)
1 parent 3d66da1 commit edfb440

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/server/server-context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2493,7 +2493,7 @@ struct server_context_impl {
24932493
bool has_mtmd = false;
24942494

24952495
// check if we should process the image
2496-
if (slot.prompt.n_tokens() < slot.task->n_tokens() && input_tokens[slot.prompt.n_tokens()] == LLAMA_TOKEN_NULL) {
2496+
while (slot.prompt.n_tokens() < slot.task->n_tokens() && input_tokens[slot.prompt.n_tokens()] == LLAMA_TOKEN_NULL) {
24972497
// process the image
24982498
size_t n_tokens_out = 0;
24992499
int32_t res = input_tokens.process_chunk(ctx, mctx, slot.prompt.n_tokens(), slot.prompt.tokens.pos_next(), slot.id, n_tokens_out);

0 commit comments

Comments
 (0)