sgl-project/sglang
在 GitHub 查看[Feature] Implement Image Number Limitation for Image Processors
Open
#8,540 创建于 2025年7月29日
Multi-modalgood first issue
仓库指标
- Star
- (28,442 star)
- PR 合并指标
- (平均合并 2天 1小时) (30 天内合并 1,000 个 PR)
描述
Checklist
- 1. If the issue you raised is not a feature but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
- 2. Please use English, otherwise it will be closed.
Motivation
At present, there is no limitation on the number of images during the processing of mm data. It is necessary to impose such a limitation to prevent potential OOM and other problems.
(When using fast image processor, the GPU memory usage is roughly 1GiB for each 4K image)
Related resources
Implementation Steps:
- Define a constant, such as
IMAGE_NUM_LIMITATION = 5, for each processor. - Modify the
baseprocessorto utilize this constant for request validation. - Incorporate a server argument to enable modification of this numerical value.
In case you lack familiarity with the mm data processing pipeline, it is advisable to first refer to here