diff --git a/src/transformers/commands/add_new_model_like.py b/src/transformers/commands/add_new_model_like.py index 45585b1d80f..5dd5e7dcb82 100644 --- a/src/transformers/commands/add_new_model_like.py +++ b/src/transformers/commands/add_new_model_like.py @@ -1556,6 +1556,8 @@ def get_user_input(): "What will be the name of the image processor class for this model? ", default_value=f"{model_camel_cased}ImageProcessor", ) + else: + image_processor_class = None if old_feature_extractor_class is not None: feature_extractor_class = get_user_field( "What will be the name of the feature extractor class for this model? ",