File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1388,7 +1388,8 @@ namespace chatllm::qwen::vit
13881388 vis_config.merge_size = (int )pp_cfg[" merge_size" ].ToInt ();
13891389 vis_config.min_pixels = (int )pp_cfg[" min_pixels" ].ToInt ();
13901390 vis_config.max_patches = max_patches;
1391- vis_config.max_pixels = max_patches * vis_config.patch_size * vis_config.patch_size ;
1391+ vis_config.max_pixels = max_patches * vis_config.patch_size * vis_config.patch_size * vis_config.merge_size * vis_config.merge_size ;
1392+ vis_config.max_pixels = std::min (vis_config.max_pixels , (int )pp_cfg[" max_pixels" ].ToInt ());
13921393 }
13931394
13941395 const size_t tensor_ovhd = ggml_tensor_overhead ();
@@ -1529,7 +1530,7 @@ namespace chatllm::qwen::v2_5_vl
15291530 class ExtendEmbedding
15301531 {
15311532 public:
1532- ExtendEmbedding () : pad_arg(new BlockParams::PadEmbedding(4096 , 4096 )) {}
1533+ ExtendEmbedding () : pad_arg(new BlockParams::PadEmbedding(2048 , 2048 )) {}
15331534 public:
15341535 BlockParams::PadEmbedding *pad_arg = nullptr ;
15351536 };
You can’t perform that action at this time.
0 commit comments