Skip to content

Commit

Permalink
PaliGemma - fix processor with no input text (#30916)
Browse files Browse the repository at this point in the history
Update processing_paligemma.py
  • Loading branch information
hiyouga committed May 21, 2024
1 parent d502bd6 commit a755745
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/transformers/models/paligemma/processing_paligemma.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def __call__(
logger.warning_once(
"You are using PaliGemma without a text prefix. It will perform as a picture-captioning model."
)
text = ""

if isinstance(text, List) and isinstance(images, List):
if len(images) < len(text):
Expand Down

0 comments on commit a755745

Please sign in to comment.