You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
during the running of demo.py, when i upload the picture, and chat with the model, it raised error
PS D:\Courses\gitHub Projects\MiniGPT4main> python demo.py --cfg-path eval_configs/minigpt4_eval.yaml --gpu-id 0
bin C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\bitsandbytes\libbitsandbytes_cuda118.dll
Initializing Chat
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:30<00:00, 15.40s/it]
Loading Q-Former
C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\huggingface_hub\file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
warnings.warn(
Loading Q-Former Done
Load MiniGPT-4 Checkpoint: D:\Courses\gitHub Projects\MiniGPT4main\pretrained_minigptv\prerained_minigpt4_7b.pth
Initialization Finished
D:\Courses\gitHub Projects\MiniGPT4main\demo.py:171: GradioDeprecationWarning: The `enable_queue` parameter has been deprecated. Please use the `.queue()` method instead. demo.launch(share=True, enable_queue=True)Running on local URL: http://127.0.0.1:7860Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.IMPORTANT: You are using gradio version 3.47.1, however version 4.29.0 is available, please upgrade.--------C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\helpers.py:818: UserWarning: Using the update method is deprecated. Simply return a new object instead, e.g. `return gr.Textbox(...)` instead of `return gr.update(...)
warnings.warn(
C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\components\button.py:89: UserWarning: Using the update method is deprecated. Simply return a new object instead, e.g. `return gr.Button(...)` instead of `return gr.Button.update(...)`.
warnings.warn(
C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\helpers.py:818: UserWarning: Using the update method is deprecated. Simply return a new object instead, e.g. `return gr.Textbox(...)` instead of `return gr.update(...) warnings.warn(C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\components\image.py:193: UserWarning: Using the update method is deprecated. Simply return a new object instead, e.g. `return gr.Image(...)` instead of `return gr.Image.update(...)`. warnings.warn(C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\components\textbox.py:163: UserWarning: Using the update method is deprecated. Simply return a new object instead, e.g. `return gr.Textbox(...)` instead of `return gr.Textbox.update(...)`. warnings.warn(C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\components\button.py:89: UserWarning: Using the update method is deprecated. Simply return a new object instead, e.g. `return gr.Button(...)` instead of `return gr.Button.update(...)`. warnings.warn(Traceback (most recent call last): File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\queueing.py", line 406, in call_prediction output = await route_utils.call_process_api( File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api output = await app.get_blocks().process_api( File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\blocks.py", line 1554, in process_api result = await self.call_function( File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\blocks.py", line 1192, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\anyio\to_thread.py", line 56, in run_syncreturn await get_async_backend().run_sync_in_worker_thread( File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\anyio\_backends\_asyncio.py", line 2177, in run_sync_in_worker_threadreturn await future File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\anyio\_backends\_asyncio.py", line 859, in run result = context.run(func, *args) File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\gradio\utils.py", line 659, in wrapper response = f(*args, **kwargs) File "D:\Courses\gitHub Projects\MiniGPT4main\demo.py", line 112, in gradio_answer llm_message = chat.answer(conv=chat_state, File "D:\Courses\gitHub Projects\MiniGPT4main\minigpt4\conversation\conversation.py", line 186, in answer generation_dict = self.answer_prepare(conv, img_list, **kargs) File "D:\Courses\gitHub Projects\MiniGPT4main\minigpt4\conversation\conversation.py", line 162, in answer_prepare embs = self.model.get_context_emb(prompt, img_list) File "D:\Courses\gitHub Projects\MiniGPT4main\minigpt4\models\minigpt_base.py", line 77, in get_context_emb seg_embs = [self.embed_tokens(seg_t) forseg_tin seg_tokens] File "D:\Courses\gitHub Projects\MiniGPT4main\minigpt4\models\minigpt_base.py", line 77, in<listcomp> seg_embs = [self.embed_tokens(seg_t) forseg_tin seg_tokens] File "D:\Courses\gitHub Projects\MiniGPT4main\minigpt4\models\minigpt_base.py", line 314, in embed_tokens embeds = self.llama_model.base_model.embed_tokens(token_ids) File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_implreturn self._call_impl(*args, **kwargs) File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_implreturn forward_call(*args, **kwargs) File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\accelerate\hooks.py", line 165, in new_forward output = old_forward(*args, **kwargs) File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\torch\nn\modules\sparse.py", line 163, in forwardreturn F.embedding( File "C:\Users\12871\anaconda3\envs\minigptv\lib\site-packages\torch\nn\functional.py", line 2219, in embedding assert padding_idx < weight.size(0), "Padding_idx must be within num_embeddings"AssertionError: Padding_idx must be within num_embeddings
Screenshots
what's the cause of this problem, and how to solve it, help!
The text was updated successfully, but these errors were encountered:
Describe the bug
during the running of demo.py, when i upload the picture, and chat with the model, it raised error
Screenshots
what's the cause of this problem, and how to solve it, help!
The text was updated successfully, but these errors were encountered: