mtmd : resize Gemma 4 images without letterbox padding (#30922)

* mtmd : resize Gemma 4 images without letterbox padding

* Apply suggestion from @ngxson

---------

Co-authored-by: Xuan-Son Nguyen <thichthat@gmail.com>
This commit is contained in:
boshandXuan-Son Nguyen authored and GitHub committed 2026-10-31 18:55:33 +01:00
1 parent 0ec4027a2a
commit 7bd1808308
1 file changed
+1
+1
View File
@@ -1842,6 +1842,7 @@ struct clip_model_loader {
log_ffn_op = "gelu";
hparams.n_merge = 3; // pooling_kernel_size
hparams.image_resize_algo = RESIZE_ALGO_BICUBIC;
hparams.image_resize_pad = PAD_NONE;
get_u32(KEY_PROJ_SCALE_FACTOR, hparams.n_merge, false);
if (model.proj_type == PROJECTOR_TYPE_GEMMA4UV) {
// for "unified" variant, we directly use a bigger patch size, because the "token merging" is done directly on conv layer