mbzuai-oryx / Video-ChatGPT

[ACL 2024 🔥] Video-ChatGPT is a video conversation model capable of generating meaningful conversation about videos. It combines the capabilities of LLMs with a pretrained visual encoder adapted for spatiotemporal video representation. We also introduce a rigorous 'Quantitative Evaluation Benchmarking' for video-based conversational models.
https://mbzuai-oryx.github.io/Video-ChatGPT
Creative Commons Attribution 4.0 International
1.05k stars 92 forks source link

I encountered an error while using "Run the Demo". #92

Closed ds-gong closed 3 months ago

ds-gong commented 3 months ago

hi,I encountered an error while using "Run the Demo". I understand that it may be a network issue. I downloaded the preprocessor_config.json file offline and placed it at "/openai/clip-vit-large-patch14/resolve/main/preprocessor_config.json" path. Here is the specific information. How can we resolve this? system: ubuntu18.04 GPU: 2*2080TI driver: 530.41.03 cuda: 12.1

2024-03-13 11:44:07 | INFO | gradio_web_server | args: Namespace(host='0.0.0.0', port=None, controller_url='http://localhost:21001/', concurrency_count=8, model_list_mode='once', share=False, moderate=False, embed=False, model_name='/home/sean/wuzhe2/github/Video-ChatGPT/model', vision_tower_name='openai/clip-vit-large-patch14', conv_mode='video-chatgpt_v1', projection_path='/home/sean/wuzhe2/github/Video-ChatGPT/model') 2024-03-13 11:44:07 | INFO | gradio_web_server | Namespace(host='0.0.0.0', port=None, controller_url='http://localhost:21001/', concurrency_count=8, model_list_mode='once', share=False, moderate=False, embed=False, model_name='/home/sean/wuzhe2/github/Video-ChatGPT/model', vision_tower_name='openai/clip-vit-large-patch14', conv_mode='video-chatgpt_v1', projection_path='/home/sean/wuzhe2/github/Video-ChatGPT/model') You are using a model of type llava to instantiate a model of type VideoChatGPT. This is not supported for all configurations of models and can yield errors. Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s] Loading checkpoint shards: 50%|█████████████████████████████████████████████████████████ | 1/2 [00:04<00:04, 4.31s/it] Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:05<00:00, 2.70s/it] Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:05<00:00, 2.94s/it] 2024-03-13 11:44:13 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | Traceback (most recent call last): 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn 2024-03-13 11:44:23 | ERROR | stderr | sock = connection.create_connection( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection 2024-03-13 11:44:23 | ERROR | stderr | raise err 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection 2024-03-13 11:44:23 | ERROR | stderr | sock.connect(sa) 2024-03-13 11:44:23 | ERROR | stderr | OSError: [Errno 101] Network is unreachable 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | The above exception was the direct cause of the following exception: 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | Traceback (most recent call last): 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen 2024-03-13 11:44:23 | ERROR | stderr | response = self._make_request( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request 2024-03-13 11:44:23 | ERROR | stderr | raise new_e 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request 2024-03-13 11:44:23 | ERROR | stderr | self._validate_conn(conn) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn 2024-03-13 11:44:23 | ERROR | stderr | conn.connect() 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connection.py", line 616, in connect 2024-03-13 11:44:23 | ERROR | stderr | self.sock = sock = self._new_conn() 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn 2024-03-13 11:44:23 | ERROR | stderr | raise NewConnectionError( 2024-03-13 11:44:23 | ERROR | stderr | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f8b0fe87700>: Failed to establish a new connection: [Errno 101] Network is unreachable 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | The above exception was the direct cause of the following exception: 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | Traceback (most recent call last): 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/requests/adapters.py", line 486, in send 2024-03-13 11:44:23 | ERROR | stderr | resp = conn.urlopen( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen 2024-03-13 11:44:23 | ERROR | stderr | retries = retries.increment( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment 2024-03-13 11:44:23 | ERROR | stderr | raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] 2024-03-13 11:44:23 | ERROR | stderr | urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /openai/clip-vit-large-patch14/resolve/main/preprocessor_config.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8b0fe87700>: Failed to establish a new connection: [Errno 101] Network is unreachable')) 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | During handling of the above exception, another exception occurred: 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | Traceback (most recent call last): 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1261, in hf_hub_download 2024-03-13 11:44:23 | ERROR | stderr | metadata = get_hf_file_metadata( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn 2024-03-13 11:44:23 | ERROR | stderr | return fn(args, kwargs) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1667, in get_hf_file_metadata 2024-03-13 11:44:23 | ERROR | stderr | r = _request_wrapper( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 385, in _request_wrapper 2024-03-13 11:44:23 | ERROR | stderr | response = _request_wrapper( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 408, in _request_wrapper 2024-03-13 11:44:23 | ERROR | stderr | response = get_session().request(method=method, url=url, params) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/requests/sessions.py", line 587, in request 2024-03-13 11:44:23 | ERROR | stderr | resp = self.send(prep, send_kwargs) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/requests/sessions.py", line 701, in send 2024-03-13 11:44:23 | ERROR | stderr | r = adapter.send(request, kwargs) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 67, in send 2024-03-13 11:44:23 | ERROR | stderr | return super().send(request, args, *kwargs) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/requests/adapters.py", line 519, in send 2024-03-13 11:44:23 | ERROR | stderr | raise ConnectionError(e, request=request) 2024-03-13 11:44:23 | ERROR | stderr | requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /openai/clip-vit-large-patch14/resolve/main/preprocessor_config.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8b0fe87700>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: 214e567c-004b-4bc1-af39-1a38e5867f8a)') 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | The above exception was the direct cause of the following exception: 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | Traceback (most recent call last): 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/transformers/utils/hub.py", line 409, in cached_file 2024-03-13 11:44:23 | ERROR | stderr | resolved_file = hf_hub_download( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn 2024-03-13 11:44:23 | ERROR | stderr | return fn(args, kwargs) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1406, in hf_hub_download 2024-03-13 11:44:23 | ERROR | stderr | raise LocalEntryNotFoundError( 2024-03-13 11:44:23 | ERROR | stderr | huggingface_hub.utils._errors.LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on. 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | During handling of the above exception, another exception occurred: 2024-03-13 11:44:23 | ERROR | stderr | 2024-03-13 11:44:23 | ERROR | stderr | Traceback (most recent call last): 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/wuzhe2/github/Video-ChatGPT/video_chatgpt/demo/video_demo.py", line 264, in 2024-03-13 11:44:23 | ERROR | stderr | initialize_model(args.model_name, args.projection_path) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/wuzhe2/github/Video-ChatGPT/video_chatgpt/eval/model_utils.py", line 108, in initialize_model 2024-03-13 11:44:23 | ERROR | stderr | image_processor = CLIPImageProcessor.from_pretrained(model.config.mm_vision_tower, torch_dtype=torch.float16) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/transformers/image_processing_utils.py", line 164, in from_pretrained 2024-03-13 11:44:23 | ERROR | stderr | image_processor_dict, kwargs = cls.get_image_processor_dict(pretrained_model_name_or_path, kwargs) 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/transformers/image_processing_utils.py", line 268, in get_image_processor_dict 2024-03-13 11:44:23 | ERROR | stderr | resolved_image_processor_file = cached_file( 2024-03-13 11:44:23 | ERROR | stderr | File "/home/sean/anaconda3/envs/video_chatgpt/lib/python3.10/site-packages/transformers/utils/hub.py", line 443, in cached_file 2024-03-13 11:44:23 | ERROR | stderr | raise EnvironmentError( 2024-03-13 11:44:23 | ERROR | stderr | OSError: We couldn't connect to 'https://huggingface.co/' to load this file, couldn't find it in the cached files and it looks like openai/clip-vit-large-patch14 is not the path to a directory containing a file named preprocessor_config.json. 2024-03-13 11:44:23 | ERROR | stderr | Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.


project dir:

(video_chatgpt) sean@sean:~/we/github/Video-ChatGPT$ ls data docs LICENSE quantitative_evaluation requirements.txt transformers_bb13c711871e4d12a69aba05296c09fb video_chatgpt demo_sample_videos gradio_web_server.log model README.md scripts transformers-main.zip (video_chatgpt) sean@sean:~/we/github/Video-ChatGPT$ (video_chatgpt) sean@sean:~/we/github/Video-ChatGPT$ (video_chatgpt) sean@sean:~/we/github/Video-ChatGPT$ (video_chatgpt) sean@sean:~/we/github/Video-ChatGPT$ cd model/ (video_chatgpt) sean@sean:~/we/github/Video-ChatGPT/model$ ls added_tokens.json gitattributes pytorch_model-00002-of-00002.bin special_tokens_map.json video_chatgpt-7B.bin config.json preprocessor_config.json pytorch_model.bin.index.json tokenizer_config.json generation_config.json pytorch_model-00001-of-00002.bin README.md tokenizer.model (video_chatgpt) sean@sean:~/we/github/Video-ChatGPT/model$

ds-gong commented 3 months ago

done

shhuangcoder commented 3 months ago

How to solve this problem?

mmaaz60 commented 3 months ago

Hi @ds-gong,

How did you solve the issue?

Hi @shhuangcoder,

Please make sure to use the exact same configurations as in requirements.txt and let me know if it solves the issue. Thank You.