Unverified Commit a51b6cc8 authored by M. Tolga Cangöz's avatar M. Tolga Cangöz Committed by GitHub
Browse files

[`Docs`] Fix typos (#7451)



* Fix typos

* Fix typos

* Fix typos

---------
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent 3bce0f3d
...@@ -1073,7 +1073,7 @@ class StableDiffusionXLControlNetAdapterInpaintPipeline( ...@@ -1073,7 +1073,7 @@ class StableDiffusionXLControlNetAdapterInpaintPipeline(
# because `num_inference_steps` might be even given that every timestep # because `num_inference_steps` might be even given that every timestep
# (except the highest one) is duplicated. If `num_inference_steps` is even it would # (except the highest one) is duplicated. If `num_inference_steps` is even it would
# mean that we cut the timesteps in the middle of the denoising step # mean that we cut the timesteps in the middle of the denoising step
# (between 1st and 2nd devirative) which leads to incorrect results. By adding 1 # (between 1st and 2nd derivative) which leads to incorrect results. By adding 1
# we ensure that the denoising process always ends after the 2nd derivate step of the scheduler # we ensure that the denoising process always ends after the 2nd derivate step of the scheduler
num_inference_steps = num_inference_steps + 1 num_inference_steps = num_inference_steps + 1
......
...@@ -701,7 +701,7 @@ class StableDiffusionXLInstantIDPipeline(StableDiffusionXLControlNetPipeline): ...@@ -701,7 +701,7 @@ class StableDiffusionXLInstantIDPipeline(StableDiffusionXLControlNetPipeline):
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -1005,7 +1005,7 @@ class PromptDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMixin, Lo ...@@ -1005,7 +1005,7 @@ class PromptDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMixin, Lo
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -663,7 +663,7 @@ class AnimateDiffPipeline( ...@@ -663,7 +663,7 @@ class AnimateDiffPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -823,7 +823,7 @@ class AnimateDiffVideoToVideoPipeline( ...@@ -823,7 +823,7 @@ class AnimateDiffVideoToVideoPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -1002,7 +1002,7 @@ class StableDiffusionControlNetPipeline( ...@@ -1002,7 +1002,7 @@ class StableDiffusionControlNetPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -1012,7 +1012,7 @@ class StableDiffusionControlNetImg2ImgPipeline( ...@@ -1012,7 +1012,7 @@ class StableDiffusionControlNetImg2ImgPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -1241,7 +1241,7 @@ class StableDiffusionControlNetInpaintPipeline( ...@@ -1241,7 +1241,7 @@ class StableDiffusionControlNetInpaintPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -1022,7 +1022,7 @@ class StableDiffusionXLControlNetInpaintPipeline( ...@@ -1022,7 +1022,7 @@ class StableDiffusionXLControlNetInpaintPipeline(
# because `num_inference_steps` might be even given that every timestep # because `num_inference_steps` might be even given that every timestep
# (except the highest one) is duplicated. If `num_inference_steps` is even it would # (except the highest one) is duplicated. If `num_inference_steps` is even it would
# mean that we cut the timesteps in the middle of the denoising step # mean that we cut the timesteps in the middle of the denoising step
# (between 1st and 2nd devirative) which leads to incorrect results. By adding 1 # (between 1st and 2nd derivative) which leads to incorrect results. By adding 1
# we ensure that the denoising process always ends after the 2nd derivate step of the scheduler # we ensure that the denoising process always ends after the 2nd derivate step of the scheduler
num_inference_steps = num_inference_steps + 1 num_inference_steps = num_inference_steps + 1
...@@ -1313,7 +1313,7 @@ class StableDiffusionXLControlNetInpaintPipeline( ...@@ -1313,7 +1313,7 @@ class StableDiffusionXLControlNetInpaintPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -1102,7 +1102,7 @@ class StableDiffusionXLControlNetPipeline( ...@@ -1102,7 +1102,7 @@ class StableDiffusionXLControlNetPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -1251,7 +1251,7 @@ class StableDiffusionXLControlNetImg2ImgPipeline( ...@@ -1251,7 +1251,7 @@ class StableDiffusionXLControlNetImg2ImgPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -789,7 +789,7 @@ class PIAPipeline( ...@@ -789,7 +789,7 @@ class PIAPipeline(
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -242,7 +242,7 @@ class StableCascadeCombinedPipeline(DiffusionPipeline): ...@@ -242,7 +242,7 @@ class StableCascadeCombinedPipeline(DiffusionPipeline):
prior_callback_on_step_end_tensor_inputs (`List`, *optional*): prior_callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `prior_callback_on_step_end` function. The tensors specified in the The list of tensor inputs for the `prior_callback_on_step_end` function. The tensors specified in the
list will be passed as `callback_kwargs` argument. You will only be able to include variables listed in list will be passed as `callback_kwargs` argument. You will only be able to include variables listed in
the `._callback_tensor_inputs` attribute of your pipeine class. the `._callback_tensor_inputs` attribute of your pipeline class.
callback_on_step_end (`Callable`, *optional*): callback_on_step_end (`Callable`, *optional*):
A function that calls at the end of each denoising steps during the inference. The function is called A function that calls at the end of each denoising steps during the inference. The function is called
with the following arguments: `callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int, with the following arguments: `callback_on_step_end(self: DiffusionPipeline, step: int, timestep: int,
...@@ -251,7 +251,7 @@ class StableCascadeCombinedPipeline(DiffusionPipeline): ...@@ -251,7 +251,7 @@ class StableCascadeCombinedPipeline(DiffusionPipeline):
callback_on_step_end_tensor_inputs (`List`, *optional*): callback_on_step_end_tensor_inputs (`List`, *optional*):
The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list The list of tensor inputs for the `callback_on_step_end` function. The tensors specified in the list
will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the will be passed as `callback_kwargs` argument. You will only be able to include variables listed in the
`._callback_tensor_inputs` attribute of your pipeine class. `._callback_tensor_inputs` attribute of your pipeline class.
Examples: Examples:
......
...@@ -647,7 +647,7 @@ class StableDiffusionXLImg2ImgPipeline( ...@@ -647,7 +647,7 @@ class StableDiffusionXLImg2ImgPipeline(
# because `num_inference_steps` might be even given that every timestep # because `num_inference_steps` might be even given that every timestep
# (except the highest one) is duplicated. If `num_inference_steps` is even it would # (except the highest one) is duplicated. If `num_inference_steps` is even it would
# mean that we cut the timesteps in the middle of the denoising step # mean that we cut the timesteps in the middle of the denoising step
# (between 1st and 2nd devirative) which leads to incorrect results. By adding 1 # (between 1st and 2nd derivative) which leads to incorrect results. By adding 1
# we ensure that the denoising process always ends after the 2nd derivate step of the scheduler # we ensure that the denoising process always ends after the 2nd derivate step of the scheduler
num_inference_steps = num_inference_steps + 1 num_inference_steps = num_inference_steps + 1
......
...@@ -1027,7 +1027,7 @@ class StableDiffusionXLInpaintPipeline( ...@@ -1027,7 +1027,7 @@ class StableDiffusionXLInpaintPipeline(
# because `num_inference_steps` might be even given that every timestep # because `num_inference_steps` might be even given that every timestep
# (except the highest one) is duplicated. If `num_inference_steps` is even it would # (except the highest one) is duplicated. If `num_inference_steps` is even it would
# mean that we cut the timesteps in the middle of the denoising step # mean that we cut the timesteps in the middle of the denoising step
# (between 1st and 2nd devirative) which leads to incorrect results. By adding 1 # (between 1st and 2nd derivative) which leads to incorrect results. By adding 1
# we ensure that the denoising process always ends after the 2nd derivate step of the scheduler # we ensure that the denoising process always ends after the 2nd derivate step of the scheduler
num_inference_steps = num_inference_steps + 1 num_inference_steps = num_inference_steps + 1
......
...@@ -392,7 +392,7 @@ class ConsistencyDecoderVAETests(ModelTesterMixin, unittest.TestCase): ...@@ -392,7 +392,7 @@ class ConsistencyDecoderVAETests(ModelTesterMixin, unittest.TestCase):
... ...
class AutoncoderKLTemporalDecoderFastTests(ModelTesterMixin, unittest.TestCase): class AutoencoderKLTemporalDecoderFastTests(ModelTesterMixin, unittest.TestCase):
model_class = AutoencoderKLTemporalDecoder model_class = AutoencoderKLTemporalDecoder
main_input_name = "sample" main_input_name = "sample"
base_precision = 1e-2 base_precision = 1e-2
......
...@@ -914,7 +914,7 @@ class CustomPipelineTests(unittest.TestCase): ...@@ -914,7 +914,7 @@ class CustomPipelineTests(unittest.TestCase):
with self.assertRaises(ValueError): with self.assertRaises(ValueError):
pipeline = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-sdxl-custom-components") pipeline = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-sdxl-custom-components")
# Check that only loading custom componets "my_unet", "my_scheduler" works # Check that only loading custom components "my_unet", "my_scheduler" works
pipeline = DiffusionPipeline.from_pretrained( pipeline = DiffusionPipeline.from_pretrained(
"hf-internal-testing/tiny-sdxl-custom-components", trust_remote_code=True "hf-internal-testing/tiny-sdxl-custom-components", trust_remote_code=True
) )
...@@ -928,7 +928,7 @@ class CustomPipelineTests(unittest.TestCase): ...@@ -928,7 +928,7 @@ class CustomPipelineTests(unittest.TestCase):
assert images.shape == (1, 64, 64, 3) assert images.shape == (1, 64, 64, 3)
# Check that only loading custom componets "my_unet", "my_scheduler" and explicit custom pipeline works # Check that only loading custom components "my_unet", "my_scheduler" and explicit custom pipeline works
pipeline = DiffusionPipeline.from_pretrained( pipeline = DiffusionPipeline.from_pretrained(
"hf-internal-testing/tiny-sdxl-custom-components", custom_pipeline="my_pipeline", trust_remote_code=True "hf-internal-testing/tiny-sdxl-custom-components", custom_pipeline="my_pipeline", trust_remote_code=True
) )
...@@ -947,7 +947,7 @@ class CustomPipelineTests(unittest.TestCase): ...@@ -947,7 +947,7 @@ class CustomPipelineTests(unittest.TestCase):
with self.assertRaises(ValueError): with self.assertRaises(ValueError):
pipeline = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-sdxl-custom-all") pipeline = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-sdxl-custom-all")
# Check that only loading custom componets "my_unet", "my_scheduler" and auto custom pipeline works # Check that only loading custom components "my_unet", "my_scheduler" and auto custom pipeline works
pipeline = DiffusionPipeline.from_pretrained( pipeline = DiffusionPipeline.from_pretrained(
"hf-internal-testing/tiny-sdxl-custom-all", trust_remote_code=True "hf-internal-testing/tiny-sdxl-custom-all", trust_remote_code=True
) )
......
...@@ -634,7 +634,7 @@ class PipelineTesterMixin: ...@@ -634,7 +634,7 @@ class PipelineTesterMixin:
"treatment when `do_classifier_free_guidance` is `True`. `pipeline_params.py` provides some common" "treatment when `do_classifier_free_guidance` is `True`. `pipeline_params.py` provides some common"
" sets of parameters such as `TEXT_TO_IMAGE_CALLBACK_CFG_PARAMS`. If your pipeline's " " sets of parameters such as `TEXT_TO_IMAGE_CALLBACK_CFG_PARAMS`. If your pipeline's "
"set of cfg arguments has minor changes from one of the common sets of cfg arguments, " "set of cfg arguments has minor changes from one of the common sets of cfg arguments, "
"do not make modifications to the existing common sets of cfg arguments. I.e. for inpaint pipeine, you " "do not make modifications to the existing common sets of cfg arguments. I.e. for inpaint pipeline, you "
" need to adjust batch size of `mask` and `masked_image_latents` so should set the attribute as" " need to adjust batch size of `mask` and `masked_image_latents` so should set the attribute as"
"`callback_cfg_params = TEXT_TO_IMAGE_CFG_PARAMS.union({'mask', 'masked_image_latents'})`" "`callback_cfg_params = TEXT_TO_IMAGE_CFG_PARAMS.union({'mask', 'masked_image_latents'})`"
) )
...@@ -1235,7 +1235,7 @@ class PipelineTesterMixin: ...@@ -1235,7 +1235,7 @@ class PipelineTesterMixin:
) )
def callback_inputs_subset(pipe, i, t, callback_kwargs): def callback_inputs_subset(pipe, i, t, callback_kwargs):
# interate over callback args # iterate over callback args
for tensor_name, tensor_value in callback_kwargs.items(): for tensor_name, tensor_value in callback_kwargs.items():
# check that we're only passing in allowed tensor inputs # check that we're only passing in allowed tensor inputs
assert tensor_name in pipe._callback_tensor_inputs assert tensor_name in pipe._callback_tensor_inputs
...@@ -1246,7 +1246,7 @@ class PipelineTesterMixin: ...@@ -1246,7 +1246,7 @@ class PipelineTesterMixin:
for tensor_name in pipe._callback_tensor_inputs: for tensor_name in pipe._callback_tensor_inputs:
assert tensor_name in callback_kwargs assert tensor_name in callback_kwargs
# interate over callback args # iterate over callback args
for tensor_name, tensor_value in callback_kwargs.items(): for tensor_name, tensor_value in callback_kwargs.items():
# check that we're only passing in allowed tensor inputs # check that we're only passing in allowed tensor inputs
assert tensor_name in pipe._callback_tensor_inputs assert tensor_name in pipe._callback_tensor_inputs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment