THUDM / GLM-4

GLM-4 series: Open Multilingual Multimodal Chat LMs | 开源多语言多模态对话模型
Apache License 2.0
4.74k stars 385 forks source link

glm4v请问怎么支持多张图片 #518

Closed achial closed 1 month ago

achial commented 1 month ago

System Info / 系統信息

123

Who can help? / 谁可以帮助到您?

@zRzRzRzRzRzRzR

Information / 问题信息

Reproduction / 复现过程

兄弟,我这里输入两张图片提示我不支持多张图片,请问怎么才能同时支持两页的pdf+一句提示词

代码 inputs = tokenizer.apply_chat_template([{"role": "user", "image": image, "content": query},{"role": "user", "image": image2, "content": content}], add_generation_prompt=True, tokenize=True, return_tensors="pt", return_dict=True) # chat mode

报错 File "/root/.cache/huggingface/modules/transformers_modules/glm-4v-9b/tokenization_chatglm.py", line 209, in handle_single_conversation assert input_image is None, "Multiple images are not supported" AssertionError: Multiple images are not supported

Expected behavior / 期待表现

请问怎么才能同时支持两页的pdf+一句提示词

zhipuch commented 1 month ago

暂时只支持一张图片

achial commented 1 month ago

暂时只支持一张图片

好吧,谢啦