Skip to content

Commit

Permalink
fix multimodal model image_mode = 'CMYK' (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintao-Huang committed Apr 14, 2024
1 parent 24e6b11 commit 0a5c39b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion swift/llm/utils/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def _read_from_path(
image = Image.open(img_path)
else:
image = img_path
if image.mode in {'L', 'RGBA'}:
if image.mode != 'RGB':
image = image.convert('RGB')
return image

Expand Down

0 comments on commit 0a5c39b

Please sign in to comment.