Skip to content

Commit cc43608

Browse files
authored
Fix typos (#978)
1 parent d7d6841 commit cc43608

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

examples/community/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ generator = th.Generator("cuda").manual_seed(0)
355355

356356
seed = 0
357357
prompt = "a forest | a camel"
358-
weights = " 1 | 1" # Equal weight to each prompt. Cna be negative
358+
weights = " 1 | 1" # Equal weight to each prompt. Can be negative
359359

360360
images = []
361361
for i in range(4):

examples/community/composable_stable_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def __call__(
133133
tensor will ge generated by sampling using the supplied random `generator`.
134134
output_type (`str`, *optional*, defaults to `"pil"`):
135135
The output format of the generate image. Choose between
136-
[PIL](https://pillow.readthedocs.io/en/stable/): `PIL.Image.Image` or `nd.array`.
136+
[PIL](https://pillow.readthedocs.io/en/stable/): `PIL.Image.Image` or `np.array`.
137137
return_dict (`bool`, *optional*, defaults to `True`):
138138
Whether or not to return a [`~pipelines.stable_diffusion.StableDiffusionPipelineOutput`] instead of a
139139
plain tuple.
@@ -264,7 +264,7 @@ def __call__(
264264

265265
self.scheduler.set_timesteps(num_inference_steps, **extra_set_kwargs)
266266

267-
# if we use LMSDiscreteScheduler, let's make sure latents are mulitplied by sigmas
267+
# if we use LMSDiscreteScheduler, let's make sure latents are multiplied by sigmas
268268
if isinstance(self.scheduler, LMSDiscreteScheduler):
269269
latents = latents * self.scheduler.sigmas[0]
270270

examples/community/lpw_stable_diffusion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
def parse_prompt_attention(text):
4242
"""
43-
Parses a string with attention tokens and returns a list of pairs: text and its assoicated weight.
43+
Parses a string with attention tokens and returns a list of pairs: text and its associated weight.
4444
Accepted tokens are:
4545
(abc) - increases attention to abc by a multiplier of 1.1
4646
(abc:3.12) - increases attention to abc by a multiplier of 3.12
@@ -237,9 +237,9 @@ def get_weighted_text_embeddings(
237237
r"""
238238
Prompts can be assigned with local weights using brackets. For example,
239239
prompt 'A (very beautiful) masterpiece' highlights the words 'very beautiful',
240-
and the embedding tokens corresponding to the words get multipled by a constant, 1.1.
240+
and the embedding tokens corresponding to the words get multiplied by a constant, 1.1.
241241
242-
Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the origional mean.
242+
Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the original mean.
243243
244244
Args:
245245
pipe (`DiffusionPipeline`):

examples/community/lpw_stable_diffusion_onnx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
def parse_prompt_attention(text):
4040
"""
41-
Parses a string with attention tokens and returns a list of pairs: text and its assoicated weight.
41+
Parses a string with attention tokens and returns a list of pairs: text and its associated weight.
4242
Accepted tokens are:
4343
(abc) - increases attention to abc by a multiplier of 1.1
4444
(abc:3.12) - increases attention to abc by a multiplier of 3.12
@@ -236,9 +236,9 @@ def get_weighted_text_embeddings(
236236
r"""
237237
Prompts can be assigned with local weights using brackets. For example,
238238
prompt 'A (very beautiful) masterpiece' highlights the words 'very beautiful',
239-
and the embedding tokens corresponding to the words get multipled by a constant, 1.1.
239+
and the embedding tokens corresponding to the words get multiplied by a constant, 1.1.
240240
241-
Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the origional mean.
241+
Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the original mean.
242242
243243
Args:
244244
pipe (`DiffusionPipeline`):

src/diffusers/pipeline_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
584584
def components(self) -> Dict[str, Any]:
585585
r"""
586586
587-
The `self.compenents` property can be useful to run different pipelines with the same weights and
587+
The `self.components` property can be useful to run different pipelines with the same weights and
588588
configurations to not have to re-allocate memory.
589589
590590
Examples:
@@ -602,7 +602,7 @@ def components(self) -> Dict[str, Any]:
602602
```
603603
604604
Returns:
605-
A dictionaly containing all the modules needed to initialize the pipleline.
605+
A dictionaly containing all the modules needed to initialize the pipeline.
606606
"""
607607
components = {k: getattr(self, k) for k in self.config.keys() if not k.startswith("_")}
608608
expected_modules = set(inspect.signature(self.__init__).parameters.keys()) - set(["self"])

0 commit comments

Comments
 (0)