[model-gateway] add qwen3_vl model image processor (#14377)

This commit is contained in:
Simo Lin
2025-12-03 17:16:37 -08:00
committed by GitHub
parent 388151053d
commit d42c167bfd
8 changed files with 1272 additions and 346 deletions
@@ -266,6 +266,7 @@ impl ImageProcessorRegistry {
/// - `llava` -> LlavaProcessor (also matches llava-1.5, etc.)
/// - `qwen2-vl` -> Qwen2VLProcessor
/// - `qwen2.5-vl` -> Qwen2VLProcessor (same preprocessing as Qwen2-VL)
/// - `qwen3-vl` -> Qwen3VLProcessor (patch_size=16, [0.5,0.5,0.5] normalization)
pub fn with_defaults() -> Self {
let mut registry = Self::new();
@@ -282,6 +283,16 @@ impl ImageProcessorRegistry {
// Register standard LLaVA (matches llava-1.5, llava-v1.5, etc.)
registry.register("llava", Box::new(super::processors::LlavaProcessor::new()));
// Register Qwen3-VL first (more specific pattern - must match before qwen2)
registry.register(
"qwen3-vl",
Box::new(super::processors::Qwen3VLProcessor::new()),
);
registry.register(
"qwen3_vl",
Box::new(super::processors::Qwen3VLProcessor::new()),
);
// Register Qwen2-VL (matches Qwen/Qwen2-VL-*, etc.)
registry.register(
"qwen2-vl",