{"record":{"id":"0f1187128dcb379d","repo":"hiyouga/LlamaFactory","slug":"this-model-does-not-support-video-input-please-ch","errorCode":null,"errorMessage":"This model does not support video input. Please check whether the correct `template` is used.","messagePattern":"This model does not support video input\\. Please check whether the correct `template` is used\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/llamafactory/data/mm_plugin.py","lineNumber":168,"sourceCode":"        images: list[\"ImageInput\"],\n        videos: list[\"VideoInput\"],\n        audios: list[\"AudioInput\"],\n    ) -> None:\n        r\"\"\"Validate if this model accepts the input modalities.\"\"\"\n        image_processor: BaseImageProcessor = getattr(processor, \"image_processor\", None)\n        video_processor: BaseImageProcessor = getattr(\n            processor, \"video_processor\", getattr(processor, \"image_processor\", None)\n        )\n        feature_extractor: SequenceFeatureExtractor = getattr(processor, \"feature_extractor\", None) or getattr(\n            processor, \"audio_processor\", None\n        )\n        if len(images) != 0 and self.image_token is None:\n            raise ValueError(\n                \"This model does not support image input. Please check whether the correct `template` is used.\"\n            )\n\n        if len(videos) != 0 and self.video_token is None:\n            raise ValueError(\n                \"This model does not support video input. Please check whether the correct `template` is used.\"\n            )\n\n        if len(audios) != 0 and self.audio_token is None:\n            raise ValueError(\n                \"This model does not support audio input. Please check whether the correct `template` is used.\"\n            )\n\n        if self.image_token is not None and processor is None:\n            raise ValueError(\"Processor was not found, please check and update your model file.\")\n\n        if self.image_token is not None and image_processor is None:\n            raise ValueError(\"Image processor was not found, please check and update your model file.\")\n\n        if self.video_token is not None and video_processor is None:\n            raise ValueError(\"Video processor was not found, please check and update your model file.\")\n\n        if self.audio_token is not None and feature_extractor is None:","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/hiyouga/LlamaFactory/blob/f28afaf6355af515454dfb16c97d728307c93897/src/llamafactory/data/mm_plugin.py#L150-L186","documentation":"Counterpart of the image check in BasePlugin._validate_inputs: the sample carries videos, but the selected plugin/template has no video_token, so video input is unsupported for this configuration. Raised before preprocessing, when len(videos) != 0 and self.video_token is None.","triggerScenarios":"Using a video dataset (videos column or <video> placeholders) with a template whose mm_plugin lacks video support (many image-only VLM plugins); wrong template string for a video-capable model like Qwen2.5-VL.","commonSituations":"Assuming image support implies video support; using an older template name that maps to an image-only plugin after a LlamaFactory upgrade reorganized plugin names.","solutions":["Switch template to one with video support (e.g. qwen2vl/qwen for Qwen-VL family) matching your model.","Verify the mm_plugin registered for your template in data/template.py handles VIDEO_TOKEN.","If the model is video-incapable, remove videos and <video> placeholders from the dataset.","Upgrade LlamaFactory so newly added video plugins are available."],"exampleFix":"# before (train.yaml for Qwen2.5-VL video data)\ntemplate: llama3\n\n# after\ntemplate: qwen2vl","handlingStrategy":"validation","validationCode":"def template_supports_video(plugin) -> bool:\n    return getattr(plugin, \"video_token\", None) is not None","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use video-capable templates (e.g. qwen2vl) only with video-capable checkpoints.","Do not assume image support implies video support — check the plugin's tokens.","Remove <video> placeholders and videos fields for non-video runs."],"tags":["multimodal","video","template","config"],"backgroundTag":null,"analyzedSha":"f28afaf6355af515454dfb16c97d728307c93897","analyzedAt":"2026-08-14T21:57:28.298Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}