From c1fe12595e1f24f0f3bbea0c10d510adb822bebb Mon Sep 17 00:00:00 2001 From: Pablo Montalvo <39954772+molbap@users.noreply.github.com> Date: Wed, 3 Jul 2024 11:42:30 +0200 Subject: [PATCH] handle (processor_class, None) returned by ModelPatterns (#31753) --- 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 ]