Fix issue in maybe_convert_prompt (#3188) · pr8x/diffusers@0d196f9 · GitHub
Skip to content

Commit 0d196f9

Browse files
authored
Fix issue in maybe_convert_prompt (huggingface#3188)
When the token used for textual inversion does not have any special symbols (e.g. it is not surrounded by <>), the tokenizer does not properly split the replacement tokens. Adding a space for the padding tokens fixes this.
1 parent 131312c commit 0d196f9

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/diffusers/loaders.py‎

Lines changed: 1 addition & 1 deletion

‎tests/pipelines/test_pipelines.py‎

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)