From ca749513230f5c425049d47c3dad9c099fb2a769 Mon Sep 17 00:00:00 2001 From: Yuta Hayashibe Date: Tue, 20 Sep 2022 04:58:41 +0900 Subject: [PATCH] Fix typos (#568) * Fix a setting bug * Fix typos * Reverted params to parms --- _typos.toml | 3 ++- src/diffusers/configuration_utils.py | 2 +- .../pipelines/stable_diffusion/pipeline_stable_diffusion.py | 2 +- .../stable_diffusion/pipeline_stable_diffusion_img2img.py | 2 +- .../stable_diffusion/pipeline_stable_diffusion_inpaint.py | 2 +- src/diffusers/schedulers/scheduling_karras_ve_flax.py | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/_typos.toml b/_typos.toml index 4025388915..551099f981 100644 --- a/_typos.toml +++ b/_typos.toml @@ -4,8 +4,9 @@ [default.extend-identifiers] [default.extend-words] -NIN_="NIN" # NIN is used in scripts/convert_ncsnpp_original_checkpoint_to_diffusers.py +NIN="NIN" # NIN is used in scripts/convert_ncsnpp_original_checkpoint_to_diffusers.py nd="np" # nd may be np (numpy) +parms="parms" # parms is used in scripts/convert_original_stable_diffusion_to_diffusers.py [files] diff --git a/src/diffusers/configuration_utils.py b/src/diffusers/configuration_utils.py index f5e5d36ffd..2ab85ecee1 100644 --- a/src/diffusers/configuration_utils.py +++ b/src/diffusers/configuration_utils.py @@ -272,7 +272,7 @@ class ConfigMixin: # remove general kwargs if present in dict if "kwargs" in expected_keys: expected_keys.remove("kwargs") - # remove flax interal keys + # remove flax internal keys if hasattr(cls, "_flax_internal_args"): for arg in cls._flax_internal_args: expected_keys.remove(arg) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py index 9f1211b430..216a76a559 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py @@ -58,7 +58,7 @@ class StableDiffusionPipeline(DiffusionPipeline): if hasattr(scheduler.config, "steps_offset") and scheduler.config.steps_offset != 1: warnings.warn( f"The configuration file of this scheduler: {scheduler} is outdated. `steps_offset`" - f" should be set to 1 istead of {scheduler.config.steps_offset}. Please make sure " + 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`" diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py index e7adb4d1a3..bbb553f105 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py @@ -70,7 +70,7 @@ class StableDiffusionImg2ImgPipeline(DiffusionPipeline): if hasattr(scheduler.config, "steps_offset") and scheduler.config.steps_offset != 1: warnings.warn( f"The configuration file of this scheduler: {scheduler} is outdated. `steps_offset`" - f" should be set to 1 istead of {scheduler.config.steps_offset}. Please make sure " + 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`" diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py index b9ad36f1a2..b152c77c50 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py @@ -89,7 +89,7 @@ class StableDiffusionInpaintPipeline(DiffusionPipeline): if hasattr(scheduler.config, "steps_offset") and scheduler.config.steps_offset != 1: warnings.warn( f"The configuration file of this scheduler: {scheduler} is outdated. `steps_offset`" - f" should be set to 1 istead of {scheduler.config.steps_offset}. Please make sure " + 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`" diff --git a/src/diffusers/schedulers/scheduling_karras_ve_flax.py b/src/diffusers/schedulers/scheduling_karras_ve_flax.py index fe71b3fd0e..51b16c96fa 100644 --- a/src/diffusers/schedulers/scheduling_karras_ve_flax.py +++ b/src/diffusers/schedulers/scheduling_karras_ve_flax.py @@ -47,7 +47,7 @@ class FlaxKarrasVeOutput(BaseOutput): Computed sample (x_{t-1}) of previous timestep. `prev_sample` should be used as next model input in the denoising loop. derivative (`jnp.ndarray` of shape `(batch_size, num_channels, height, width)` for images): - Derivate of predicted original image sample (x_0). + Derivative of predicted original image sample (x_0). state (`KarrasVeSchedulerState`): the `FlaxKarrasVeScheduler` state data class. """