From f00a995753732210a696de447cd0db80e181c30a Mon Sep 17 00:00:00 2001 From: co63oc Date: Fri, 25 Apr 2025 02:53:47 +0800 Subject: [PATCH] Fix typos in strings and comments (#11407) --- docs/source/en/api/pipelines/wan.md | 2 +- docs/source/en/training/cogvideox.md | 2 +- docs/source/en/training/dreambooth.md | 2 +- docs/source/en/training/t2i_adapters.md | 2 +- .../train_dreambooth_lora_flux_advanced.py | 2 +- examples/community/README.md | 2 +- examples/community/dps_pipeline.py | 6 +++--- examples/community/fresco_v2v.py | 8 ++++---- examples/community/hd_painter.py | 2 +- .../train_lcm_distill_lora_sd_wds.py | 2 +- .../train_lcm_distill_lora_sdxl.py | 2 +- .../train_lcm_distill_lora_sdxl_wds.py | 2 +- .../train_lcm_distill_sd_wds.py | 2 +- .../train_lcm_distill_sdxl_wds.py | 2 +- examples/dreambooth/train_dreambooth_flux.py | 2 +- .../dreambooth/train_dreambooth_lora_flux.py | 2 +- .../train_dreambooth_lora_flux_miniature.py | 2 +- src/diffusers/models/downsampling.py | 2 +- src/diffusers/models/upsampling.py | 2 +- .../pipelines/allegro/pipeline_allegro.py | 2 +- .../pipelines/deepfloyd_if/pipeline_if.py | 2 +- .../deepfloyd_if/pipeline_if_img2img.py | 2 +- .../pipeline_if_img2img_superresolution.py | 2 +- .../deepfloyd_if/pipeline_if_inpainting.py | 2 +- .../pipeline_if_inpainting_superresolution.py | 2 +- .../pipeline_if_superresolution.py | 2 +- ...pipeline_stable_diffusion_model_editing.py | 2 +- .../pipelines/latte/pipeline_latte.py | 2 +- .../pipelines/lumina/pipeline_lumina.py | 2 +- .../pag/pipeline_pag_pixart_sigma.py | 2 +- .../pipelines/pag/pipeline_pag_sana.py | 2 +- .../pixart_alpha/pipeline_pixart_alpha.py | 2 +- .../pixart_alpha/pipeline_pixart_sigma.py | 2 +- src/diffusers/pipelines/sana/pipeline_sana.py | 2 +- .../sana/pipeline_sana_controlnet.py | 2 +- .../pipelines/sana/pipeline_sana_sprint.py | 2 +- ...line_stable_diffusion_gligen_text_image.py | 2 +- .../schedulers/scheduling_deis_multistep.py | 8 ++++---- .../scheduling_dpmsolver_multistep.py | 8 ++++---- .../scheduling_dpmsolver_multistep_inverse.py | 8 ++++---- .../scheduling_dpmsolver_singlestep.py | 12 +++++------ .../schedulers/scheduling_sasolver.py | 20 +++++++++---------- .../schedulers/scheduling_unipc_multistep.py | 12 +++++------ 43 files changed, 76 insertions(+), 76 deletions(-) diff --git a/docs/source/en/api/pipelines/wan.md b/docs/source/en/api/pipelines/wan.md index 12afe4d2c4..dbf3b973d7 100644 --- a/docs/source/en/api/pipelines/wan.md +++ b/docs/source/en/api/pipelines/wan.md @@ -24,7 +24,7 @@ ## Generating Videos with Wan 2.1 -We will first need to install some addtional dependencies. +We will first need to install some additional dependencies. ```shell pip install -u ftfy imageio-ffmpeg imageio diff --git a/docs/source/en/training/cogvideox.md b/docs/source/en/training/cogvideox.md index 657e58bfd5..c2b0f9ea1b 100644 --- a/docs/source/en/training/cogvideox.md +++ b/docs/source/en/training/cogvideox.md @@ -216,7 +216,7 @@ Setting the `` is not necessary. From some limited experimentation, we > - The original repository uses a `lora_alpha` of `1`. We found this not suitable in many runs, possibly due to difference in modeling backends and training settings. Our recommendation is to set to the `lora_alpha` to either `rank` or `rank // 2`. > - If you're training on data whose captions generate bad results with the original model, a `rank` of 64 and above is good and also the recommendation by the team behind CogVideoX. If the generations are already moderately good on your training captions, a `rank` of 16/32 should work. We found that setting the rank too low, say `4`, is not ideal and doesn't produce promising results. > - The authors of CogVideoX recommend 4000 training steps and 100 training videos overall to achieve the best result. While that might yield the best results, we found from our limited experimentation that 2000 steps and 25 videos could also be sufficient. -> - When using the Prodigy opitimizer for training, one can follow the recommendations from [this](https://huggingface.co/blog/sdxl_lora_advanced_script) blog. Prodigy tends to overfit quickly. From my very limited testing, I found a learning rate of `0.5` to be suitable in addition to `--prodigy_use_bias_correction`, `prodigy_safeguard_warmup` and `--prodigy_decouple`. +> - When using the Prodigy optimizer for training, one can follow the recommendations from [this](https://huggingface.co/blog/sdxl_lora_advanced_script) blog. Prodigy tends to overfit quickly. From my very limited testing, I found a learning rate of `0.5` to be suitable in addition to `--prodigy_use_bias_correction`, `prodigy_safeguard_warmup` and `--prodigy_decouple`. > - The recommended learning rate by the CogVideoX authors and from our experimentation with Adam/AdamW is between `1e-3` and `1e-4` for a dataset of 25+ videos. > > Note that our testing is not exhaustive due to limited time for exploration. Our recommendation would be to play around with the different knobs and dials to find the best settings for your data. diff --git a/docs/source/en/training/dreambooth.md b/docs/source/en/training/dreambooth.md index 932d73ce8f..cfc23fe246 100644 --- a/docs/source/en/training/dreambooth.md +++ b/docs/source/en/training/dreambooth.md @@ -589,7 +589,7 @@ For stage 2 of DeepFloyd IF with DreamBooth, pay attention to these parameters: * `--learning_rate=5e-6`, use a lower learning rate with a smaller effective batch size * `--resolution=256`, the expected resolution for the upscaler -* `--train_batch_size=2` and `--gradient_accumulation_steps=6`, to effectively train on images wiht faces requires larger batch sizes +* `--train_batch_size=2` and `--gradient_accumulation_steps=6`, to effectively train on images with faces requires larger batch sizes ```bash export MODEL_NAME="DeepFloyd/IF-II-L-v1.0" diff --git a/docs/source/en/training/t2i_adapters.md b/docs/source/en/training/t2i_adapters.md index eef401ce8f..24819cdfb0 100644 --- a/docs/source/en/training/t2i_adapters.md +++ b/docs/source/en/training/t2i_adapters.md @@ -89,7 +89,7 @@ Many of the basic and important parameters are described in the [Text-to-image]( As with the script parameters, a walkthrough of the training script is provided in the [Text-to-image](text2image#training-script) training guide. Instead, this guide takes a look at the T2I-Adapter relevant parts of the script. -The training script begins by preparing the dataset. This incudes [tokenizing](https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/t2i_adapter/train_t2i_adapter_sdxl.py#L674) the prompt and [applying transforms](https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/t2i_adapter/train_t2i_adapter_sdxl.py#L714) to the images and conditioning images. +The training script begins by preparing the dataset. This includes [tokenizing](https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/t2i_adapter/train_t2i_adapter_sdxl.py#L674) the prompt and [applying transforms](https://github.com/huggingface/diffusers/blob/aab6de22c33cc01fb7bc81c0807d6109e2c998c9/examples/t2i_adapter/train_t2i_adapter_sdxl.py#L714) to the images and conditioning images. ```py conditioning_image_transforms = transforms.Compose( diff --git a/examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py b/examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py index b756fba7d6..bdb9f99f31 100644 --- a/examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py +++ b/examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py @@ -2181,7 +2181,7 @@ def main(args): # Predict the noise residual model_pred = transformer( hidden_states=packed_noisy_model_input, - # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transforme rmodel (we should not keep it but I want to keep the inputs same for the model for testing) + # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transformer model (we should not keep it but I want to keep the inputs same for the model for testing) timestep=timesteps / 1000, guidance=guidance, pooled_projections=pooled_prompt_embeds, diff --git a/examples/community/README.md b/examples/community/README.md index 7f58e325b7..ee823873c7 100644 --- a/examples/community/README.md +++ b/examples/community/README.md @@ -5381,7 +5381,7 @@ pipe = DiffusionPipeline.from_pretrained( # Here we need use pipeline internal unet model pipe.unet = pipe.unet_model.from_pretrained(model_id, subfolder="unet", variant="fp16", use_safetensors=True) -# Load aditional layers to the model +# Load additional layers to the model pipe.unet.load_additional_layers(weight_path="proc_data/faithdiff/FaithDiff.bin", dtype=dtype) # Enable vae tiling diff --git a/examples/community/dps_pipeline.py b/examples/community/dps_pipeline.py index a0bf3e0ad3..7b349f6693 100755 --- a/examples/community/dps_pipeline.py +++ b/examples/community/dps_pipeline.py @@ -312,9 +312,9 @@ if __name__ == "__main__": # These are the coordinates of the output image out_coordinates = np.arange(1, out_length + 1) - # since both scale-factor and output size can be provided simulatneously, perserving the center of the image requires shifting - # the output coordinates. the deviation is because out_length doesn't necesary equal in_length*scale. - # to keep the center we need to subtract half of this deivation so that we get equal margins for boths sides and center is preserved. + # since both scale-factor and output size can be provided simultaneously, preserving the center of the image requires shifting + # the output coordinates. the deviation is because out_length doesn't necessary equal in_length*scale. + # to keep the center we need to subtract half of this deviation so that we get equal margins for both sides and center is preserved. shifted_out_coordinates = out_coordinates - (out_length - in_length * scale) / 2 # These are the matching positions of the output-coordinates on the input image coordinates. diff --git a/examples/community/fresco_v2v.py b/examples/community/fresco_v2v.py index d6c2683f1d..052130cd93 100644 --- a/examples/community/fresco_v2v.py +++ b/examples/community/fresco_v2v.py @@ -351,7 +351,7 @@ def my_forward( cross_attention_kwargs (`dict`, *optional*): A kwargs dictionary that if specified is passed along to the [`AttnProcessor`]. added_cond_kwargs: (`dict`, *optional*): - A kwargs dictionary containin additional embeddings that if specified are added to the embeddings that + A kwargs dictionary containing additional embeddings that if specified are added to the embeddings that are passed along to the UNet blocks. Returns: @@ -864,9 +864,9 @@ def get_flow_and_interframe_paras(flow_model, imgs): class AttentionControl: """ Control FRESCO-based attention - * enable/diable spatial-guided attention - * enable/diable temporal-guided attention - * enable/diable cross-frame attention + * enable/disable spatial-guided attention + * enable/disable temporal-guided attention + * enable/disable cross-frame attention * collect intermediate attention feature (for spatial-guided attention) """ diff --git a/examples/community/hd_painter.py b/examples/community/hd_painter.py index 9d7b95b62c..9711b40b11 100644 --- a/examples/community/hd_painter.py +++ b/examples/community/hd_painter.py @@ -34,7 +34,7 @@ class RASGAttnProcessor: temb: Optional[torch.Tensor] = None, scale: float = 1.0, ) -> torch.Tensor: - # Same as the default AttnProcessor up untill the part where similarity matrix gets saved + # Same as the default AttnProcessor up until the part where similarity matrix gets saved downscale_factor = self.mask_resoltuion // hidden_states.shape[1] residual = hidden_states diff --git a/examples/consistency_distillation/train_lcm_distill_lora_sd_wds.py b/examples/consistency_distillation/train_lcm_distill_lora_sd_wds.py index 8611ee6035..3414640f55 100644 --- a/examples/consistency_distillation/train_lcm_distill_lora_sd_wds.py +++ b/examples/consistency_distillation/train_lcm_distill_lora_sd_wds.py @@ -889,7 +889,7 @@ def main(args): mixed_precision=args.mixed_precision, log_with=args.report_to, project_config=accelerator_project_config, - split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be devide by the number of processes assuming batches are multiplied by the number of processes + split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be divided by the number of processes assuming batches are multiplied by the number of processes ) # Make one log on every process with the configuration for debugging. diff --git a/examples/consistency_distillation/train_lcm_distill_lora_sdxl.py b/examples/consistency_distillation/train_lcm_distill_lora_sdxl.py index 94a3159415..cb8c425bcb 100644 --- a/examples/consistency_distillation/train_lcm_distill_lora_sdxl.py +++ b/examples/consistency_distillation/train_lcm_distill_lora_sdxl.py @@ -721,7 +721,7 @@ def main(args): mixed_precision=args.mixed_precision, log_with=args.report_to, project_config=accelerator_project_config, - split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be devide by the number of processes assuming batches are multiplied by the number of processes + split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be divided by the number of processes assuming batches are multiplied by the number of processes ) # Make one log on every process with the configuration for debugging. diff --git a/examples/consistency_distillation/train_lcm_distill_lora_sdxl_wds.py b/examples/consistency_distillation/train_lcm_distill_lora_sdxl_wds.py index d3cf6879ea..d636c145ff 100644 --- a/examples/consistency_distillation/train_lcm_distill_lora_sdxl_wds.py +++ b/examples/consistency_distillation/train_lcm_distill_lora_sdxl_wds.py @@ -884,7 +884,7 @@ def main(args): mixed_precision=args.mixed_precision, log_with=args.report_to, project_config=accelerator_project_config, - split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be devide by the number of processes assuming batches are multiplied by the number of processes + split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be divided by the number of processes assuming batches are multiplied by the number of processes ) # Make one log on every process with the configuration for debugging. diff --git a/examples/consistency_distillation/train_lcm_distill_sd_wds.py b/examples/consistency_distillation/train_lcm_distill_sd_wds.py index 59e2aa8a6e..50a3d4ebd1 100644 --- a/examples/consistency_distillation/train_lcm_distill_sd_wds.py +++ b/examples/consistency_distillation/train_lcm_distill_sd_wds.py @@ -854,7 +854,7 @@ def main(args): mixed_precision=args.mixed_precision, log_with=args.report_to, project_config=accelerator_project_config, - split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be devide by the number of processes assuming batches are multiplied by the number of processes + split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be divided by the number of processes assuming batches are multiplied by the number of processes ) # Make one log on every process with the configuration for debugging. diff --git a/examples/consistency_distillation/train_lcm_distill_sdxl_wds.py b/examples/consistency_distillation/train_lcm_distill_sdxl_wds.py index 3435675dc3..a719db9a89 100644 --- a/examples/consistency_distillation/train_lcm_distill_sdxl_wds.py +++ b/examples/consistency_distillation/train_lcm_distill_sdxl_wds.py @@ -894,7 +894,7 @@ def main(args): mixed_precision=args.mixed_precision, log_with=args.report_to, project_config=accelerator_project_config, - split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be devide by the number of processes assuming batches are multiplied by the number of processes + split_batches=True, # It's important to set this to True when using webdataset to get the right number of steps for lr scheduling. If set to False, the number of steps will be divided by the number of processes assuming batches are multiplied by the number of processes ) # Make one log on every process with the configuration for debugging. diff --git a/examples/dreambooth/train_dreambooth_flux.py b/examples/dreambooth/train_dreambooth_flux.py index 6fe24634b5..02b83bb6b1 100644 --- a/examples/dreambooth/train_dreambooth_flux.py +++ b/examples/dreambooth/train_dreambooth_flux.py @@ -1634,7 +1634,7 @@ def main(args): # Predict the noise residual model_pred = transformer( hidden_states=packed_noisy_model_input, - # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transforme rmodel (we should not keep it but I want to keep the inputs same for the model for testing) + # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transformer model (we should not keep it but I want to keep the inputs same for the model for testing) timestep=timesteps / 1000, guidance=guidance, pooled_projections=pooled_prompt_embeds, diff --git a/examples/dreambooth/train_dreambooth_lora_flux.py b/examples/dreambooth/train_dreambooth_lora_flux.py index 9de4973b6f..193c5affe6 100644 --- a/examples/dreambooth/train_dreambooth_lora_flux.py +++ b/examples/dreambooth/train_dreambooth_lora_flux.py @@ -1749,7 +1749,7 @@ def main(args): # Predict the noise residual model_pred = transformer( hidden_states=packed_noisy_model_input, - # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transforme rmodel (we should not keep it but I want to keep the inputs same for the model for testing) + # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transformer model (we should not keep it but I want to keep the inputs same for the model for testing) timestep=timesteps / 1000, guidance=guidance, pooled_projections=pooled_prompt_embeds, diff --git a/examples/research_projects/flux_lora_quantization/train_dreambooth_lora_flux_miniature.py b/examples/research_projects/flux_lora_quantization/train_dreambooth_lora_flux_miniature.py index cc535bbaaa..ca61664059 100644 --- a/examples/research_projects/flux_lora_quantization/train_dreambooth_lora_flux_miniature.py +++ b/examples/research_projects/flux_lora_quantization/train_dreambooth_lora_flux_miniature.py @@ -1088,7 +1088,7 @@ def main(args): text_ids = batch["text_ids"].to(device=accelerator.device, dtype=weight_dtype) model_pred = transformer( hidden_states=packed_noisy_model_input, - # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transforme rmodel (we should not keep it but I want to keep the inputs same for the model for testing) + # YiYi notes: divide it by 1000 for now because we scale it by 1000 in the transformer model (we should not keep it but I want to keep the inputs same for the model for testing) timestep=timesteps / 1000, guidance=guidance, pooled_projections=pooled_prompt_embeds, diff --git a/src/diffusers/models/downsampling.py b/src/diffusers/models/downsampling.py index 3ac8953e3d..1e7366359f 100644 --- a/src/diffusers/models/downsampling.py +++ b/src/diffusers/models/downsampling.py @@ -286,7 +286,7 @@ class KDownsample2D(nn.Module): class CogVideoXDownsample3D(nn.Module): - # Todo: Wait for paper relase. + # Todo: Wait for paper release. r""" A 3D Downsampling layer using in [CogVideoX]() by Tsinghua University & ZhipuAI diff --git a/src/diffusers/models/upsampling.py b/src/diffusers/models/upsampling.py index af04ae4b93..f2f07a5824 100644 --- a/src/diffusers/models/upsampling.py +++ b/src/diffusers/models/upsampling.py @@ -358,7 +358,7 @@ class KUpsample2D(nn.Module): class CogVideoXUpsample3D(nn.Module): r""" - A 3D Upsample layer using in CogVideoX by Tsinghua University & ZhipuAI # Todo: Wait for paper relase. + A 3D Upsample layer using in CogVideoX by Tsinghua University & ZhipuAI # Todo: Wait for paper release. Args: in_channels (`int`): diff --git a/src/diffusers/pipelines/allegro/pipeline_allegro.py b/src/diffusers/pipelines/allegro/pipeline_allegro.py index cb36a7a672..1fc1c0901a 100644 --- a/src/diffusers/pipelines/allegro/pipeline_allegro.py +++ b/src/diffusers/pipelines/allegro/pipeline_allegro.py @@ -514,7 +514,7 @@ class AllegroPipeline(DiffusionPipeline): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py index 150978de6e..4c39381231 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if.py @@ -484,7 +484,7 @@ class IFPipeline(DiffusionPipeline, StableDiffusionLoraLoaderMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py index a92d7be6a1..80f94aa5c7 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py @@ -528,7 +528,7 @@ class IFImg2ImgPipeline(DiffusionPipeline, StableDiffusionLoraLoaderMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py index b23ea39bb2..160849cd4e 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img_superresolution.py @@ -281,7 +281,7 @@ class IFImg2ImgSuperResolutionPipeline(DiffusionPipeline, StableDiffusionLoraLoa # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py index 030821b789..36559c2e17 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting.py @@ -568,7 +568,7 @@ class IFInpaintingPipeline(DiffusionPipeline, StableDiffusionLoraLoaderMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py index bdad9c29b1..3c71bd96f1 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_inpainting_superresolution.py @@ -283,7 +283,7 @@ class IFInpaintingSuperResolutionPipeline(DiffusionPipeline, StableDiffusionLora # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py index 012c4ca6d4..849c683190 100644 --- a/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py +++ b/src/diffusers/pipelines/deepfloyd_if/pipeline_if_superresolution.py @@ -239,7 +239,7 @@ class IFSuperResolutionPipeline(DiffusionPipeline, StableDiffusionLoraLoaderMixi # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py index 06db871daf..7225f2f234 100644 --- a/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py +++ b/src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py @@ -574,7 +574,7 @@ class StableDiffusionModelEditingPipeline( idxs_replace.append(76) idxs_replaces.append(idxs_replace) - # prepare batch: for each pair of setences, old context and new values + # prepare batch: for each pair of sentences, old context and new values contexts, valuess = [], [] for old_emb, new_emb, idxs_replace in zip(old_embs, new_embs, idxs_replaces): context = old_emb.detach() diff --git a/src/diffusers/pipelines/latte/pipeline_latte.py b/src/diffusers/pipelines/latte/pipeline_latte.py index e9a95e8be4..977e648d85 100644 --- a/src/diffusers/pipelines/latte/pipeline_latte.py +++ b/src/diffusers/pipelines/latte/pipeline_latte.py @@ -501,7 +501,7 @@ class LattePipeline(DiffusionPipeline): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/lumina/pipeline_lumina.py b/src/diffusers/pipelines/lumina/pipeline_lumina.py index 816213f105..22ff926afa 100644 --- a/src/diffusers/pipelines/lumina/pipeline_lumina.py +++ b/src/diffusers/pipelines/lumina/pipeline_lumina.py @@ -534,7 +534,7 @@ class LuminaPipeline(DiffusionPipeline): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py b/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py index affda7e18a..71ee5879d0 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_pixart_sigma.py @@ -488,7 +488,7 @@ class PixArtSigmaPAGPipeline(DiffusionPipeline, PAGMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/pag/pipeline_pag_sana.py b/src/diffusers/pipelines/pag/pipeline_pag_sana.py index 030ab6db73..a233f70136 100644 --- a/src/diffusers/pipelines/pag/pipeline_pag_sana.py +++ b/src/diffusers/pipelines/pag/pipeline_pag_sana.py @@ -524,7 +524,7 @@ class SanaPAGPipeline(DiffusionPipeline, PAGMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py b/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py index 988e049dd6..79e007fea3 100644 --- a/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py +++ b/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_alpha.py @@ -598,7 +598,7 @@ class PixArtAlphaPipeline(DiffusionPipeline): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py b/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py index 4b4b85e63e..14f4bdcce8 100644 --- a/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py +++ b/src/diffusers/pipelines/pixart_alpha/pipeline_pixart_sigma.py @@ -525,7 +525,7 @@ class PixArtSigmaPipeline(DiffusionPipeline): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/sana/pipeline_sana.py b/src/diffusers/pipelines/sana/pipeline_sana.py index 80e0d9bb93..34b84a89e6 100644 --- a/src/diffusers/pipelines/sana/pipeline_sana.py +++ b/src/diffusers/pipelines/sana/pipeline_sana.py @@ -600,7 +600,7 @@ class SanaPipeline(DiffusionPipeline, SanaLoraLoaderMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/sana/pipeline_sana_controlnet.py b/src/diffusers/pipelines/sana/pipeline_sana_controlnet.py index 21547d7d49..a7c7d027fb 100644 --- a/src/diffusers/pipelines/sana/pipeline_sana_controlnet.py +++ b/src/diffusers/pipelines/sana/pipeline_sana_controlnet.py @@ -615,7 +615,7 @@ class SanaControlNetPipeline(DiffusionPipeline, SanaLoraLoaderMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/sana/pipeline_sana_sprint.py b/src/diffusers/pipelines/sana/pipeline_sana_sprint.py index 30cc8d5f32..03b306b539 100644 --- a/src/diffusers/pipelines/sana/pipeline_sana_sprint.py +++ b/src/diffusers/pipelines/sana/pipeline_sana_sprint.py @@ -491,7 +491,7 @@ class SanaSprintPipeline(DiffusionPipeline, SanaLoraLoaderMixin): # & caption = re.sub(r"&", "", caption) - # ip adresses: + # ip addresses: caption = re.sub(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", " ", caption) # article ids: diff --git a/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py b/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py index 86ef017840..ac9b8ce19c 100644 --- a/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py +++ b/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen_text_image.py @@ -175,7 +175,7 @@ class StableDiffusionGLIGENTextImagePipeline(DiffusionPipeline, StableDiffusionM tokenizer ([`~transformers.CLIPTokenizer`]): A `CLIPTokenizer` to tokenize text. processor ([`~transformers.CLIPProcessor`]): - A `CLIPProcessor` to procces reference image. + A `CLIPProcessor` to process reference image. image_encoder ([`~transformers.CLIPVisionModelWithProjection`]): Frozen image-encoder ([clip-vit-large-patch14](https://huggingface.co/openai/clip-vit-large-patch14)). image_project ([`CLIPImageProjection`]): diff --git a/src/diffusers/schedulers/scheduling_deis_multistep.py b/src/diffusers/schedulers/scheduling_deis_multistep.py index 6a653f183b..af9a7f79e3 100644 --- a/src/diffusers/schedulers/scheduling_deis_multistep.py +++ b/src/diffusers/schedulers/scheduling_deis_multistep.py @@ -486,7 +486,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError("missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -549,7 +549,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -603,7 +603,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", @@ -673,7 +673,7 @@ class DEISMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing`sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", diff --git a/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py b/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py index ed60dd4eae..4c59d060cf 100644 --- a/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py +++ b/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py @@ -646,7 +646,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError("missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -741,7 +741,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -810,7 +810,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", @@ -934,7 +934,7 @@ class DPMSolverMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing`sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", diff --git a/src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py b/src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py index 971817f7b7..011294c6f2 100644 --- a/src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py +++ b/src/diffusers/schedulers/scheduling_dpmsolver_multistep_inverse.py @@ -513,7 +513,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError("missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -609,7 +609,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -679,7 +679,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", @@ -804,7 +804,7 @@ class DPMSolverMultistepInverseScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing`sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", diff --git a/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py b/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py index bf68d6c99b..daae50627d 100644 --- a/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py +++ b/src/diffusers/schedulers/scheduling_dpmsolver_singlestep.py @@ -584,7 +584,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError("missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -681,7 +681,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -746,7 +746,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", @@ -858,7 +858,7 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing`sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", @@ -981,12 +981,12 @@ class DPMSolverSinglestepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 2: sample = args[2] else: - raise ValueError(" missing`sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if order is None: if len(args) > 3: order = args[3] else: - raise ValueError(" missing `order` as a required keyward argument") + raise ValueError("missing `order` as a required keyword argument") if timestep_list is not None: deprecate( "timestep_list", diff --git a/src/diffusers/schedulers/scheduling_sasolver.py b/src/diffusers/schedulers/scheduling_sasolver.py index d45c93880b..c741955699 100644 --- a/src/diffusers/schedulers/scheduling_sasolver.py +++ b/src/diffusers/schedulers/scheduling_sasolver.py @@ -522,7 +522,7 @@ class SASolverScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError("missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -812,22 +812,22 @@ class SASolverScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if noise is None: if len(args) > 2: noise = args[2] else: - raise ValueError(" missing `noise` as a required keyward argument") + raise ValueError("missing `noise` as a required keyword argument") if order is None: if len(args) > 3: order = args[3] else: - raise ValueError(" missing `order` as a required keyward argument") + raise ValueError("missing `order` as a required keyword argument") if tau is None: if len(args) > 4: tau = args[4] else: - raise ValueError(" missing `tau` as a required keyward argument") + raise ValueError("missing `tau` as a required keyword argument") if prev_timestep is not None: deprecate( "prev_timestep", @@ -943,27 +943,27 @@ class SASolverScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: last_sample = args[1] else: - raise ValueError(" missing`last_sample` as a required keyward argument") + raise ValueError("missing `last_sample` as a required keyword argument") if last_noise is None: if len(args) > 2: last_noise = args[2] else: - raise ValueError(" missing`last_noise` as a required keyward argument") + raise ValueError("missing `last_noise` as a required keyword argument") if this_sample is None: if len(args) > 3: this_sample = args[3] else: - raise ValueError(" missing`this_sample` as a required keyward argument") + raise ValueError("missing `this_sample` as a required keyword argument") if order is None: if len(args) > 4: order = args[4] else: - raise ValueError(" missing`order` as a required keyward argument") + raise ValueError("missing `order` as a required keyword argument") if tau is None: if len(args) > 5: tau = args[5] else: - raise ValueError(" missing`tau` as a required keyward argument") + raise ValueError("missing `tau` as a required keyword argument") if this_timestep is not None: deprecate( "this_timestep", diff --git a/src/diffusers/schedulers/scheduling_unipc_multistep.py b/src/diffusers/schedulers/scheduling_unipc_multistep.py index 0150042630..d7f795dff8 100644 --- a/src/diffusers/schedulers/scheduling_unipc_multistep.py +++ b/src/diffusers/schedulers/scheduling_unipc_multistep.py @@ -596,7 +596,7 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError("missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if timestep is not None: deprecate( "timesteps", @@ -672,12 +672,12 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: sample = args[1] else: - raise ValueError(" missing `sample` as a required keyward argument") + raise ValueError("missing `sample` as a required keyword argument") if order is None: if len(args) > 2: order = args[2] else: - raise ValueError(" missing `order` as a required keyward argument") + raise ValueError("missing `order` as a required keyword argument") if prev_timestep is not None: deprecate( "prev_timestep", @@ -804,17 +804,17 @@ class UniPCMultistepScheduler(SchedulerMixin, ConfigMixin): if len(args) > 1: last_sample = args[1] else: - raise ValueError(" missing`last_sample` as a required keyward argument") + raise ValueError("missing `last_sample` as a required keyword argument") if this_sample is None: if len(args) > 2: this_sample = args[2] else: - raise ValueError(" missing`this_sample` as a required keyward argument") + raise ValueError("missing `this_sample` as a required keyword argument") if order is None: if len(args) > 3: order = args[3] else: - raise ValueError(" missing`order` as a required keyward argument") + raise ValueError("missing `order` as a required keyword argument") if this_timestep is not None: deprecate( "this_timestep",