[model-gateway] add qwen2.5_vl model image processor (#14375)

This commit is contained in:
Simo Lin
2025-12-03 12:51:30 -08:00
committed by GitHub
parent 03575ce38d
commit 8ab5d8b40d
2 changed files with 16 additions and 0 deletions
@@ -265,6 +265,7 @@ impl ImageProcessorRegistry {
/// - `llava-next` -> LlavaNextProcessor
/// - `llava` -> LlavaProcessor (also matches llava-1.5, etc.)
/// - `qwen2-vl` -> Qwen2VLProcessor
/// - `qwen2.5-vl` -> Qwen2VLProcessor (same preprocessing as Qwen2-VL)
pub fn with_defaults() -> Self {
let mut registry = Self::new();
@@ -291,6 +292,20 @@ impl ImageProcessorRegistry {
Box::new(super::processors::Qwen2VLProcessor::new()),
);
// Register Qwen2.5-VL (uses identical preprocessing to Qwen2-VL)
registry.register(
"qwen2.5-vl",
Box::new(super::processors::Qwen2VLProcessor::new()),
);
registry.register(
"qwen2_5-vl",
Box::new(super::processors::Qwen2VLProcessor::new()),
);
registry.register(
"qwen2_5_vl",
Box::new(super::processors::Qwen2VLProcessor::new()),
);
registry
}
}
@@ -8,6 +8,7 @@
//! - **LLaVA 1.5** (`llava`): CLIP-based preprocessing with configurable aspect ratio
//! - **LLaVA-NeXT** (`llava`): Multi-crop anyres processing
//! - **Qwen2-VL** (`qwen2_vl`): Dynamic resolution with smart resizing
//! - **Qwen2.5-VL** (`qwen2_vl`): Same processor as Qwen2-VL (identical preprocessing)
pub mod llava;
pub mod qwen2_vl;