From 68451445d2bfda2d850766f9e0ad4b41212c5a89 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 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]