sgl-project/sglang

[Feature] Implement Image Number Limitation for Image Processors

Open

#8540 aperta il 29 lug 2025

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Python (6216 fork)auto 404
Multi-modalgood first issue

Metriche repository

Star
 (28.442 star)
Metriche merge PR
 (Merge medio 2g 1h) (1000 PR mergiate in 30 g)

Descrizione

Checklist

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:

  1. Define a constant, such as IMAGE_NUM_LIMITATION = 5, for each processor.
  2. Modify the baseprocessor to utilize this constant for request validation.
  3. 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

Guida contributor