mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-31 00:36:20 +08:00
compute_image_layout clamps the width only when width > height * max_wh_ratio, but ImageProcessorAnyRes._is_stretched treated width >= height * max_wh_ratio as stretched. An image whose ratio is exactly at the limit was therefore not clamped by the layout yet still resized by stretching, which distorts it by the patch-alignment rounding (e.g. 800x100 -> 812x112 squeezes the aspect from 8.0 to 7.25), while a one-pixel narrower image kept its aspect ratio. Share one predicate between the layout clamp and the resize so the two cannot drift apart, and cover the boundary with a CPU-only regression test. |
||
|---|---|---|
| .. | ||
| _C | ||
| distributed | ||
| engine | ||
| entrypoints | ||
| hugging_face | ||
| model_executor | ||
| npu_ops | ||
| structure_output | ||
| ve | ||
| worker | ||
| __init__.py | ||
| attrdict.py | ||
| config.py | ||
| environ.py | ||
| load_class.py | ||
| logger.py | ||
| model_config_loader.py | ||
| multimodal_tokens.py | ||
| platform.py | ||
| py.typed | ||
| sampling_params.py | ||
| sequence.py | ||
| shared_memory.py | ||
| testing.py | ||
| timer.py | ||
| utils.py | ||