connecting video to qwen2

This commit is contained in:
Miquel Farre 2024-11-14 10:48:18 +00:00 committed by drbh
parent 5ced960f6e
commit 05464d26bf

View File

@ -212,6 +212,9 @@ class VlmCausalLMBatch(FlashCausalLMBatch):
processor, image_inputs, config, image_id
)
image_id += 1
elif chunk_type == "video" and config.model_type == "qwen2_vl":
# Based on Qwen2VL's video token format
full_text += f"<video>{chunk.video}</video>"
full_text = image_text_replacement_fixup(config, full_text)