Skip to content

Conversation

@sahibpreetsingh12
Copy link
Contributor

@sahibpreetsingh12 sahibpreetsingh12 commented Aug 8, 2025

Hi @tomaarsen

In this PR I have tried #3462 by updating the encode() method's type hints (including all relevant overload variants) to support PIL.Image.Image and list[PIL.Image.Image].

Summary of Changes:

  • Imported Image from PIL
  • Updated all encode() overloads to include Image.Image and list[Image.Image]
  • Also updated the main encode() function signature accordingly

This ensures that tools like mypy no longer raise type errors when calling encode() with image inputs. As it is working correctly at inference time — the issue was limited to type checking.

@sahibpreetsingh12
Copy link
Contributor Author

@tomaarsen how to make sure i pass next time I make submission

@sahibpreetsingh12
Copy link
Contributor Author

Hi @tomaarsen what can i do to move this PR further?

@tomaarsen
Copy link
Member

Hello @sahibpreetsingh12,

Apologies for the delay. As I mentioned in #3462 (comment), I'm unsure whether I want to add this behaviour already. I think my preference is to include it in a large refactor that brings full multimodality support.

  • Tom Aarsen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants