From 7f2c3f450112dd27e1f977c30368c88ef9a82b38 Mon Sep 17 00:00:00 2001 From: Pablo Montalvo Date: Tue, 2 Jul 2024 17:33:28 +0200 Subject: [PATCH] handle (processor_class, None) returned by ModelPatterns --- src/transformers/commands/add_new_model_like.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/commands/add_new_model_like.py b/src/transformers/commands/add_new_model_like.py index 626e8373192a6c..e4b2f9be5cf3dc 100644 --- a/src/transformers/commands/add_new_model_like.py +++ b/src/transformers/commands/add_new_model_like.py @@ -1628,7 +1628,7 @@ def get_user_input(): ) old_processing_classes = [ - c + c if not isinstance(c, tuple) else c[0] for c in [old_image_processor_class, old_feature_extractor_class, old_tokenizer_class, old_processor_class] if c is not None ]