1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Qwen2.5VL multi-image inference: CPU memory leaks until OOM

Discussão em 'Python' iniciado por Stack, Setembro 8, 2025.

  1. Stack

    Stack Membro Participativo

    Using QwenVL for multi-image inference, I'm facing a critical issue: CPU memory rises gradually with each inference until OOM. gc.collect() doesn't help. With tracemalloc, the top memory hog is in QwenVL's preprocessing (from transformers 4.51.0):

    pixel_values = np.array(pixel_values) # https://github.com/huggingface/transformers/blob/main/src/transformers/models/qwen2_vl/image_processing_qwen2_vl.py#L226


    [​IMG] [​IMG]

    This line converts a list of image patches (collected via extend() for multiple images) into a numpy array. Memory isn't released post-inference, causing accumulation. Using vllm 0.8.3. Any ideas why this persists or fixes?

    Continue reading...

Compartilhe esta Página