connecting video to qwen2
This commit is contained in:
parent
da644c21e5
commit
b4e096c080
|
@ -45,6 +45,7 @@ scipy==1.13.1 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
sentencepiece==0.2.0 ; python_version >= "3.9" and python_version < "3.13"
|
sentencepiece==0.2.0 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
setuptools==75.2.0 ; python_version >= "3.9" and python_version < "3.13"
|
setuptools==75.2.0 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
tokenizers==0.20.1 ; python_version >= "3.9" and python_version < "3.13"
|
tokenizers==0.20.1 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
|
torchvision==0.19.1 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
tqdm==4.66.5 ; python_version >= "3.9" and python_version < "3.13"
|
tqdm==4.66.5 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
transformers==4.46.0 ; python_version >= "3.9" and python_version < "3.13"
|
transformers==4.46.0 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13"
|
typer==0.6.1 ; python_version >= "3.9" and python_version < "3.13"
|
||||||
|
|
|
@ -211,6 +211,9 @@ class VlmCausalLMBatch(FlashCausalLMBatch):
|
||||||
processor, image_inputs, config, image_id
|
processor, image_inputs, config, image_id
|
||||||
)
|
)
|
||||||
image_id += 1
|
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)
|
full_text = image_text_replacement_fixup(config, full_text)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue