From 7e1370694f18f03cd6e6b84330c9531c6295ff38 Mon Sep 17 00:00:00 2001 From: Xuan Son Nguyen Date: Fri, 7 Aug 2026 15:38:49 +0200 Subject: [PATCH] nits --- tools/mtmd/clip.cpp | 2 +- tools/mtmd/mtmd-image.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/mtmd/clip.cpp b/tools/mtmd/clip.cpp index 51859cd8c6..17e60b6ba2 100644 --- a/tools/mtmd/clip.cpp +++ b/tools/mtmd/clip.cpp @@ -1596,7 +1596,7 @@ struct clip_model_loader { if (hparams.image_longest_edge == 0) { hparams.image_longest_edge = 3024; } - hparams.set_limit_image_tokens(); + // note: the step3vl preprocessor slices based on a fixed window grid, so it does not support custom min/max image tokens hparams.warmup_image_size = hparams.image_size; } break; case PROJECTOR_TYPE_YOUTUVL: diff --git a/tools/mtmd/mtmd-image.cpp b/tools/mtmd/mtmd-image.cpp index 6f2a3784cd..073d83d453 100644 --- a/tools/mtmd/mtmd-image.cpp +++ b/tools/mtmd/mtmd-image.cpp @@ -141,9 +141,9 @@ struct img_tool { struct calc_size_opt { int align_size = 1; - int min_pixels = 0; - int max_pixels = 0; - // if longest_edge > 0, both longest_edge and min/max_pixels will be respected + int min_pixels = 0; // 0 = disabled + int max_pixels = 0; // 0 = disabled + // applied before min/max_pixels, so min_pixels can push an edge back above longest_edge int longest_edge = 0; // 0 = disabled };