Skip to content

Commit 365a938

Browse files
Fixed Nits in Docs and Example Script (huggingface#9940)
Fixed nits in docs and example script. Co-authored-by: Sayak Paul <[email protected]>
1 parent 345907f commit 365a938

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffusers/loaders/textual_inversion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,19 +497,19 @@ def unload_textual_inversion(
497497
# load embeddings of text_encoder 1 (CLIP ViT-L/14)
498498
pipeline.load_textual_inversion(
499499
state_dict["clip_l"],
500-
token=["<s0>", "<s1>"],
500+
tokens=["<s0>", "<s1>"],
501501
text_encoder=pipeline.text_encoder,
502502
tokenizer=pipeline.tokenizer,
503503
)
504504
# load embeddings of text_encoder 2 (CLIP ViT-G/14)
505505
pipeline.load_textual_inversion(
506506
state_dict["clip_g"],
507-
token=["<s0>", "<s1>"],
507+
tokens=["<s0>", "<s1>"],
508508
text_encoder=pipeline.text_encoder_2,
509509
tokenizer=pipeline.tokenizer_2,
510510
)
511511
512-
# Unload explicitly from both text encoders abd tokenizers
512+
# Unload explicitly from both text encoders and tokenizers
513513
pipeline.unload_textual_inversion(
514514
tokens=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder, tokenizer=pipeline.tokenizer
515515
)

0 commit comments

Comments
 (0)