QwenLM / Qwen2-VL

Qwen2-VL is the multimodal large language model series developed by Qwen team, Alibaba Cloud.
Apache License 2.0
3.16k stars 195 forks source link

text[i] = text[i].replace("<|placeholder|>", "<|image_pad|>") AttributeError: 'list' object has no attribute 'replace' #256

Open wanlipeng opened 1 month ago

wanlipeng commented 1 month ago

messages=[ { "role": "user", "content": [ {"type": "image","image": f"{img_path}",}, {"type": "text", "text": f"Describe this image in detailed"}, ], } ],

@JianxinMa I would like to ask if this problem occurs when entering the local image path in the message. Have you ever encountered this problem?

wanlipeng commented 1 month ago

inputs = processor( File "/root/anaconda3/lib/python3.10/site-packages/transformers/models/qwen2_vl/processing_qwen2_vl.py", line 149, in call text[i] = text[i].replace("<|placeholder|>", "<|image_pad|>") AttributeError: 'list' object has no attribute 'replace'

kq-chen commented 1 month ago

Could you please share the more complete code?