Skip to content

Commit d65e2af

Browse files
asomoza蒋硕
authored andcommitted
[Tests] Fix ChatGLMTokenizer (huggingface#9536)
fix
1 parent 6293ffc commit d65e2af

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/diffusers/pipelines/kolors/tokenizer.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ def _pad(
277277
padding_strategy: PaddingStrategy = PaddingStrategy.DO_NOT_PAD,
278278
pad_to_multiple_of: Optional[int] = None,
279279
return_attention_mask: Optional[bool] = None,
280+
padding_side: Optional[bool] = None,
280281
) -> dict:
281282
"""
282283
Pad encoded inputs (on left/right and up to predefined length or max length in the batch)
@@ -298,6 +299,9 @@ def _pad(
298299
pad_to_multiple_of: (optional) Integer if set will pad the sequence to a multiple of the provided value.
299300
This is especially useful to enable the use of Tensor Core on NVIDIA hardware with compute capability
300301
`>= 7.5` (Volta).
302+
padding_side (`str`, *optional*):
303+
The side on which the model should have padding applied. Should be selected between ['right', 'left'].
304+
Default value is picked from the class attribute of the same name.
301305
return_attention_mask:
302306
(optional) Set to False to avoid returning attention mask (default: set to model specifics)
303307
"""

0 commit comments

Comments
 (0)