Skip to content

Commit d0aa899

Browse files
authored
docs: src/diffusers readability improvements (#629)
* docs: `src/diffusers` readability improvements Signed-off-by: Ryan Russell <git@ryanrussell.org> * docs: `make style` lint Signed-off-by: Ryan Russell <git@ryanrussell.org> Signed-off-by: Ryan Russell <git@ryanrussell.org>
1 parent 1e15203 commit d0aa899

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/diffusers/modeling_flax_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def from_pretrained(
436436
)
437437
cls._missing_keys = missing_keys
438438

439-
# Mistmatched keys contains tuples key/shape1/shape2 of weights in the checkpoint that have a shape not
439+
# Mismatched keys contains tuples key/shape1/shape2 of weights in the checkpoint that have a shape not
440440
# matching the weights in the model.
441441
mismatched_keys = []
442442
for key in state.keys():

src/diffusers/pipeline_flax_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
244244
245245
kwargs (remaining dictionary of keyword arguments, *optional*):
246246
Can be used to overwrite load - and saveable variables - *i.e.* the pipeline components - of the
247-
specific pipeline class. The overritten components are then directly passed to the pipelines `__init__`
248-
method. See example below for more information.
247+
specific pipeline class. The overwritten components are then directly passed to the pipelines
248+
`__init__` method. See example below for more information.
249249
250250
<Tip>
251251

src/diffusers/pipeline_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P
235235
236236
kwargs (remaining dictionary of keyword arguments, *optional*):
237237
Can be used to overwrite load - and saveable variables - *i.e.* the pipeline components - of the
238-
specific pipeline class. The overritten components are then directly passed to the pipelines `__init__`
239-
method. See example below for more information.
238+
specific pipeline class. The overwritten components are then directly passed to the pipelines
239+
`__init__` method. See example below for more information.
240240
241241
<Tip>
242242

src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class LDMTextToImagePipeline(DiffusionPipeline):
2727
vqvae ([`VQModel`]):
2828
Vector-quantized (VQ) Model to encode and decode images to and from latent representations.
2929
bert ([`LDMBertModel`]):
30-
Text-encoder model based on [BERT](ttps://huggingface.co/docs/transformers/model_doc/bert) architecture.
30+
Text-encoder model based on [BERT](https://huggingface.co/docs/transformers/model_doc/bert) architecture.
3131
tokenizer (`transformers.BertTokenizer`):
3232
Tokenizer of class
3333
[BertTokenizer](https://huggingface.co/docs/transformers/model_doc/bert#transformers.BertTokenizer).
@@ -397,7 +397,7 @@ def forward(
397397
attn_output = attn_output.transpose(1, 2)
398398

399399
# Use the `embed_dim` from the config (stored in the class) rather than `hidden_state` because `attn_output` can be
400-
# partitioned aross GPUs when using tensor-parallelism.
400+
# partitioned across GPUs when using tensor-parallelism.
401401
attn_output = attn_output.reshape(bsz, tgt_len, self.inner_dim)
402402

403403
attn_output = self.out_proj(attn_output)

src/diffusers/utils/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def reset_format() -> None:
266266

267267
def warning_advice(self, *args, **kwargs):
268268
"""
269-
This method is identical to `logger.warninging()`, but if env var DIFFUSERS_NO_ADVISORY_WARNINGS=1 is set, this
269+
This method is identical to `logger.warning()`, but if env var DIFFUSERS_NO_ADVISORY_WARNINGS=1 is set, this
270270
warning will not be printed
271271
"""
272272
no_advisory_warnings = os.getenv("DIFFUSERS_NO_ADVISORY_WARNINGS", False)

0 commit comments

Comments
 (0)