Skip to content

Follow-up: clean up video_duration handling in hyperclovax_vision_v2 (#44314) #48736

Description

@jp1924

Follow-up from #44314.

HyperCLOVAXVisionV2Processor currently fills video_duration with a processor-side stopgap (video_duration_token + overrides on apply_chat_template/_process_videos in modular_hyperclovax_vision_v2.py) instead of the single-placeholder + replace_video_token pattern other video models use (qwen3_vl, glm4v).

Why it's a stopgap and not the real fix (from the PR discussion, #44314 (comment)):

  • vLLM: the single-placeholder pattern pulls video_metadata through mm_processor_kwargs, and there have been cases of metadata/frame-count sync issues on the vLLM side (e.g. Qwen3-VL). Moving the structure into replace_video_token would need a matching vLLM-side change.
  • Consistency: the hub chat_template.jinja currently renders image and video symmetrically (both emit a mime block + PAD via jinja). Collapsing only video to a single token breaks that symmetry; fixing it properly means reworking the image path too, which was out of scope for add HyperClovaX Vision #44314.

Real fix path, roughly in order:

  1. hub chat_template.jinja change (Naver side)
  2. vLLM compatibility check, since the template is shared with vLLM
  3. transformers-side migration to replace_video_token, dropping the stopgap in modular_hyperclovax_vision_v2.py

cc @bigshanedogg @vasqu

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions