Skip to content

Conversation

@lvhan028
Copy link
Collaborator

@lvhan028 lvhan028 commented Nov 20, 2025

from lmdeploy import pipeline, PytorchEngineConfig

messages = [
        dict(role='user', content=[
            dict(type='text', text='Describe the following images in detail'),
            dict(type='image_url', image_url=dict(url='https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')),
            dict(type='image_url', image_url=dict(url='https://raw.githubusercontent.com/open-mmlab/mmdeploy/main/tests/data/tiger.jpeg')),
            dict(type='text', text='How many tigers are there in total?')
        ]),
    ]

with pipeline('internlm/Intern-S1-mini', backend_config=PytorchEngineConfig()) as pipe:
    res = pipe(messages)
    print(res)

Also fix #4145

Comment on lines +500 to +503
if self.routed_experts is None:
fields.append('routed_experts=None')
else:
fields.append(f'routed_experts.shape={self.routed_experts.shape}')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RunningLeon any concern of using _format_tensor(self.routed_experts)?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually routed_experts could be np.ndarray, str, None. So here we may need to handle str as well.

@lvhan028 lvhan028 requested a review from RunningLeon November 25, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 0.10.1版本多模态大模型请求报文中未送任何text提示词时会直接报错。0.10.2版本也未解决。

3 participants