LISA icon indicating copy to clipboard operation
LISA copied to clipboard

LISA++ err

Open fwbc opened this issue 6 months ago • 1 comments

when i use lisa++,error Please input your prompt: What can make the woman stand higher? Please output segmentation mask and explain why Please input the image path: imgs/stand_higher.jpg Traceback (most recent call last): File "/home/heruyi/work/LISA-main/chat.py", line 253, in main(sys.argv[1:]) File "/home/heruyi/work/LISA-main/chat.py", line 211, in main output_ids, pred_masks = model.evaluate( File "/home/heruyi/work/LISA-main/model/LISA.py", line 356, in evaluate outputs = self.generate( File "/home/heruyi/anaconda3/envs/lisa/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "/home/heruyi/anaconda3/envs/lisa/lib/python3.10/site-packages/transformers/generation/utils.py", line 1538, in generate return self.greedy_search( File "/home/heruyi/anaconda3/envs/lisa/lib/python3.10/site-packages/transformers/generation/utils.py", line 2362, in greedy_search outputs = self( File "/home/heruyi/anaconda3/envs/lisa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl return forward_call(*input, **kwargs) File "/home/heruyi/anaconda3/envs/lisa/lib/python3.10/site-packages/accelerate/hooks.py", line 170, in new_forward output = module._old_forward(*args, **kwargs) File "/home/heruyi/work/LISA-main/model/LISA.py", line 166, in forward return super().forward(**kwargs) File "/home/heruyi/work/LISA-main/model/llava/model/language_model/llava_llama.py", line 88, in forward ) = self.prepare_inputs_labels_for_multimodal( File "/home/heruyi/work/LISA-main/model/llava/model/llava_arch.py", line 110, in prepare_inputs_labels_for_multimodal (attention_mask.shape[0], past_key_values[-1][-1].shape[-2] + 1), AttributeError: 'NoneType' object has no attribute 'shape'

fwbc avatar Jun 13 '25 09:06 fwbc

Hi, you should use their lisa_plus branch which is based on LLaVA1.5 and use chat_instance.py to perform inference.

Mozhgan91 avatar Aug 27 '25 22:08 Mozhgan91