Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #978

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/community/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ generator = th.Generator("cuda").manual_seed(0)

seed = 0
prompt = "a forest | a camel"
weights = " 1 | 1" # Equal weight to each prompt. Cna be negative
weights = " 1 | 1" # Equal weight to each prompt. Can be negative

images = []
for i in range(4):
Expand Down
4 changes: 2 additions & 2 deletions examples/community/composable_stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def __call__(
tensor will ge generated by sampling using the supplied random `generator`.
output_type (`str`, *optional*, defaults to `"pil"`):
The output format of the generate image. Choose between
[PIL](https://pillow.readthedocs.io/en/stable/): `PIL.Image.Image` or `nd.array`.
[PIL](https://pillow.readthedocs.io/en/stable/): `PIL.Image.Image` or `np.array`.
return_dict (`bool`, *optional*, defaults to `True`):
Whether or not to return a [`~pipelines.stable_diffusion.StableDiffusionPipelineOutput`] instead of a
plain tuple.
Expand Down Expand Up @@ -264,7 +264,7 @@ def __call__(

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

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

Expand Down
6 changes: 3 additions & 3 deletions examples/community/lpw_stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

def parse_prompt_attention(text):
"""
Parses a string with attention tokens and returns a list of pairs: text and its assoicated weight.
Parses a string with attention tokens and returns a list of pairs: text and its associated weight.
Accepted tokens are:
(abc) - increases attention to abc by a multiplier of 1.1
(abc:3.12) - increases attention to abc by a multiplier of 3.12
Expand Down Expand Up @@ -237,9 +237,9 @@ def get_weighted_text_embeddings(
r"""
Prompts can be assigned with local weights using brackets. For example,
prompt 'A (very beautiful) masterpiece' highlights the words 'very beautiful',
and the embedding tokens corresponding to the words get multipled by a constant, 1.1.
and the embedding tokens corresponding to the words get multiplied by a constant, 1.1.

Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the origional mean.
Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the original mean.

Args:
pipe (`DiffusionPipeline`):
Expand Down
6 changes: 3 additions & 3 deletions examples/community/lpw_stable_diffusion_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

def parse_prompt_attention(text):
"""
Parses a string with attention tokens and returns a list of pairs: text and its assoicated weight.
Parses a string with attention tokens and returns a list of pairs: text and its associated weight.
Accepted tokens are:
(abc) - increases attention to abc by a multiplier of 1.1
(abc:3.12) - increases attention to abc by a multiplier of 3.12
Expand Down Expand Up @@ -236,9 +236,9 @@ def get_weighted_text_embeddings(
r"""
Prompts can be assigned with local weights using brackets. For example,
prompt 'A (very beautiful) masterpiece' highlights the words 'very beautiful',
and the embedding tokens corresponding to the words get multipled by a constant, 1.1.
and the embedding tokens corresponding to the words get multiplied by a constant, 1.1.

Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the origional mean.
Also, to regularize of the embedding, the weighted embedding would be scaled to preserve the original mean.

Args:
pipe (`DiffusionPipeline`):
Expand Down
4 changes: 2 additions & 2 deletions src/diffusers/pipeline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
def components(self) -> Dict[str, Any]:
r"""

The `self.compenents` property can be useful to run different pipelines with the same weights and
The `self.components` property can be useful to run different pipelines with the same weights and
configurations to not have to re-allocate memory.

Examples:
Expand All @@ -588,7 +588,7 @@ def components(self) -> Dict[str, Any]:
```

Returns:
A dictionaly containing all the modules needed to initialize the pipleline.
A dictionaly containing all the modules needed to initialize the pipeline.
"""
components = {k: getattr(self, k) for k in self.config.keys() if not k.startswith("_")}
expected_modules = set(inspect.signature(self.__init__).parameters.keys()) - set(["self"])
Expand Down