Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phi-3.5-vision-Instruct muliples images loading #795

Open
Aveline67 opened this issue Sep 25, 2024 · 8 comments
Open

Phi-3.5-vision-Instruct muliples images loading #795

Aveline67 opened this issue Sep 25, 2024 · 8 comments
Labels
new feature New feature or request

Comments

@Aveline67
Copy link

How is it possible to load multiples images for Phi-3.5-vision-Instruct ?

And referencing them as Image ?

Maybe it is supported but now example to show how.

@Aveline67 Aveline67 added the new feature New feature or request label Sep 25, 2024
@Aveline67
Copy link
Author

By modifying code I was able to load 2 pictures and it seems to work

@EricLBuehler
Copy link
Owner

@Aveline67 can you please share the code? Phi 3.5 vision instruct can support multiple images, just add messages with the correlated image!

@Aveline67
Copy link
Author

I just did call multiple times .add_phiv_image_message() but I had to comment out the candle_core::bail!("Can only process one image per batch"); condition in mistralrs-core\src\vision_models\phi3_inputs_processor.rs

I am looking to create a proper PR, also some changes are needed in phi3.rs to ensure to pass all pictures dimensions

@EricLBuehler
Copy link
Owner

@Aveline67 I see! It looks like this should be a fix as well as what you mentioned. Please feel free to open a PR!

@Aveline67
Copy link
Author

I did try this one #829

not sure about images sizes

@kuladeephx
Copy link

@Aveline67, were you able to use multiple Images? I f so pls let me know

@Aveline67
Copy link
Author

sure i did, i will publish the PR

@kuladeephx
Copy link

And I want to run multiple prompts at once, but not successful, if you have any idea regarding it, pls let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants