[Optimization] Deduplicate shared image/video utilities across VL processors (#6988)

* step1~3

* fix import path

* 删除重复代码

* 删除重复代码

* 删除重复代码

* fix import path

* update

* fix import path

* add unit test

* fix

* update

* fix unit test
This commit is contained in:
luukunn
2026-03-26 09:49:33 +08:00
committed by GitHub
parent 1502b6f43e
commit d5cb2767d7
16 changed files with 882 additions and 593 deletions
@@ -22,14 +22,16 @@ from PIL import Image
from fastdeploy.input.ernie4_5_vl_processor.image_preprocessor.image_preprocessor_adaptive import (
AdaptiveImageProcessor,
make_batched_images,
make_batched_videos,
)
from fastdeploy.input.image_processors.common import (
ceil_by_factor,
floor_by_factor,
is_scaled_image,
make_batched_images,
make_batched_videos,
round_by_factor,
smart_resize,
)
from fastdeploy.input.image_processors.common import smart_resize_qwen as smart_resize
class TestImagePreprocessorAdaptive(unittest.TestCase):