Video-Text-to-Text
Transformers
Safetensors
English
videochat_flash_qwen
feature-extraction
multimodal
custom_code
Eval Results (legacy)
Instructions to use OpenGVLab/VideoChat-Flash-Qwen2-7B_res224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenGVLab/VideoChat-Flash-Qwen2-7B_res224 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenGVLab/VideoChat-Flash-Qwen2-7B_res224", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_videochat_flash.py
Browse files
modeling_videochat_flash.py
CHANGED
|
@@ -641,7 +641,7 @@ class VideoChatFlashQwenForCausalLM(LlavaMetaForCausalLM, Qwen2ForCausalLM_Flash
|
|
| 641 |
conv = conv_templates["qwen_2"].copy()
|
| 642 |
|
| 643 |
if chat_history is None or len(chat_history) == 0:
|
| 644 |
-
user_prompt = f'{DEFAULT_IMAGE_TOKEN}\n{time_msg.
|
| 645 |
else:
|
| 646 |
assert DEFAULT_IMAGE_TOKEN in chat_history[0]['content'], chat_history
|
| 647 |
for msg in chat_history:
|
|
|
|
| 641 |
conv = conv_templates["qwen_2"].copy()
|
| 642 |
|
| 643 |
if chat_history is None or len(chat_history) == 0:
|
| 644 |
+
user_prompt = f'{DEFAULT_IMAGE_TOKEN}\n{time_msg.strip()} {user_prompt}'
|
| 645 |
else:
|
| 646 |
assert DEFAULT_IMAGE_TOKEN in chat_history[0]['content'], chat_history
|
| 647 |
for msg in chat_history:
|