diff --git a/src/transformers/processing_utils.py b/src/transformers/processing_utils.py index 7b297edb342997..7e0e7567c14362 100644 --- a/src/transformers/processing_utils.py +++ b/src/transformers/processing_utils.py @@ -522,7 +522,7 @@ def save_pretrained(self, save_directory, push_to_hub: bool = False, **kwargs): token=kwargs.get("token"), ) - if set(self.to_dict().keys()) == {"processor_class"}: + if set(processor_dict.keys()) == {"processor_class"}: return [] return [output_processor_file]