In `modeling_mplugowl3.py`,`prompts_lists` and `input_images_lists` are not defined
I met the following error while running the gradio demo :
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
name 'prompts_lists' is not defined
Traceback (most recent call last):
File "/gemini/code/mPLUG-Owl3/gradio_demo.py", line 135, in chat
answer = model.chat(
File "/root/.cache/huggingface/modules/transformers_modules/mPLUG-Owl3-7B-240728/modeling_mplugowl3.py", line 191, in chat
prompts_lists,
NameError: name 'prompts_lists' is not defined
I traced to the modeling_mplugowl3.py
file , and it seems that prompts_lists
and input_images_lists
are not defined:
def chat(
self,
images,
videos,
msgs,
tokenizer,
processor=None,
vision_hidden_states=None,
max_new_tokens=2048,
min_new_tokens=0,
sampling=True,
max_inp_length=8192,
system_prompt='',
stream=False,
max_slice_nums=None,
use_image_id=None,
**kwargs
):
print(msgs)
if processor is None:
if self.processor is None:
self.processor = AutoProcessor.from_pretrained(self.config._name_or_path, trust_remote_code=True)
processor = self.processor
inputs = processor(
prompts_lists,
input_images_lists,
max_slice_nums=max_slice_nums,
use_image_id=use_image_id,
return_tensors="pt",
max_length=max_inp_length
).to(self.device)
We just updated the modeling_mplugowl3.py to support the gradio demo