Skip to content

Commit

Permalink
fix(api): use padding token for prompt padding
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Apr 24, 2023
1 parent 3f4dd70 commit 2fe6a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/onnx_web/diffusers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def expand_prompt(
negative_prompt_embeds,
[(0, 0), (0, negative_padding), (0, 0)],
mode="constant",
constant_values=0,
constant_values=self.tokenizer.pad_token_id,
)
negative_prompt_embeds = np.repeat(
negative_prompt_embeds, num_images_per_prompt, axis=0
Expand Down

0 comments on commit 2fe6a87

Please sign in to comment.