From a989bf8d84bacd00fa13db8e7031b139bcddd622 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 15 Jul 2025 14:28:59 +0100 Subject: [PATCH] Fix bugs from pipeline preprocessor overhaul (#39425) * Correct load classes for VideoClassificationPipeline * Correct load classes for the ASR pipeline --- src/transformers/pipelines/video_classification.py | 4 ++-- tests/pipelines/test_pipelines_common.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transformers/pipelines/video_classification.py b/src/transformers/pipelines/video_classification.py index 0d601ca8f1..ec122d5491 100644 --- a/src/transformers/pipelines/video_classification.py +++ b/src/transformers/pipelines/video_classification.py @@ -51,8 +51,8 @@ class VideoClassificationPipeline(Pipeline): [huggingface.co/models](https://huggingface.co/models?filter=video-classification). """ - _load_processor = True - _load_image_processor = False + _load_processor = False + _load_image_processor = True _load_feature_extractor = False _load_tokenizer = False diff --git a/tests/pipelines/test_pipelines_common.py b/tests/pipelines/test_pipelines_common.py index bc85f0749b..a701f86f66 100644 --- a/tests/pipelines/test_pipelines_common.py +++ b/tests/pipelines/test_pipelines_common.py @@ -846,6 +846,7 @@ class CustomPipelineTest(unittest.TestCase): "automatic-speech-recognition", model="hf-internal-testing/fake-custom-wav2vec2", feature_extractor="hf-internal-testing/fake-custom-wav2vec2", + tokenizer="facebook/wav2vec2-base-960h", # Test workaround - the pipeline requires a tokenizer trust_remote_code=True, )