-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems about launching demo #25
Comments
Hi @zhtstar, can you please update the code from the repo once and rerun it. |
Hi @KjAeRsTuIsK , I got the same error and the code is already is the latest. I have followed the instructions on ReadMe to set up environment and update the code. Lokking forward to hearing from you soon! |
Hi @KjAeRsTuIsK , I have fixed the above problem but I got a new one with the example provided. Could you help me with this error? I used the example image and sentence as inputs. |
Hi @xianjiedai I got the same error as below. Could you let me know how you fixed? 'AttributeError: 'NoneType' object has no attribute 'image_mean' |
By properly setting the model path. If you check builder.py, you will notice that
requires geochat in the model path and you may need to change the path or the name of the folder that contains model files cloned from hugging face. If you can fix it and encounter the same problem as I do: Hi @KjAeRsTuIsK , please let me know |
@xianjiedai thank you! |
请问你解决了吗? |
I also get the error ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect. |
hi, i have renamed the folder containing model weights to contain However, when i upload my own image, it does not appear. An Error appears in the demo UI too. The following error in terminal appears:
|
i realised it can work for images of size 1024 x 768, but for other squarish images like 1185 x 1189, or 1169 x 1140, the error above keeps appearing. One current workaround is to resize the images. |
I also get the error ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect. |
I also get the error ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect. |
Thank you for your excellent work. I encountered some problems when trying to use the geochat_demo.py file. Although I tried changing the conda environment many times and changing computers and servers, my problem still did not solve. I'm looking for your help here. My problem is:
In the "Install" section you wrote "Clone this repository and navigate to LLaVA folder". What is "LLaVA folder"? Do I need to create a new folder myself? If so, what is the directory structure of this folder compared to other files?
When I configure the environment according to your instructions and execute the code "python geochat_demo.py --model-path ./models", I will encounter the following error:
(geochat) root@Y9000K:/mnt/d/GeoChat# python geochat_demo.py --model-path ./models
/root/anaconda3/envs/geochat/lib/python3.8/site-packages/gradio_client/documentation.py:103: UserWarning: Could not get documentation group for <class 'gradio.mix.Parallel'>: No known documentation group for module 'gradio.mix'
warnings.warn(f"Could not get documentation group for {cls}: {exc}")
/root/anaconda3/envs/geochat/lib/python3.8/site-packages/gradio_client/documentation.py:103: UserWarning: Could not get documentation group for <class 'gradio.mix.Series'>: No known documentation group for module 'gradio.mix'
warnings.warn(f"Could not get documentation group for {cls}: {exc}")
Initializing Chat
Loading checkpoint shards: 50%|████████████████████████████████████████████████████ | 1/2 [02:06<02:06, 126.92s/it]
Traceback (most recent call last):
File "geochat_demo.py", line 53, in
tokenizer, model, image_processor, context_len = load_pretrained_model(args.model_path, args.model_base, model_name, args.load_8bit, args.load_4bit, device=args.device)
File "/mnt/d/GeoChat/geochat/model/builder.py", line 125, in load_pretrained_model
model = AutoModelForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, **kwargs)
File "/root/anaconda3/envs/geochat/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 493, in from_pretrained
return model_class.from_pretrained(
File "/root/anaconda3/envs/geochat/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2903, in from_pretrained
) = cls._load_pretrained_model(
File "/root/anaconda3/envs/geochat/lib/python3.8/site-packages/transformers/modeling_utils.py", line 3260, in _load_pretrained_model
new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model(
File "/root/anaconda3/envs/geochat/lib/python3.8/site-packages/transformers/modeling_utils.py", line 717, in _load_state_dict_into_meta_model
set_module_tensor_to_device(model, param_name, param_device, **set_module_kwargs)
File "/root/anaconda3/envs/geochat/lib/python3.8/site-packages/accelerate/utils/modeling.py", line 348, in set_module_tensor_to_device
raise ValueError(
ValueError: Trying to set a tensor of shape torch.Size([577, 1024]) in "weight" (which has shape torch.Size([1297, 1024])), this look incorrect.
If I do not use the model from GeoChat-7B, but directly use "facebook/opt-350m", the interface can be loaded, but nothing happens when clicking the "send" button
Sorry to bother you, I haven't been able to solve this problem even though I tried many times. I hope I can get your help.
The text was updated successfully, but these errors were encountered: