From ed8f87c963b8a5bc782352f8b928089ea59af47d Mon Sep 17 00:00:00 2001 From: sukru tikves Date: Wed, 15 Jul 2026 13:50:14 -0700 Subject: [PATCH] Fix Qwen3-VL normalization: use 0.5/0.5/0.5 from checkpoint The qwen3-vl VLMSpec hardcoded OpenAI-CLIP normalization stats, but Qwen3-VL checkpoints specify image_mean=image_std=[0.5, 0.5, 0.5]. This caused a silent ~1.86x overscale on every pixel fed to the vision encoder. Fixes #82. --- python/src/coreai_models/vlm/export.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/coreai_models/vlm/export.py b/python/src/coreai_models/vlm/export.py index e0dc1f7..dab6d16 100644 --- a/python/src/coreai_models/vlm/export.py +++ b/python/src/coreai_models/vlm/export.py @@ -81,8 +81,8 @@ def num_visual_tokens(self) -> int: patch_size=16, spatial_merge_size=2, temporal_patch_size=2, # Qwen frames-per-image (single image -> duplicated) - image_mean=(0.48145466, 0.4578275, 0.40821073), - image_std=(0.26862954, 0.26130258, 0.27577711), + image_mean=(0.5, 0.5, 0.5), + image_std=(0.5, 0.5, 0.5), rescale_factor=1.0, ), }