Skip to content

Commit 4401e6a

Browse files
authored
fix typo in imagic_stable_diffusion.py (huggingface#1956)
changed named arg to self.tokenizer from `truncaton` to `truncation` according to Tokenizer docs (https://huggingface.co/docs/tokenizers/api/tokenizer#tokenizers.Tokenizer.truncation)
1 parent 089f0f4 commit 4401e6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/community/imagic_stable_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def train(
229229
prompt,
230230
padding="max_length",
231231
max_length=self.tokenizer.model_max_length,
232-
truncaton=True,
232+
truncation=True,
233233
return_tensors="pt",
234234
)
235235
text_embeddings = torch.nn.Parameter(

0 commit comments

Comments
 (0)