Skip to content

[Feat] multimodal: Decode HEIF images and read relative BMP, TIFF and HEIF paths - #49673

Merged
hnyls2002 merged 1 commit into
mainfrom
lsyin/media-heif-extensions
Nov 11, 2026
Merged

hnyls2002 merged 1 commit into
mainfrom
lsyin/media-heif-extensions

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • When the optional pillow-heif package is installed, media_io registers its Pillow opener, so HEIC/HEIF images decode. Without it nothing changes: such images still fail with cannot identify image file (400).
  • image_extension_names adds .bmp, .tif, .tiff, .heic and .heif. Its consumer that changes behavior is the multimodal cache's snapshot_media, which reads a relative local image path by extension; a relative image.bmp used to fall through to base64 decoding and fail with Non-base64 digit found. Absolute paths already loaded and are unchanged.

Split out of the Kimi-K3.1 Day-0 port (#48414) so that #48778 keeps only the media error handling.

Verification

  • test_relative_local_path_uses_file_bytes now covers .png, .bmp, .tiff and .heic; it fails on main and passes here (registered/unit/multimodal/test_preprocess_cache.py: 26 passed, 1 skipped).
  • Locally with pillow-heif 1.8.1: HEIC bytes, base64 and an absolute .heic path decode on this branch and fail on main. There is no CI test for it, since pillow-heif is not a dependency.

CI States

Latest PR Test (Base): 🚫 Run #42923044639
Latest PR Test (Extra): ❌ Run #42923044411
Latest PR Test (AMD ROCm 10): 🚫 Run #42923044404

Tip

Base CI only covers the core cases, and its workload may not exercise your change. Use /rerun-test to run the tests your change touches, or copy this prompt for an agent:

Find the registered tests this PR affects and run them with /rerun-test, following https://github.com/sgl-project/sglang/blob/main/.agents/skills/rerun-test/SKILL.md

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/rerun-test test_preprocess_cache.py test_base_processor_bad_input.py test_feature_identity.py

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🚀 1-gpu-5090 (1 test): ✅ View workflow run

cd test/ && python3 registered/unit/multimodal/test_preprocess_cache.py  # base-b

🚀 ubuntu-latest (2 tests): ✅ View workflow run

cd test/ && python3 registered/unit/multimodal/test_base_processor_bad_input.py  # base-a
cd test/ && python3 registered/unit/multimodal/test_feature_identity.py  # base-a

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Nov 11, 2026
@hnyls2002
hnyls2002 merged commit b4f7530 into main Nov 11, 2026
241 of 273 checks passed
@hnyls2002
hnyls2002 deleted the lsyin/media-heif-extensions branch November 11, 2026 04:07
hnyls2002 added a commit that referenced this pull request Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant