Skip to content

Commit

Permalink
Fix bug when running image-to-text example (#1371)
Browse files Browse the repository at this point in the history
Signed-off-by: kaixuanliu <[email protected]>
  • Loading branch information
kaixuanliu authored Sep 30, 2024
1 parent 04c0f00 commit e9f8388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/habana/transformers/generation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ def generate(
model_kwargs[other_inputs] = torch.nn.functional.pad(
model_kwargs[other_inputs],
(0, generation_config.max_new_tokens),
value=generation_config.pad_token_id,
value=0,
)
else:
assert generation_config.bucket_size <= 0, "Untested path for bucket>0"
Expand Down

0 comments on commit e9f8388

Please sign in to comment.