InternVL icon indicating copy to clipboard operation
InternVL copied to clipboard

使用lmdeploy0.5.0部署internVL2-26B出现'NoneType' object has no attribute 'split'错误

Open WangJianQ-0118 opened this issue 2 years ago • 21 comments

具体报错细节如下: ERROR: Exception in ASGI application Traceback (most recent call last): File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 411, in run_asgi result = await app( # type: ignore[func-returns-value] File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in call return await self.app(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/applications.py", line 123, in call await self.middleware_stack(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in call raise exc File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in call await self.app(scope, receive, _send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/middleware/cors.py", line 85, in call await self.app(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/routing.py", line 756, in call await self.middleware_stack(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/routing.py", line 776, in app await route.handle(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle await self.app(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/routing.py", line 77, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app raise exc File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app await app(scope, receive, sender) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/starlette/routing.py", line 72, in app response = await func(request) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app raw_response = await run_endpoint_function( File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function return await dependant.call(**values) File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/lmdeploy/serve/openai/api_server.py", line 495, in chat_completions_v1 async for res in result_generator: File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 563, in generate prompt_input = await self._get_prompt_input(prompt, do_preprocess, File "/root/miniforge3/envs/Yi/lib/python3.10/site-packages/lmdeploy/serve/vl_async_engine.py", line 54, in _get_prompt_input segs = decorated.split(IMAGE_TOKEN) AttributeError: 'NoneType' object has no attribute 'split'

lmdeploy版本为0.5.0,使用0.4.2版本没有问题

WangJianQ-0118 avatar Jul 08 '24 09:07 WangJianQ-0118

Traceback (most recent call last): File "/home/thniu/Chart2Code/src/chart_synthesis/LLM_synthesis/MM_Text_LLM/infer.py", line 8, in response = pipe(('describe this image', image)) File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/vl_async_engine.py", line 118, in call return super().call(prompts, **kwargs) File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 304, in call return self.batch_infer(prompts, File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/vl_async_engine.py", line 104, in batch_infer return super().batch_infer(prompts, **kwargs) File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 428, in batch_infer _get_event_loop().run_until_complete(gather()) File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 425, in gather await asyncio.gather( File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 410, in _inner_call async for out in generator: File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 563, in generate prompt_input = await self._get_prompt_input(prompt, do_preprocess, File "/home/thniu/miniconda3/envs/internvl/lib/python3.10/site-packages/lmdeploy/serve/vl_async_engine.py", line 54, in _get_prompt_input segs = decorated.split(IMAGE_TOKEN) AttributeError: 'NoneType' object has no attribute 'split'

也有这个问题

nth2000 avatar Jul 09 '24 08:07 nth2000

相同的问题 版本 0.5.0

teddyliu01 avatar Jul 10 '24 02:07 teddyliu01

运行8b和2b同样出现这个问题,试了lmdeploy 0.4.2也不行

ShutupBee avatar Jul 10 '24 13:07 ShutupBee

+1

shiva-vardhineedi avatar Jul 12 '24 17:07 shiva-vardhineedi

guys rename your model to have Mini-InternVL-Chat-2B-V1-5 in the name... then it worked for me. on lmdeploy v0.5.0

shiva-vardhineedi avatar Jul 12 '24 18:07 shiva-vardhineedi

guys rename your model to have Mini-InternVL-Chat-2B-V1-5 in the name... then it worked for me. on lmdeploy v0.5.0

Thanks. We will release the official code and weights for lmdeploy.

whai362 avatar Jul 13 '24 18:07 whai362

请问你们解决这个问题了吗,我部署internVL2-8B也出现了这个报错

xylovezxy avatar Jul 15 '24 08:07 xylovezxy

Have you solved this problem? I also got this error when deploying internVL2-8B

将您的模型重命名为名称中包含 Mini-InternVL-Chat-2B-V1-5...然后它对我有用。在 lmdeploy v0.5.0 上

shiva-vardhineedi avatar Jul 15 '24 17:07 shiva-vardhineedi

没搞定呢

---- 回复的原邮件 ---- | 发件人 | @.> | | 发送日期 | 2024年07月15日 16:11 | | 收件人 | OpenGVLab/InternVL @.> | | 抄送人 | teddyliu @.>, Comment @.> | | 主题 | Re: [OpenGVLab/InternVL] 使用lmdeploy0.5.0部署internVL2-26B出现'NoneType' object has no attribute 'split'错误 (Issue #336) |

请问你们解决这个问题了吗,我部署internVL2-8B也出现了这个报错

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

teddyliu01 avatar Jul 15 '24 23:07 teddyliu01

上面说的方法好使

xylovezxy avatar Jul 16 '24 04:07 xylovezxy

guys rename your model to have Mini-InternVL-Chat-2B-V1-5 in the name... then it worked for me. on lmdeploy v0.5.0

Is the model output normal in this way? I think this might cause some configuration mismatches in the model, leading to abnormal output. My model produced token IDs that are not in the vocabulary.

Leoooooo123 avatar Jul 16 '24 08:07 Leoooooo123

有没有解决方案?

wufg2002 avatar Jul 19 '24 10:07 wufg2002

代码已经更新,可以拉取新的代码,注意环境严格对齐

ErfeiCui avatar Jul 24 '24 09:07 ErfeiCui

代码已经更新,可以拉取新的代码,注意环境严格对齐

我用minicppm v2.5也是报这个错

lyc728 avatar Jul 26 '24 08:07 lyc728

升级lmdeploy到0.5.1及以上的版本即可正常运行

czczup avatar Jul 31 '24 06:07 czczup

收到。谢谢

---原始邮件--- 发件人: "Zhe @.> 发送时间: 2024年7月31日(周三) 下午2:41 收件人: @.>; 抄送: @.@.>; 主题: Re: [OpenGVLab/InternVL] 使用lmdeploy0.5.0部署internVL2-26B出现'NoneType' object has no attribute 'split'错误 (Issue #336)

Closed #336 as completed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

wufg2002 avatar Jul 31 '24 09:07 wufg2002

请问我没有指定版本,自动安装了0.7.3,运行 OpenGVLab/InternVL3-1B,不是同一个位置但是很相似,要怎么处理? raceback (most recent call last): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/applications.py", line 112, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call await self.app(scope, receive, _send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in call await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 714, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 734, in app await route.handle(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 74, in app await response(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 262, in call with collapse_excgroups(): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 266, in wrap await func() File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 246, in stream_response async for chunk in self.body_iterator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/openai/api_server.py", line 431, in completion_stream_generator async for res in result_generator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/async_engine.py", line 665, in generate prompt_input = await self._get_prompt_input(prompt, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/vl_async_engine.py", line 85, in _get_prompt_input results = await self.vl_encoder.wrap_for_turbomind(results, chat_template, self.tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/engine.py", line 103, in wrap_for_turbomind result = self.model.to_turbomind(messages, chat_template, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/internvl.py", line 257, in to_turbomind return self.to_turbomind_aux(messages, prompt, IMAGE_TOKEN, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/base.py", line 221, in to_turbomind_aux segs = prompt.split(IMAGE_TOKEN) ^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split'

youyan007 avatar Apr 22 '25 06:04 youyan007

lmdeploy0.7.0,部署 OpenGVLab/InternVL3-32B-AWQ,报上述一摸一样的错误,请问要怎么解决 INFO: 120.0.0.1:44988 - "POST /v1/chat/completions HTTP/1.1" 500 Internal Server Error ERROR: Exception in ASGI application Traceback (most recent call last): File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/applications.py", line 113, in call await self.middleware_stack(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call raise exc File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call await self.app(scope, receive, _send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/middleware/cors.py", line 93, in call await self.simple_response(scope, receive, send, request_headers=headers) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/middleware/cors.py", line 144, in simple_response await self.app(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/routing.py", line 715, in call await self.middleware_stack(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/routing.py", line 735, in app await route.handle(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) ^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app raw_response = await run_endpoint_function( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function return await dependant.call(**values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/lmdeploy/serve/openai/api_server.py", line 491, in chat_completions_v1 async for res in result_generator: File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/lmdeploy/serve/async_engine.py", line 693, in generate prompt_input = await self._get_prompt_input(prompt, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/lmdeploy/serve/vl_async_engine.py", line 100, in _get_prompt_input results = await self.vl_encoder.wrap_for_turbomind( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/lmdeploy/vl/engine.py", line 110, in wrap_for_turbomind result = self.model.to_turbomind(messages, chat_template, tokenizer, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/lmdeploy/vl/model/internvl.py", line 289, in to_turbomind return self.to_turbomind_aux(messages, prompt, IMAGE_TOKEN, tokenizer, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/miniforge3/envs/lmdeploy-base/lib/python3.11/site-packages/lmdeploy/vl/model/base.py", line 219, in to_turbomind_aux segs = prompt.split(IMAGE_TOKEN) ^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split'

请问我没有指定版本,自动安装了0.7.3,运行 OpenGVLab/InternVL3-1B,不是同一个位置但是很相似,要怎么处理? raceback (most recent call last): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/applications.py", line 112, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call await self.app(scope, receive, _send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in call await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 714, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 734, in app await route.handle(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 74, in app await response(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 262, in call with collapse_excgroups(): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 266, in wrap await func() File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 246, in stream_response async for chunk in self.body_iterator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/openai/api_server.py", line 431, in completion_stream_generator async for res in result_generator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/async_engine.py", line 665, in generate prompt_input = await self._get_prompt_input(prompt, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/vl_async_engine.py", line 85, in _get_prompt_input results = await self.vl_encoder.wrap_for_turbomind(results, chat_template, self.tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/engine.py", line 103, in wrap_for_turbomind result = self.model.to_turbomind(messages, chat_template, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/internvl.py", line 257, in to_turbomind return self.to_turbomind_aux(messages, prompt, IMAGE_TOKEN, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/base.py", line 221, in to_turbomind_aux segs = prompt.split(IMAGE_TOKEN) ^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split'

C137-log avatar Apr 24 '25 06:04 C137-log

请问我没有指定版本,自动安装了0.7.3,运行 OpenGVLab/InternVL3-1B,不是同一个位置但是很相似,要怎么处理? raceback (most recent call last): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/applications.py", line 112, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call await self.app(scope, receive, _send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in call await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 714, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 734, in app await route.handle(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 74, in app await response(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 262, in call with collapse_excgroups(): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 266, in wrap await func() File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 246, in stream_response async for chunk in self.body_iterator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/openai/api_server.py", line 431, in completion_stream_generator async for res in result_generator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/async_engine.py", line 665, in generate prompt_input = await self._get_prompt_input(prompt, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/vl_async_engine.py", line 85, in _get_prompt_input results = await self.vl_encoder.wrap_for_turbomind(results, chat_template, self.tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/engine.py", line 103, in wrap_for_turbomind result = self.model.to_turbomind(messages, chat_template, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/internvl.py", line 257, in to_turbomind return self.to_turbomind_aux(messages, prompt, IMAGE_TOKEN, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/base.py", line 221, in to_turbomind_aux segs = prompt.split(IMAGE_TOKEN) ^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split'

你好请问有解决吗

C137-log avatar Apr 24 '25 06:04 C137-log

请问我没有指定版本,自动安装了0.7.3,运行 OpenGVLab/InternVL3-1B,不是同一个位置但是很相似,要怎么处理? raceback (most recent call last): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 403, in run_asgi result = await app( # type: ignore[func-returns-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 60, in call return await self.app(scope, receive, send) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in call await super().call(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/applications.py", line 112, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 187, in call raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/errors.py", line 165, in call await self.app(scope, receive, _send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in call await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in call await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 714, in call await self.middleware_stack(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 734, in app await route.handle(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/routing.py", line 74, in app await response(scope, receive, send) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 262, in call with collapse_excgroups(): File "/root/anaconda3/envs/lmdeploy/lib/python3.11/contextlib.py", line 158, in exit self.gen.throw(typ, value, traceback) File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/_utils.py", line 82, in collapse_excgroups raise exc File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 266, in wrap await func() File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/starlette/responses.py", line 246, in stream_response async for chunk in self.body_iterator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/openai/api_server.py", line 431, in completion_stream_generator async for res in result_generator: File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/async_engine.py", line 665, in generate prompt_input = await self._get_prompt_input(prompt, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/serve/vl_async_engine.py", line 85, in _get_prompt_input results = await self.vl_encoder.wrap_for_turbomind(results, chat_template, self.tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/engine.py", line 103, in wrap_for_turbomind result = self.model.to_turbomind(messages, chat_template, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/internvl.py", line 257, in to_turbomind return self.to_turbomind_aux(messages, prompt, IMAGE_TOKEN, tokenizer, sequence_start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/anaconda3/envs/lmdeploy/lib/python3.11/site-packages/lmdeploy/vl/model/base.py", line 221, in to_turbomind_aux segs = prompt.split(IMAGE_TOKEN) ^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'split'

你好请问有解决吗

我是加了一个 --chat-template internvl2_5就好了

StevenTan avatar Apr 28 '25 03:04 StevenTan