From 1947c2d39d897c4a52a750822ca6ec37af843797 Mon Sep 17 00:00:00 2001 From: Pedro Cuenca Date: Sat, 19 Nov 2022 20:46:39 +0100 Subject: [PATCH] Remove deprecation warnings. --- .../pipeline_stable_diffusion_upscaler.py | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscaler.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscaler.py index 36340009fa..7ca9e666fb 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscaler.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscaler.py @@ -173,34 +173,6 @@ class StableDiffusionUpscalerPipeline(DiffusionPipeline): feature_extractor: CLIPFeatureExtractor, ): super().__init__() - - if hasattr(scheduler.config, "steps_offset") and scheduler.config.steps_offset != 1: - deprecation_message = ( - f"The configuration file of this scheduler: {scheduler} is outdated. `steps_offset`" - f" should be set to 1 instead of {scheduler.config.steps_offset}. Please make sure " - "to update the config accordingly as leaving `steps_offset` might led to incorrect results" - " in future versions. If you have downloaded this checkpoint from the Hugging Face Hub," - " it would be very nice if you could open a Pull request for the `scheduler/scheduler_config.json`" - " file" - ) - deprecate("steps_offset!=1", "1.0.0", deprecation_message, standard_warn=False) - new_config = dict(scheduler.config) - new_config["steps_offset"] = 1 - scheduler._internal_dict = FrozenDict(new_config) - - if hasattr(scheduler.config, "clip_sample") and scheduler.config.clip_sample is True: - deprecation_message = ( - f"The configuration file of this scheduler: {scheduler} has not set the configuration `clip_sample`." - " `clip_sample` should be set to False in the configuration file. Please make sure to update the" - " config accordingly as not setting `clip_sample` in the config might lead to incorrect results in" - " future versions. If you have downloaded this checkpoint from the Hugging Face Hub, it would be very" - " nice if you could open a Pull request for the `scheduler/scheduler_config.json` file" - ) - deprecate("clip_sample not set", "1.0.0", deprecation_message, standard_warn=False) - new_config = dict(scheduler.config) - new_config["clip_sample"] = False - scheduler._internal_dict = FrozenDict(new_config) - if safety_checker is None: logger.warn( f"You have disabled the safety checker for {self.__class__} by passing `safety_checker=None`. Ensure"