Skip to content

fix(qwen_image): forward multimodal token type ids - #1417

Open
llc1123 wants to merge 1 commit into
ModelTC:mainfrom
llc1123:fix/qwen25-mm-token-type-ids
Open

fix(qwen_image): forward multimodal token type ids#1417
llc1123 wants to merge 1 commit into
ModelTC:mainfrom
llc1123:fix/qwen25-mm-token-type-ids

Conversation

@llc1123

@llc1123 llc1123 commented Aug 22, 2026

Copy link
Copy Markdown

Summary

  • forward processor-provided mm_token_type_ids to the Qwen2.5-VL text encoder
  • keep older Transformers processors compatible by adding the argument only when present
  • add a weight-free regression covering both processor shapes

Transformers 5.15 uses mm_token_type_ids to compute Qwen2.5-VL multimodal 3D position IDs. The current image-edit path manually selects processor outputs and drops this field, which silently falls back to sequential text-only positions.

Fixes #1416

Validation

  • python -m unittest discover -s tests -p 'test_qwen25_vl_input_forwarding.py' -v
  • pre-commit run --files lightx2v/models/input_encoders/hf/qwen25/qwen25_vlforconditionalgeneration.py tests/test_qwen25_vl_input_forwarding.py

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.

[Bug] Qwen2.5-VL image-edit encoder drops mm_token_type_ids with Transformers 5.15

1 participant