DongfuJiang commited on
Commit
f748941
1 Parent(s): e8a6491
Files changed (1) hide show
  1. models/mllava/utils.py +1 -0
models/mllava/utils.py CHANGED
@@ -163,6 +163,7 @@ def chat_mllava_stream(
163
  for i in range(len(images)):
164
  if isinstance(images[i], str):
165
  images[i] = PIL.Image.open(images[i])
 
166
 
167
  inputs = processor(images=images, text=prompt, return_tensors="pt", truncation=True, max_length=max_input_length)
168
  print(processor.tokenizer.decode(inputs["input_ids"][0]))
 
163
  for i in range(len(images)):
164
  if isinstance(images[i], str):
165
  images[i] = PIL.Image.open(images[i])
166
+ images[i] = images[i].convert("RGB")
167
 
168
  inputs = processor(images=images, text=prompt, return_tensors="pt", truncation=True, max_length=max_input_length)
169
  print(processor.tokenizer.decode(inputs["input_ids"][0]))