Skip to content

Conversation

@Xqle
Copy link
Contributor

@Xqle Xqle commented Nov 4, 2025

What does this PR do?

1. Improve fps handling in Qwen2_5_VLProcessor.__call__()

  • Previously, the __call__() function always defaulted to fps=2, regardless of the input video.

  • Now, when fps is not explicitly provided and cannot be read from the video metadata, it falls back to 24 by default. Otherwise, the provided or metadata fps is used. It follows a priority order:

    kwargs["fps"] → video_metadata["fps"] → 24 (default)

    The default value 24 is chosen as it represents a common frame rate for most videos.

  • This prevents potential errors in second_per_grid_ts calculation when the actual video frame rate differs from the assumed default.

2. More robust do_sample_frames behavior

  • If fps is manually provided but do_sample_frames is not specified, do_sample_frames will now be automatically set to True.
  • This avoids cases where custom fps is ignored due to missing sampling flag.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@zucchini-nlp

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

[For maintainers] Suggested jobs to run (before merge)

run-slow: qwen2_5_vl

@Rocketknight1
Copy link
Member

cc @molbap @yonigozlan for processors

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