We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d81b4de commit 489bb15Copy full SHA for 489bb15
lmdeploy/vl/model/internvl.py
@@ -240,6 +240,8 @@ def proc_messages(
240
continue
241
n_images = len([1 for x in message['content'] if x['type'] == 'image'])
242
content = [x.get('text', '') for x in message['content'] if x['type'] == 'text']
243
+ if len(content) == 0:
244
+ content.append('')
245
prompt = content[0]
246
if IMAGE_TOKEN in prompt and f'<img>{IMAGE_TOKEN}' not in prompt:
247
prompt = prompt.replace(f'{IMAGE_TOKEN}', f'<img>{IMAGE_TOKEN}</img>')
0 commit comments