Skip to content

Commit 0a5c39b

Browse files
authored
fix multimodal model image_mode = 'CMYK' (#697)
1 parent 24e6b11 commit 0a5c39b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift/llm/utils/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def _read_from_path(
580580
image = Image.open(img_path)
581581
else:
582582
image = img_path
583-
if image.mode in {'L', 'RGBA'}:
583+
if image.mode != 'RGB':
584584
image = image.convert('RGB')
585585
return image
586586

0 commit comments

Comments
 (0)