File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1909,16 +1909,20 @@ struct clip_model_loader {
1909
1909
} break ;
1910
1910
case PROJECTOR_TYPE_QWEN2VL:
1911
1911
{
1912
- // max image size = sqrt(max_pixels)
1913
- // https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct/blob/main/preprocessor_config.json
1914
- hparams.image_size = 3584 ;
1912
+ // max image size = sqrt(max_pixels) = 3584
1913
+ // ref: https://huggingface.co/Qwen/Qwen2-VL-7B-Instruct/blob/main/preprocessor_config.json
1914
+ // however, the model use unreasonable memory past 1024 size, we force it to 1024 otherwise it's unusable
1915
+ // ref: https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct/discussions/10
1916
+ hparams.image_size = 1024 ;
1915
1917
hparams.warmup_image_size = hparams.patch_size * 8 ;
1916
1918
} break ;
1917
1919
case PROJECTOR_TYPE_QWEN25VL:
1918
1920
{
1919
1921
// max image size = sqrt(max_pixels)
1920
1922
// https://huggingface.co/Qwen/Qwen2.5-VL-7B-Instruct/blob/main/preprocessor_config.json
1921
- hparams.image_size = 3584 ;
1923
+ // however, the model use unreasonable memory past 1024 size, we force it to 1024 otherwise it's unusable
1924
+ // ref: https://huggingface.co/Qwen/Qwen2-VL-2B-Instruct/discussions/10
1925
+ hparams.image_size = 1024 ;
1922
1926
hparams.warmup_image_size = hparams.patch_size * 8 ;
1923
1927
get_u32 (KEY_WIN_ATTN_PATTERN, hparams.n_wa_pattern );
1924
1928
} break ;
You can’t perform that action at this time.
0 commit comments