@@ -170,6 +170,9 @@ def test_qwen3_moe_maps_to_supported_decoder_type(self):
170170 # fallback still supplies the Qwen3 reasoning-token IDs.
171171 assert _resolve_ort_genai_model_type ("qwen3_moe" ) == "qwen3"
172172
173+ def test_qwen25_text_subconfig_maps_to_multimodal_runtime (self ):
174+ assert _resolve_ort_genai_model_type ("qwen2_5_vl_text" ) == "qwen2_5_vl"
175+
173176 def test_gemma4_unified_model_types (self ):
174177 # The gemma-4-12B unified checkpoint (model_type "gemma4_unified")
175178 # reuses the multimodal "gemma4" ORT GenAI pipeline; its standalone
@@ -329,6 +332,43 @@ def test_writes_transform_pipeline(self, tmp_path):
329332 assert len (norm_attrs ["mean" ]) == 3
330333 assert len (norm_attrs ["std" ]) == 3
331334
335+ def test_qwen25_text_config_writes_packed_patch_processor (self , tmp_path ):
336+ vision = types .SimpleNamespace (
337+ image_size = 448 ,
338+ patch_size = 14 ,
339+ spatial_merge_size = 2 ,
340+ model_type = "qwen2_5_vl" ,
341+ )
342+ config = types .SimpleNamespace (
343+ vision = vision ,
344+ model_type = "qwen2_5_vl_text" ,
345+ spatial_merge_size = 2 ,
346+ temporal_patch_size = 2 ,
347+ )
348+
349+ path = _write_vision_processor_config (config , str (tmp_path ))
350+
351+ assert path is not None
352+ with open (path ) as f :
353+ data = json .load (f )
354+ assert data ["processor" ]["name" ] == "qwen2_5_image_processor"
355+ transforms = data ["processor" ]["transforms" ]
356+ assert transforms [- 1 ]["operation" ] == {
357+ "name" : "patch_image" ,
358+ "type" : "PatchImage" ,
359+ "attrs" : {
360+ "patch_size" : 14 ,
361+ "temporal_patch_size" : 2 ,
362+ "merge_size" : 2 ,
363+ },
364+ }
365+ normalize = next (
366+ transform ["operation" ]
367+ for transform in transforms
368+ if transform ["operation" ]["type" ] == "Normalize"
369+ )
370+ assert normalize ["attrs" ]["qwen2_5_vl" ] == 1
371+
332372 def test_mage_vl_writes_packed_patch_processor (self , tmp_path ):
333373 vision = types .SimpleNamespace (
334374 image_size = 448 ,
0 commit comments