From a7ca1451e2003b9f080fdc751cf0f5ab1d30c066 Mon Sep 17 00:00:00 2001 From: April-Sonnet <2569381344@qq.com> Date: Fri, 3 Jul 2026 04:26:33 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20typos=20across=20the=20codebase:=20concat?= =?UTF-8?q?ing=E2=86=92concatenating,=20tbe=E2=86=92the,=20corrct=E2=86=92?= =?UTF-8?q?correct,=20etc.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes found by codespell: - concating → concatenating (8 files) - tbe → the (1 file, docstring) - corrct → correct (2 files) - arbitary → arbitrary (1 file) - re-use → reuse (1 file, comment) - foward → forward (Korean docs) --- docs/source/ko/tutorials/basic_training.md | 2 +- src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py | 2 +- .../deprecated/paint_by_example/pipeline_paint_by_example.py | 2 +- src/diffusers/pipelines/deprecated/unidiffuser/modeling_uvit.py | 2 +- .../pipelines/easyanimate/pipeline_easyanimate_inpaint.py | 2 +- src/diffusers/pipelines/flux/pipeline_flux_control_inpaint.py | 2 +- .../pipelines/flux/pipeline_flux_controlnet_inpainting.py | 2 +- src/diffusers/pipelines/flux/pipeline_flux_inpaint.py | 2 +- src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py | 2 +- src/diffusers/pipelines/ltx2/pipeline_ltx2.py | 2 +- src/diffusers/pipelines/ltx2/pipeline_ltx2_condition.py | 2 +- src/diffusers/pipelines/ltx2/pipeline_ltx2_image2video.py | 2 +- src/diffusers/pipelines/pipeline_utils.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/source/ko/tutorials/basic_training.md b/docs/source/ko/tutorials/basic_training.md index 05ce1037b537..484f926ffbe6 100644 --- a/docs/source/ko/tutorials/basic_training.md +++ b/docs/source/ko/tutorials/basic_training.md @@ -329,7 +329,7 @@ TensorBoard에 로깅, 그래디언트 누적 및 혼합 정밀도 학습을 쉽 ... ) ... # 각 타임스텝의 노이즈 크기에 따라 깨끗한 이미지에 노이즈를 추가합니다. -... # (이는 foward diffusion 과정입니다.) +... # (이는 forward diffusion 과정입니다.) ... noisy_images = noise_scheduler.add_noise(clean_images, noise, timesteps) ... with accelerator.accumulate(model): diff --git a/src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py b/src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py index b8d41a948207..aa7fa7428572 100644 --- a/src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py +++ b/src/diffusers/pipelines/chroma/pipeline_chroma_inpainting.py @@ -703,7 +703,7 @@ def prepare_mask_latents( ) masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1) - # aligning device to prevent device errors when concating it with the latent model input + # aligning device to prevent device errors when concatenating it with the latent model input masked_image_latents = masked_image_latents.to(device=device, dtype=dtype) masked_image_latents = self._pack_latents( masked_image_latents, diff --git a/src/diffusers/pipelines/deprecated/paint_by_example/pipeline_paint_by_example.py b/src/diffusers/pipelines/deprecated/paint_by_example/pipeline_paint_by_example.py index 665eae146b72..e5860b582b88 100644 --- a/src/diffusers/pipelines/deprecated/paint_by_example/pipeline_paint_by_example.py +++ b/src/diffusers/pipelines/deprecated/paint_by_example/pipeline_paint_by_example.py @@ -350,7 +350,7 @@ def prepare_mask_latents( torch.cat([masked_image_latents] * 2) if do_classifier_free_guidance else masked_image_latents ) - # aligning device to prevent device errors when concating it with the latent model input + # aligning device to prevent device errors when concatenating it with the latent model input masked_image_latents = masked_image_latents.to(device=device, dtype=dtype) return mask, masked_image_latents diff --git a/src/diffusers/pipelines/deprecated/unidiffuser/modeling_uvit.py b/src/diffusers/pipelines/deprecated/unidiffuser/modeling_uvit.py index 6fd4ff50285f..80af8e0fe801 100644 --- a/src/diffusers/pipelines/deprecated/unidiffuser/modeling_uvit.py +++ b/src/diffusers/pipelines/deprecated/unidiffuser/modeling_uvit.py @@ -1068,7 +1068,7 @@ def forward( Returns: - `tuple`: Returns relevant parts of the model's noise prediction: the first element of the tuple is tbe VAE + `tuple`: Returns relevant parts of the model's noise prediction: the first element of the tuple is the VAE image embedding, the second element is the CLIP image embedding, and the third element is the CLIP text embedding. """ diff --git a/src/diffusers/pipelines/easyanimate/pipeline_easyanimate_inpaint.py b/src/diffusers/pipelines/easyanimate/pipeline_easyanimate_inpaint.py index 69bb332944d6..3085e63ee6c0 100755 --- a/src/diffusers/pipelines/easyanimate/pipeline_easyanimate_inpaint.py +++ b/src/diffusers/pipelines/easyanimate/pipeline_easyanimate_inpaint.py @@ -681,7 +681,7 @@ def prepare_mask_latents( masked_image_latents = torch.cat(new_mask_pixel_values, dim=0) masked_image_latents = masked_image_latents * self.vae.config.scaling_factor - # aligning device to prevent device errors when concating it with the latent model input + # aligning device to prevent device errors when concatenating it with the latent model input masked_image_latents = masked_image_latents.to(device=device, dtype=dtype) else: masked_image_latents = None diff --git a/src/diffusers/pipelines/flux/pipeline_flux_control_inpaint.py b/src/diffusers/pipelines/flux/pipeline_flux_control_inpaint.py index cd4ee9fe7611..3ebff683ecbf 100644 --- a/src/diffusers/pipelines/flux/pipeline_flux_control_inpaint.py +++ b/src/diffusers/pipelines/flux/pipeline_flux_control_inpaint.py @@ -766,7 +766,7 @@ def prepare_mask_latents( ) masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1) - # aligning device to prevent device errors when concating it with the latent model input + # aligning device to prevent device errors when concatenating it with the latent model input masked_image_latents = masked_image_latents.to(device=device, dtype=dtype) masked_image_latents = self._pack_latents( masked_image_latents, diff --git a/src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py b/src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py index eed671152bc9..1c9bf4822426 100644 --- a/src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py +++ b/src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py @@ -666,7 +666,7 @@ def prepare_mask_latents( ) masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1) - # aligning device to prevent device errors when concating it with the latent model input + # aligning device to prevent device errors when concatenating it with the latent model input masked_image_latents = masked_image_latents.to(device=device, dtype=dtype) masked_image_latents = self._pack_latents( masked_image_latents, diff --git a/src/diffusers/pipelines/flux/pipeline_flux_inpaint.py b/src/diffusers/pipelines/flux/pipeline_flux_inpaint.py index 4c35ffefe088..c8c9d03a1c8e 100644 --- a/src/diffusers/pipelines/flux/pipeline_flux_inpaint.py +++ b/src/diffusers/pipelines/flux/pipeline_flux_inpaint.py @@ -737,7 +737,7 @@ def prepare_mask_latents( ) masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1) - # aligning device to prevent device errors when concating it with the latent model input + # aligning device to prevent device errors when concatenating it with the latent model input masked_image_latents = masked_image_latents.to(device=device, dtype=dtype) masked_image_latents = self._pack_latents( masked_image_latents, diff --git a/src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py b/src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py index c85299eedcd3..7726b9f8dde0 100644 --- a/src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py +++ b/src/diffusers/pipelines/flux/pipeline_flux_kontext_inpaint.py @@ -898,7 +898,7 @@ def prepare_mask_latents( ) masked_image_latents = masked_image_latents.repeat(batch_size // masked_image_latents.shape[0], 1, 1, 1) - # aligning device to prevent device errors when concating it with the latent model input + # aligning device to prevent device errors when concatenating it with the latent model input masked_image_latents = masked_image_latents.to(device=device, dtype=dtype) masked_image_latents = self._pack_latents( masked_image_latents, diff --git a/src/diffusers/pipelines/ltx2/pipeline_ltx2.py b/src/diffusers/pipelines/ltx2/pipeline_ltx2.py index 493db96e48a7..6705ce15b247 100644 --- a/src/diffusers/pipelines/ltx2/pipeline_ltx2.py +++ b/src/diffusers/pipelines/ltx2/pipeline_ltx2.py @@ -244,7 +244,7 @@ def __init__( self.vae_temporal_compression_ratio = ( self.vae.temporal_compression_ratio if getattr(self, "vae", None) is not None else 8 ) - # TODO: check whether the MEL compression ratio logic here is corrct + # TODO: check whether the MEL compression ratio logic here is correct self.audio_vae_mel_compression_ratio = ( self.audio_vae.mel_compression_ratio if getattr(self, "audio_vae", None) is not None else 4 ) diff --git a/src/diffusers/pipelines/ltx2/pipeline_ltx2_condition.py b/src/diffusers/pipelines/ltx2/pipeline_ltx2_condition.py index ecc89ae79a30..79aa527d856a 100644 --- a/src/diffusers/pipelines/ltx2/pipeline_ltx2_condition.py +++ b/src/diffusers/pipelines/ltx2/pipeline_ltx2_condition.py @@ -235,7 +235,7 @@ def rescale_noise_cfg(noise_cfg, noise_pred_text, guidance_rescale=0.0): class LTX2ConditionPipeline(DiffusionPipeline, FromSingleFileMixin, LTX2LoraLoaderMixin): r""" - Pipeline for video generation which allows image conditions to be inserted at arbitary parts of the video. + Pipeline for video generation which allows image conditions to be inserted at arbitrary parts of the video. Reference: https://github.com/Lightricks/LTX-Video diff --git a/src/diffusers/pipelines/ltx2/pipeline_ltx2_image2video.py b/src/diffusers/pipelines/ltx2/pipeline_ltx2_image2video.py index 1f721bf54364..73a87e7216de 100644 --- a/src/diffusers/pipelines/ltx2/pipeline_ltx2_image2video.py +++ b/src/diffusers/pipelines/ltx2/pipeline_ltx2_image2video.py @@ -247,7 +247,7 @@ def __init__( self.vae_temporal_compression_ratio = ( self.vae.temporal_compression_ratio if getattr(self, "vae", None) is not None else 8 ) - # TODO: check whether the MEL compression ratio logic here is corrct + # TODO: check whether the MEL compression ratio logic here is correct self.audio_vae_mel_compression_ratio = ( self.audio_vae.mel_compression_ratio if getattr(self, "audio_vae", None) is not None else 4 ) diff --git a/src/diffusers/pipelines/pipeline_utils.py b/src/diffusers/pipelines/pipeline_utils.py index a3ef2260751f..58fed57197f2 100644 --- a/src/diffusers/pipelines/pipeline_utils.py +++ b/src/diffusers/pipelines/pipeline_utils.py @@ -759,7 +759,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: str | os.PathLike, **kwa >>> pipeline.scheduler = scheduler ``` """ - # Copy the kwargs to re-use during loading connected pipeline. + # Copy the kwargs to reuse during loading connected pipeline. kwargs_copied = kwargs.copy() cache_dir = kwargs.pop("cache_dir", None)