From ac2b9a59e08572f95beb28f0f318f7cb47d8cf3a Mon Sep 17 00:00:00 2001 From: Franz Louis Cesista Date: Fri, 23 Aug 2024 00:42:44 +0800 Subject: [PATCH] Fix regression on `Processor.save_pretrained` caused by #31691 (#32921) fix save_pretrained --- src/transformers/processing_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/processing_utils.py b/src/transformers/processing_utils.py index 09f62481956e77..60085fd00705b0 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]