diff --git a/src/diffusers/loaders/unet.py b/src/diffusers/loaders/unet.py index 8bbec26189..a099267f40 100644 --- a/src/diffusers/loaders/unet.py +++ b/src/diffusers/loaders/unet.py @@ -998,7 +998,7 @@ class FromOriginalUNetMixin: if is_accelerate_available(): unexpected_keys = load_model_dict_into_meta(model, diffusers_format_checkpoint, dtype=torch_dtype) if len(unexpected_keys) > 0: - logger.warn( + logger.warning( f"Some weights of the model checkpoint were not used when initializing {cls.__name__}: \n {[', '.join(unexpected_keys)]}" ) diff --git a/src/diffusers/pipelines/pipeline_utils.py b/src/diffusers/pipelines/pipeline_utils.py index 9b34bda0b7..6843333254 100644 --- a/src/diffusers/pipelines/pipeline_utils.py +++ b/src/diffusers/pipelines/pipeline_utils.py @@ -1816,7 +1816,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin): ): original_class_obj[name] = component else: - logger.warn( + logger.warning( f"component {name} is not switched over to new pipeline because type does not match the expected." f" {name} is {type(component)} while the new pipeline expect {component_types[name]}." f" please pass the component of the correct type to the new pipeline. `from_pipe(..., {name}={name})`"