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

Refactor run_llava to avoid duplicated model loading if multiple evaluation is required #1160

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yeyimilk
Copy link

  1. Refactor function eval_model into get_model_and_processor and run_for_outputs. When multiple evaluation is required, call get_model_and_processor to get model, image processor, and tokenizer to load model first, then call run_for_outputs as many times as required to evaluate images.
  2. Return output from function eval_model for further usage.

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.

None yet

1 participant