haotian-liu / LLaVA

[NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond.
https://llava.hliu.cc
Apache License 2.0
20.04k stars 2.21k forks source link

[Usage] problem with process_images function in then mm_utils.py #1324

Open rak55 opened 7 months ago

rak55 commented 7 months ago

Describe the issue

Issue: The function is not returning tensors for some images (based on size). I have two images (one for demonstration and one query image) and I get different number of patches for each image. As a result, a list is returned instead of a tensor from torch.stack function. How do I resolve this?

Log:

AttributeError: 'list' object has no attribute 'to'

SakuraTroyChen commented 6 months ago

I have the same problem too.

HuangZhen02 commented 6 months ago

same problem