diff --git a/src/diffusers/configuration_utils.py b/src/diffusers/configuration_utils.py index 19f58fd8165d..59c93157891b 100644 --- a/src/diffusers/configuration_utils.py +++ b/src/diffusers/configuration_utils.py @@ -58,6 +58,10 @@ def register_to_config(self, **kwargs): kwargs["_class_name"] = self.__class__.__name__ kwargs["_diffusers_version"] = __version__ + # Special case for `kwargs` used in deprecation warning added to schedulers + # TODO: remove this when we remove the deprecation warning, and the `kwargs` argument, + # or solve in a more general way. + kwargs.pop("kwargs", None) for key, value in kwargs.items(): try: setattr(self, key, value)