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

[hf-multimodal] pass kwargs to self.processor #2667

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

baberabb
Copy link
Contributor

@baberabb baberabb commented Jan 31, 2025

Just passes min_pixels, max_pixels for now, but on a more general note need a better way to pass specific kwargs from the evaluator fn to the model methods.

closes #2666

@@ -63,6 +65,11 @@ def __init__(
self.interleave = interleave
self.max_images = max_images
self.rgb = convert_img_format
self.pixels = (
{"min_pixels": min_pixels, "max_pixels": max_pixels}
if min_pixels or max_pixels
Copy link

Choose a reason for hiding this comment

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

What if only one of them is set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other will be set to None. Would that still work?

Copy link

Choose a reason for hiding this comment

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

it's probably best to set them independently . if None then don't add the param , so they lookup a default value: https://github.com/QwenLM/Qwen2.5-VL/blob/7da8b4265d9cd239c7934a89cb5427cba6acbdca/qwen-vl-utils/src/qwen_vl_utils/vision_process.py#L129

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.

Support processor_kwargs for hf-multimodal
2 participants