File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,7 @@ int main(int argc, char ** argv) {
308308 }
309309 g_is_generating = true ;
310310 if (line.find (" /image" ) == 0 ) {
311- std::string image = line.substr (7 );
311+ std::string image = ( line.size ()>= 7 ) ? line. substr (7 ) : " " ;
312312 images_fname.push_back (string_strip (image));
313313 content += " <__image__>" ;
314314 continue ;
Original file line number Diff line number Diff line change @@ -590,7 +590,7 @@ int32_t mtmd_helper_eval(mtmd_context * ctx,
590590 }
591591
592592 } else if (chunk.type == MTMD_INPUT_CHUNK_TYPE_IMAGE) {
593- GGML_ASSERT (!is_last && " logits for last image chunk is not yet support " );
593+ GGML_ASSERT (!is_last && " logits for last image chunk is not yet supported " );
594594 GGML_ASSERT (chunk.tokens_image != nullptr );
595595 int64_t t0 = ggml_time_ms ();
596596 if (ctx->print_timings ) {
You can’t perform that action at this time.
0 commit comments